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

Problem during updating batch master

Former Member
0 Likes
1,139

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

4 REPLIES 4
Read only

Former Member
0 Likes
730

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.

Read only

0 Likes
730

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.

Read only

0 Likes
730

if your issue resolved, please close the thread.

Read only

Former Member
0 Likes
730

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.