cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting Characteristic Values based on Material

Former Member

Hi all,

We have a CLASS assigned to several Materials. We have a requirement where we need to show specific characteristic values for a given characteristic based on the Material to which it is assigned.

For example, if there is a characteristic called "COLOR" with values Voilet, Indigo, Blue, Green, Yellow, Orange and Red; Material M1 should be allowed only Voilet, Indigo and Blue while Material M2 will be allowed for Green, Yellow, Orange and Red.

I checked the OBJECT DEPENDENCIES and PRECONDITIONS; but most of them are dealing with assigning one char value based on another characteristic.

Any help is highly appreciated.

Thanks

Shashi

Accepted Solutions (0)

Answers (2)

Answers (2)

Ritz
Active Contributor

Shashikanth Nallu,

Its an easy solution , create a referane characterstic and read the sales order material.

Create your dependency comparing the referance characterstic and use it in syntax like below.

to know more on referance characteristic you can use link. Reference Characteristics - Characteristics (CA-CL-CHR) - SAP Library

ex. create REF_MATNR referance characteristic for material  refering to table -filed VBAP-MATNR

Characteristic for colour = COLOUR

write syntax like below

$SELF.COLOUR =  'Voilet' or 'Indigo' or 'Blue' if  $SELF.REF_MATNR = 'M1'

Give it a try and i am sure it will work for you.

Thanks

Ritesh

Flavio
Active Contributor
0 Kudos

Hi Shashi,

A possible solution is to use a reference characteristic to MARA-MATNR and then using it inside Preconditions, that will be allocated to the COLOR characteristic values.

The following steps should hopefully work:

1. Create a reference characteristic, called for instance MARA_MATNR, that is pointing to the table MARA, field MATNR.

To create it, is quite straightforward: in the characteristic 'Additional data' tab, just put the table - field references:

2. Create object dependencies (Precondition type) for the colour to be managed. For instance, we will have one dependency for M1 material colors, another for M2 material ones, etc.

Let's say we will create the first precondition this way:

The other preconditions will follows as applicable, for instance PREC_M2_COLORS for the M2 material allowed colors.

3. Attach the preconditions to the COLOR values, as applicable.

For instance, select the first value 'VIOLET' and follow the menù path 'Extras' - 'Object Dependencies' - 'Assignments':

In the next screen, add the Precondition reference:

Continue this way for the other colors / preconditions.

I hope this will be of some help. In case of any doubt, just let me know.

Thanks and bye,

Flavio