‎2011 Jul 22 6:17 AM
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 .
‎2011 Jul 22 6:22 AM
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.
‎2011 Jul 22 6:40 AM
Hi ,
This POT table is inside the BAPI_PO_CHANGE and we dont have any control on that table .
‎2011 Jul 22 6:57 AM
Try refreshing the tables and import export parameters that you are passing to it after the commit
‎2011 Jul 22 7:18 AM
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
‎2011 Jul 22 6:33 AM
1. BAPI_PO_CREATE1 (To Create a standard Purchase Order)
2. BAPI_TRANSACTION_COMMIT (To Commit Work)