cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Material number of the characteristics value using FM/BAPI?

Former Member
0 Kudos

Hi Experts,

I have VC characteristics and its values now. I want to get the Material Number of the each characteristics value.

Eg: CAR COLOR is a VC characterisctic

       and GREEN, BLUE, RED is its value

  Here I want to get the Material number of the CAR COLOR-GREEN.

Is there any FM or BAPI to get Material number?

Thanks,

Ram

Accepted Solutions (0)

Answers (1)

Answers (1)

Flavio
Active Contributor
0 Kudos

Hi Ram,

In case of VC characteristics that are used in a Variant Class (class type 300), it's possible to make use of the FM 'CLIBSEL_SELECT_OBJECTS'.

This FM is used in the Transaction Code CL30N, include LCLSCF27.

The way to call it is quite straightforward.

First of all, we need to get the internal characteristic number (ATINN) from table CABN, starting from the characteristic name (ATNAM).

Then, we need to get the internal counter value (ATZHL) from table CAWN, starting from the above characteristic internal number and the characteristic value we need to search for.

Now, we need to know which class is using the characteristic, and for that there is the FM 'CTWUL_CHARACT_USAGE'. The class internal number is needed to fill the I_RANGE_CLASSES structure.

We can now fill in the structures needed to call the 'CLIBSEL_SELECT_OBJECTS' function:

I_CLASS_TYPE is 300

I_MAX_RECORDS to be set as you wish

I_QUERY will contain the characteristic selection ( here, set the field SLCOD to 1 )

I_RANGE_CLASSES will contain the class selection (class internal number)

I_RANGE_OBJECT_TYPES will contain the reference to the table MARC

Finally, after calling the FM, the structure E_OBJECTS ( field OBJECT ) will contain the material codes and plant that are using the characteristic value.

Hope this could be of some help.

Feel free to ask me in case of doubts.

Thank you and bye,

Flavio

Former Member
0 Kudos

Hi Flavio,

Thanks for your Help.

I tried the above steps. But I couldnt get the article number, FM CALL FUNCTION 'IBSEL_SELECT_OBJECTS' inside the CLIBSEL_SELECT_OBJECTS is not returning any value.

But my actual requirement is I want to get the price of each Characteristics value.

I though I would get the price based on the material number of the Characteristics value.

Is there any other way?

Thanks,

Ram