Application Development 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: 

BAPI_MATERIAL_GETINTNUMBER

Former Member
0 Kudos

The material number should be automatically generated so i am using BAPI_MATERIAL_GETINTNUMBER

to generate the material number and then pass the material number to the BAPI_MATERIAL_SAVEDATA.

The program needs to be run in test mode so the number has to be passed but not commiting so that

the material is not created.

My question is the next time we run the program in the run mode then it will be be skipping the

test mode generated material numbers and creates new numbers. How do i deal with this?

7 REPLIES 7

Former Member
0 Kudos

You might try a rollback, but I have feeling even this won't work.

rob

Former Member
0 Kudos

yes rollback does not work

0 Kudos

OK, so if it's test mode, mnake up an arbitrary number and don't call BAPI_MATERIAL_GETINTNUMBER.

Rob

Manohar2u
Active Contributor
0 Kudos

I don't think you can avoid running numbers.

Only way is to use a seperate number range for this, and i dont think its a good option.

Regds

Manohar

Former Member
0 Kudos

number range would be different for different mat types??

so do i have to pass a dummy number for different mat types?

Manohar2u
Active Contributor
0 Kudos

Then if you are doing test ( if no one is exececuting/creating materials in mean time) then you can reset the number ranges back in SNRO.

Regds

Manohar

Former Member
0 Kudos

You cannot avoid it if you are using internal number range. Everytime you read the number range, it will update the number range's next number automatically, whether the material is created or not. So you have no way of controlling that behaviour.

What is the purpose of 'test' mode? Can you switch to external numbering when testing?