2009 Oct 18 7:56 AM
Hello Everybody..
I am using BAPI "BAPI_MATERIAL_SAVEDATA" for Material master Upload and extension.
When ever I have material number in flat file, it will extend the material.
But when matnr is not provided the it will create material.
As that BAPI doesnot provide internal number , so i am creating a number using BAPI " BAPI_MATERIAL_GETINTNUMBER".
Everything is working fine.
Now my problem is..
in a flat fiel , if we have any error data, then material is not been created.
But as we are already generating a number externally. That sequence number is wasted.
My users want to avoid this.
So please suggest me, how to revert back the material number if BAPI_MATERIAL_SAVEDATA is not successfull.
So that in next run it can you same sequence number.
Thanks in Advance.
Regards
Ravi
2009 Oct 18 3:28 PM
Hello,
This is a problem that a lot of customers have, not only when creating materials also with other objects.
Problem is that once the function module BAPI_MATERIAL_GETINTNUMBER is called to get a new number the number range is already updated and committed, this means there is no way back.
You can even test this in SE37 execute the function module and you will see that the number range is already updated.
Even when you perform a roll back in your program or don't save the material the number range will be updated.
I hope this is usefull.
Wim
2009 Oct 18 3:28 PM
Hello,
This is a problem that a lot of customers have, not only when creating materials also with other objects.
Problem is that once the function module BAPI_MATERIAL_GETINTNUMBER is called to get a new number the number range is already updated and committed, this means there is no way back.
You can even test this in SE37 execute the function module and you will see that the number range is already updated.
Even when you perform a roll back in your program or don't save the material the number range will be updated.
I hope this is usefull.
Wim
2009 Oct 18 9:08 PM
I am doubting if we have any option to rollback [Programming Methods with Parameters|http://help.sap.com/saphelp_NW70EHP1/helpdata/en/c5/e4ad64453d11d189430000e829fbbd/content.htm]