domingo, 5 de julho de 2020

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:

Nenhum comentário:

Postar um comentário