cancel
Showing results for 
Search instead for 
Did you mean: 

Create Variant material while creating generic material using FM:WRF_MATERIAL_MAINTAINDATA_RT

0 Kudos
547

Kindly advise what to pass in Table VARIANTSKEYS of FM WRF_MATERIAL_MAINTAINDATA_RT.

I am passing the concatenated value of generic material code plus 001 , its not creating.

Accepted Solutions (0)

Answers (1)

Answers (1)

paul_gendreau
Contributor
0 Kudos

Have a look at this classic: https://blogs.sap.com/2014/12/04/create-generic-and-variants-using-lsmw/ for a more complete answer.

Here you see an example of the MATERIAL and VARIANT fields being populated in an IDoc, which is no different than the same structures in the function module.

MATERIAL is filled with the Generic article number, and VARIANT is filled with the Variant Article number. Keep in mind that if the Article Number is numeric that you will, of course, fill both MATERIAL and VARIANT with leading zeros to 18 characters (Article 1000 will be filled MATERIAL as 000000000000001000 and VARIANT as 000000000001000001).