‎2009 Dec 02 2:28 PM
Hi All,
I am facing problem during batch updation. There is one RF program for creation of goods movement. After material document is created the batch needs to be updated. I have called BAPI_BATCH_CHANGE for updating country of origin, vendor batch and Z function module for updating revision level. Sometimes all fields gets updated properly and sometimes they dont. I have debug program and there is no coding problem. If i debug then all fields get updated properly. I am unable to trace then error. Is this logical database problem? If not then what can be the issue.
Please help.
Thanks in advance.
Regards,
Shobhit
‎2009 Dec 02 2:54 PM
If I understand you correctly you are updating the batch number which was used in the material document generated.
Are you calling BAPI to update batch just after goods movement bapi ?
If yes then just try to display ( by write or storing in custom table ) the error message when you are not in debug mode , most probably batch is still locked by the goods mvt BAPI by the time it executes batch update .
Just check by checking the message if its the locking issue , because you are not getting error in debug mode.
‎2009 Dec 02 3:00 PM
Hi Shobhit,
Are you using the FM BAPI_TRANSACTION_COMMIT, to commit after the BAPI is called, if yes, this might be causing the data not to be saved for the customer function module, when you use the COMMIT, all the LUW will be cleared and the the data after commit won't be saved....
so do the COMMIT work, after your customer function module, or call your function module before the BAPI,,,,once all FM's are called, then do the commit, it will work.
Thanks,
Srini.
‎2009 Dec 07 10:04 PM
‎2009 Dec 02 2:56 PM
Hi,
Have u used BAPI_TRANSACTION_COMMIT after updation of first entrry, If not try this it will help you to fix the issue.
Regards,
Bysani.