cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Populate a characteristics value depending on another characteristics in VC

anirban_pahari
Explorer
0 Kudos

Dear Experts,

I need your advise/suggestion on the following requirement regarding Variant Configuration. I have already searched the available links regarding this but was unable to fix it.

1. I have a characteristics "ZMILL " whose value should be auto populated with some of storage location values (not all storage location value should flow) obtained in the sales order. (I am aware of the fact of referencing the characteristics with VBAP-LGORT in CT04)

2. Now there is already a hidden characteristics "STORAGE_LOC" existing which refers to VBAP-LGORT in system.

3. Lets say the possible storage location values are SLOC1, SLOC2 and SLOC3. Now these values will be populated in characteristics "STORAGE_LOC" as it refers to VBAP-LGORT. But I want "ZMILL" to be auto populated but hidden only if storage location value is SLOC2. Else "ZMILL" will neither be populated nr be displayed.

Is this possible by any means in standard Variant Configuration ?

Regards,
Anirban Pahari
SAP SD Consultant

Accepted Solutions (1)

Accepted Solutions (1)

Ritz
Active Contributor
0 Kudos

anirban pahari,

have you tried using procedures to pass this value with a condition IF?

either i didn't understand your issue correctly and providing you a simple solution.

I assume you created characteristic ZMILL with option "do now show"

second assumption is characteristics "STORAGE_LOC" is created referring to VBAP-LGORT and capturing all storage location values correctly.

Write a dependency type procedure with below example syntex

$SELF.ZMILL = $SELF.STORAGE_LOC if $SELF.STORAGE_LOC = ('SLOC1' or 'SLOC2')

its just a example, you may need to correct syntax.

Please try it and come back with your findings.

Thanks

Ritesh

anirban_pahari
Explorer
0 Kudos

Dear Ritesh,

Thanks for your inputs. But value is not populated in characteristics ZMILL based on the IF dependency you mentioned. The code written is as follows:

No syntax errors were obtained but warnings exist.

$SELF.ZMILL = $SELF.STORAGE_LOC if $SELF.STORAGE_LOC = 'CRM' .

I feel here the value of storage location is not getting flown to ZMILL. Will using DEFAULT syntax help in any way?

Regards,

Anirban Pahari













Ritz
Active Contributor
0 Kudos

anirban pahari,

can you please post what warning message you got while checking syntex?


anirban pahari wrote:

Will using DEFAULT syntax help in any way?

Regards,

Anirban Pahari

I am not sure this syntax will either work as Default can be set using syntax like below

$SET_DEFAULT ($SELF, <ZMIL>, <SLOC1>) if $SELF.STORAGE_LOC = 'SLOC1'

Its sounds possible , but dont you think it will work as a hard coded value, i mean this way only few values can be assigned, and very time you have such condtion you need edit VC structure and create a nex syntex.

in such condition a variant table sounds more appealing then a procedure.

for more details on variant table , refer below link

Variant Tables - Variant Configuration (LO-VC) - SAP Library

in you case STORAGE_LOC will be a key characteristic & ZMIL will be receiving one.

Input only storage location which are relevant to be picked by ZMIL

Please check and come back.

Also , please mark replies helpful if it helps you.

Thanks

Ritesh    

anirban_pahari
Explorer
0 Kudos

Dear Ritesh,

Solution can be achieved at a gross level through

1. Variant tables

2. Procedures.

I have tested both and it is working fine.

Code is given as below:

TABLE ZVC_ZMILL (STORAGE_LOC = STORAGE_LOC, ZMILL = $SELF.ZMILL).

$SELF.ZMILL = $SELF.STORAGE_LOC if $SELF.STORAGE_LOC = 'CRM'  (Please note initially it was not working as we tried it as a pre condition instead of a procedure)

But my client does not want to use this, logic being for a small requirement  there is a mass change in the configuration profile. As according to my SD knowledge it is not possible to call a variant table without assigning it to the configuration profile. So we have sorted out the issue with a different business approach.

Nevertheless a sincere thanks to all the members for their valuable inputs.

Regards,
Anirban

ravi_kumar100
Active Contributor
0 Kudos

Hi,

If it is fine with you kindly do share the workaround finalized as per the business approach.

Regards,

SRK

Ritz
Active Contributor
0 Kudos

anirban pahari,

Appreciate your reply, Thanks a lot for sharing your final call and updating group.

Please close the thread.

Come back this forum when ever you want to discuss any issue with VC.

Regards

Ritesh

Answers (1)

Answers (1)

ravi_kumar100
Active Contributor
0 Kudos

Hi,

Check for the Variant table in CU61 and CU60E for uploading it.

Regards,

SRK

anirban_pahari
Explorer
0 Kudos

Dear SRK,

Can you please elucidate a bit regarding how to achieve my desired results via variant tables.

Regards,

Anirban Pahari

SAP SD Consultant

ravi_kumar100
Active Contributor
0 Kudos

Hi,

Kindly provide the complete scenario to help you with the Variant Table. I have used the Variant table to maintain it for LDP pipes,flanges with different dimensions.

Regards,

SRK.

anirban_pahari
Explorer
0 Kudos

Dear SRK,

Thanks for your prompt response. Scenario is as follows:


Characteristics: ZMILL

  • It has no predefined value set as we want some of the sales order storage location value to be auto populated.
  • St Loc Values which should be auto populated: SLOC1 and SLOC2
  • Possible St Loc Values: SLOC1, SLOC2, SLOC3, SLOC4.....which means we only want ZMILL to appear and capture St loc values only if vbap-lgort = SLOC1 and SLOC2
  • Additional Information: A characteristics "STORAGE_LOC" is already present which refers to VBAP-LGORT.


Regards,
Anirban Pahari

Former Member
0 Kudos

If I'm understanding correctly, you want a VC characteristic titled ZMILL to represent the Storage Location in the case that the Storage Location is SLOC1 or SLOC2.  If the Storage Location is SLOC3, or SLOC4, you don't want the field to be filled in.

If that is the case, I'd recommend creating a procedure which will assign that value IF the storage location is equal to your specified value(s) of the dependency code.  Further documentation on VC procedural default dependency is below, but you may need to research a little bit more on how to manipulate variant configuration to achieve what it is you want:

Setting Default Values with Procedures - Variant Configuration (LO-VC) - SAP Library

anirban_pahari
Explorer
0 Kudos

Dear Kelby,

Thanks for the input and the link. After going through the link provided I am still in doubt about how to auto populate the values based on certain conditions? As in the link it describes about to set a default value based on a characteristics value. May be I just need some more insights on the same.

Regards,
Anirban