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

BAPI_TRANSACTION_COMMIT is not working properly

Former Member
0 Likes
1,111

Dear All ,

In our report , we are calling BAPI_PO_CHANGE which deletes one line item and creates two new line items . After the Bapi we are calling BAPI_TRANSACTION_COMMIT with wait = 'X' . For the first time , the program is working fine . When we come back and call again BAPI_PO_CHANGE , we are getting an error "An error occured when numbering the items" .

When i debug the BAPI_PO_CHANGE , there is a table POT with field " ID " . This ID contains 1, 2 ,3 ,4 ..etc for the first time .

When we call again the BAPI_PO_CHANGE , this ID in the POT table contains 115,116,117....etc .

This POT table needs to be refreshed but it is not happening in BAPI_TRANSACTION_COMMIT . How to refresh the POT table ?

Can anybody help on this . Thanks in advance

Regards,

Senthil .

5 REPLIES 5
Read only

lijisusan_mathews
Active Contributor
0 Likes
814

BAPI_TRANSACTION_COMMIT is supposed to Commit the changes made. not to refresh the data in BAPI_PO_CHANGE.

You will have to refresh the tables you pass to the bapi_po_change manually.

Read only

0 Likes
814

Hi ,

This POT table is inside the BAPI_PO_CHANGE and we dont have any control on that table .

Read only

0 Likes
814

Try refreshing the tables and import export parameters that you are passing to it after the commit

Read only

0 Likes
814

Hi,

Try caling the FM MEPO_DOC_INITIALIZE after commit work or call subroutine PERFORM MEPO_REFRESH(saplmepo).

This refreshes the table pot.

With regards,

Vamsi

Read only

Former Member
0 Likes
814

1. BAPI_PO_CREATE1 (To Create a standard Purchase Order)

2. BAPI_TRANSACTION_COMMIT (To Commit Work)