07-10-2006 7:39 PM
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?
07-10-2006 7:42 PM
You might try a rollback, but I have feeling even this won't work.
rob
07-10-2006 7:44 PM
07-10-2006 7:56 PM
OK, so if it's test mode, mnake up an arbitrary number and don't call BAPI_MATERIAL_GETINTNUMBER.
Rob
07-10-2006 8:03 PM
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
07-10-2006 8:07 PM
number range would be different for different mat types??
so do i have to pass a dummy number for different mat types?
07-10-2006 8:09 PM
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
07-10-2006 8:26 PM
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?