Skip to Content
Technical Articles
Author's profile photo Ritesh Dube

Variant Configuration : Another way to hide characterstic

Purpose:

In this write up I am trying to define how to use structure SCREEN_DEP  in reference characteristic to influence display options for other
characteristics.

/wp-content/uploads/2015/09/1_785263.gif

 

Scenario:

 

While settings up your VC model you may come across one of below scenarios

  • Hide few characteristic based upon value selected for another characteristic
  • Make a characteristic not ready for input (just  display)
  • Make characteristic “Ready for input”  which is originally created as not ready for input
  • Reset previously setup value using an dependency

 

Solutions:

 

There are  different  approaches possible to work around this scenarios and one of the possible option is we can use structure  SCREEN_DEP
to achieve same.
This structure basically controlled 4 display option for characteristic INVISIBLE, INPUT, NO_INPUT, RESET

 

Scenario
1 :
Hide few characteristic based upon value selected for another characteristic

It’s a common scenario and use reference characteristic  along with object dependency (procedure ) to controlled it.

Example :

 

There are 2 characteristic in VC Model  which are interdependent , characteristic & there possible values are like below

Characteristic

Possible Values

CHAR_A

1

CHAR_A

2

CHAR_A

3

CHAR_A

4

CHAR_B

XL

CHAR_B

XXL

Condition :

CHAR_B should be only available only if  characteristic CHAR_A have value 2 or 3

 

Building Masterdata :

 

Create your VC model

Create a characteristic
CHAR_A , CHAR_B  using transaction CT04  along with possible values as shown in above table.

Create characteristic
HIDE_CHAR  using transaction CT04,

Go to additional data tab and input the structure  SCREEN_DEP & field INVISIBLE, press
enter

 

 

/wp-content/uploads/2015/09/2_785279.gif/wp-content/uploads/2015/09/1_785263.gif

 

 

You will get pop up confirming data type and other details will be copied to characteristic ,

 

/wp-content/uploads/2015/09/3_785281.gif

 

 

Go back to basic data screen and change the description as per your need 

/wp-content/uploads/2015/09/4_785282.gif

save this new characteristic.

Create  object dependency using transaction CU01  

       /wp-content/uploads/2015/09/5_785284.gif

Give name of dependency,

/wp-content/uploads/2015/09/7_785288.gif

 

Give description and select dependency type Procedure using  radio button as shown above

 

Click on

/wp-content/uploads/2015/09/6_785289.gif

 

Write syntax code like below

$self.HIDE_CHAR = ‘CHAR_B’ if $self.CHAR_A = ‘1’ or
$self.CHAR_A = ‘4’

 

/wp-content/uploads/2015/09/10_785300.gif

Click on syntax check as highlighted above.   /wp-content/uploads/2015/09/8_1_785294.gif

 

 

Click on save  icon it will take you back to first screen.

 

/wp-content/uploads/2015/09/9_785295.gif
Make sure you change dependency status to 1 (Release) or  your dependency will not work.
Save the dependency.

You can assign this dependency in configuration profile of the model or you can assign it to characteristic CHAR_B.

 

 

Result:

 

Now all the settings are done and our model is ready to be test.We can either create a sales order (VA01) to test or we can use configuration simulation  (CU50)

 

/wp-content/uploads/2015/09/11_785302.gif

Enter material number

/wp-content/uploads/2015/09/12_785303.gif

Push configuration button as highlighted above,

 

You will get pop-up to input characteristic values

 

/wp-content/uploads/2015/09/13_785304.gif

If you assign value 2 or 3 to characteristic A , system will allow you to assign values to characteristic B too.

 

/wp-content/uploads/2015/09/14_785305.gif

If you assign value 1 or 4 to characteristic A, Characteristic B will become invisible.

 

/wp-content/uploads/2015/09/15_785306.gif
Note:

  • You can add reference characteristic in same  class if you want it to appear in classification screen, in one way it showscharacteristic B got invisible as picked by HIDEN reference characteristic.
  • You can assign dependency to either characteristic   you want to hide or to configurationprofile of the material
  • Changes  made with structure SCREEN_DEP only apply to variant configuration, not to  classification

 

.

Thanks for reading it till end  ,  I will cover related topics of how to reset, make no-input  or allowed input in next document. I will try to post it soon. if you like the document please post your comments and ratings, please also suggest if you find any thing missing in flow, I try to cover all possible details.

 

If you have any question or facing any issue , please create a separate thread and use a link to this document if you want to give reference of any steps. It will help forum members to reply and can be useful for other members facing same issue in future.

 

 

References:

  • Help.sap.com
  • Screen shots are from SAP IDES system, data created by me.

Assigned Tags

      17 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Very useful document ....... Thanks for sharing.

      Author's profile photo Ritesh Dube
      Ritesh Dube
      Blog Post Author

      Thanks Ajay.

      Author's profile photo Former Member
      Former Member

      Thanks a lot Dube ji, writing a nice doc on variant configuration and sharing it.

      Author's profile photo Ritesh Dube
      Ritesh Dube
      Blog Post Author

      Thanks D SINGH.

      Author's profile photo Navaneetha Krishnan
      Navaneetha Krishnan

      Hi Ritesh

      Another good one from you.

      There are also ohter fields in SCREEN_DEP which can be well leveraged fo rvarious uses of VC.

      Author's profile photo Ritesh Dube
      Ritesh Dube
      Blog Post Author

      Thanks for comment Navaneetha Krishnan &  Rakesh M Choudhary  , Ya i already mention it in document too thats work is in process and soon i will add other control through SCREEN_DEP.

      Author's profile photo Rakesh M Choudhary
      Rakesh M Choudhary

      Hi Ritesh,

      Very good explanation. Helped  a lot in further understanding of the topic. Like Navaneetha Krishnan has mentioned, if you can also elaborate on the usage of other fields in SCREEN_DEP, it would be very helpful for us.

      Thanks

      Rakesh

      Author's profile photo Former Member
      Former Member

      Hi Ritesh

      Very nice explanation!

      Thx

      Br

      Kevin

      Author's profile photo Ritesh Dube
      Ritesh Dube
      Blog Post Author

      Thanks Kevin Yang.

      Author's profile photo Former Member
      Former Member

      Informative document.

      Author's profile photo Gopal Ramlal
      Gopal Ramlal

      Great  document, so much information , thanks for sharing it.

      Author's profile photo Sanila John
      Sanila John

      Can we hide multiple characteristics using this approach in S4HANA AVC? Tried the same but only one Characteristic is hidden .

       

       

      Author's profile photo Ritesh Dube
      Ritesh Dube
      Blog Post Author
      I suggest If you open a new thread giving reference of this blog it will be visible to other members in forum.
      Thanks
      RD
      Author's profile photo Ankit Mehrotra
      Ankit Mehrotra

      Hiding the entire characteristics or a characteristic value does not work properly in aVC. The characteristics doesn't gets hidden (as it functions in classical VC) instead becomes disables for editing.

      Author's profile photo SAP WMEWM
      SAP WMEWM

      Nice document. Thanks.

      Author's profile photo SAP2020ALL Module
      SAP2020ALL Module

      Nice explanation with screen shots. Thanks for sharing.

       

      Author's profile photo Stephen Ferreira
      Stephen Ferreira

      Hello Ditesh,

      I have been looking into replacing preconditions with procedures to hide characteristics and values.   I appreciate your post.  I have a few questions.   With preconditions there is automatic error handling when a condition is violated when hiding or presenting characteristics or values.  There are a few issues I see with the method you  present, let me know if you agree.

      1.  You need to create a new hide reference characteristic for each characteristic that you would like to hide in the class.  You cannot just create one and then use it multiple ways in the class.
      2. There is no built in error handling, you need to code additional constraints to handle violations, such as, a value is selected in a characteristic and then the characteristic is later hidden.  No error occurs and the selection value will end up in the order or quote and most likely would not be needed or valid.
      3. Is there a way to hide not the whole characteristic, just a single value in the characteristic with this method?

      Your reply would be much appreciated.