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

BAPI_STDMATERIAL_GETINTNUMBER

Former Member
0 Likes
1,784

I am facing following problem with this BAPI: each time I call this BAPI it gives me new material number, though the previous one is not created. Lets say first time I call it i gets 14 but then material 14 does not get created, then I call BAPI ones more, and it gives med 15 instead of 14.

Does anyone have examples of how to use this BAPI.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,233

Hi Elena,

BAPI_STDMATERIAL_GETINTNUMBER Assign New Internal Numbers for a Material Type.

In SAP Object is mantained under which ranges are provided.

So this BAPI just generates the next no. from the range assigned to that material type . It does not create the material.

For creation of Material use FM BAPI_STANDARDMATERIAL_CREATE or BAPI_MATERIAL_SAVEDATA.

I hope this will clear ur doubts

6 REPLIES 6
Read only

Former Member
0 Likes
1,233

Hi Elena,

When u execute this BAPI, does it end up with an error message or is it successful? Coz if it ends up in an error message, part of the material numbers requested may already have been assigned. These material numbers are contained in the output parameter MATERIAL_NUMBER.

Hence pls get this confirmed.

Reward if useful

Thanks

Nayan

Read only

0 Likes
1,233

No, BAPI does not give any errors.

Read only

Former Member
0 Likes
1,233

This BAPI is basically used to assign new internal numbers for a material type. So when u execute it and it does not give u an error, it means that it has already assigned a new number for your material type, and this process would continue everytime you ecexute the BAPI.

Read only

Former Member
0 Likes
1,234

Hi Elena,

BAPI_STDMATERIAL_GETINTNUMBER Assign New Internal Numbers for a Material Type.

In SAP Object is mantained under which ranges are provided.

So this BAPI just generates the next no. from the range assigned to that material type . It does not create the material.

For creation of Material use FM BAPI_STANDARDMATERIAL_CREATE or BAPI_MATERIAL_SAVEDATA.

I hope this will clear ur doubts

Read only

0 Likes
1,233

Yes, I know that this BAPI does not create material. My program does it afterwards.

But when my program goes wrong, the material is not created, but still the proposed material number is already u201Cusedu201D and BAPI gives me new one when I run my program again.

But I think it is just the way standard SAP works and it is not BAPI error.

I have checked, it is the same situation if I test it manually in MM01.

Read only

0 Likes
1,233

I have alredy told you that when your BAPi executes, an internal number is automatically generated. So even if your program goes into an error, the internal number would already have been generated. There is nothing much you could do abt it.

Thanks

Nayan