Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

I can not create material using BAPI _MATERIAL_SAVEDATA?

Former Member
0 Likes
1,650

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

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
987

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

1 REPLY 1
Read only

RaymondGiuseppi
Active Contributor
0 Likes
988

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