‎2012 Nov 06 12:34 PM
Dear SAP friends,
I am trying to create a material using BAPI _MATERIAL_SAVEDATA but error RETURNS "M2 262 Enter a material number". What will be the problem? I passed all other mandatory values to that function module.
if i configure a material type (number range) internally? I can solve this problem? If yes kindly tell me step by step that how to configure a material type internally.
Or
Pls tell me how to create a material without giving MATNR using BAPI _MATERIAL_SAVEDATA.....
Thanks in advance.
Janaraja
‎2012 Nov 06 12:44 PM
Use BAPI_STDMATERIAL_GETINTNUMBER to get a values to pass to BAPI_MATERIAL_SAVEDATA.
(And read the BAPI HEADDATA parameter documentation )
o MATERIAL
Only external number assignment is supported for the material number
(MATERIAL). If you want the material number to be assigned
internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
called. This method determines an internal number for the material
to be created. You must enter this internal number in field
HEADDATA-MATERIAL.
Regards,
Raymond
‎2012 Nov 06 12:44 PM
Use BAPI_STDMATERIAL_GETINTNUMBER to get a values to pass to BAPI_MATERIAL_SAVEDATA.
(And read the BAPI HEADDATA parameter documentation )
o MATERIAL
Only external number assignment is supported for the material number
(MATERIAL). If you want the material number to be assigned
internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
called. This method determines an internal number for the material
to be created. You must enter this internal number in field
HEADDATA-MATERIAL.
Regards,
Raymond