Application Development 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: 

I get 'Update was Terminated' when i use BAPI_PO_CREATE1 & BAPI_PO_CHANGE?

Former Member
0 Kudos

hi friends,

my prog. flow is like this

1.) create po using bapi_po_create1

2.) bapi_transaction_commit with wait = 'X'.

3.) change the po created thru bapi_po_create1 using bapi_po_change.

4.) bapi_transaction_commit with wait = 'X'.

am getting the express document terminated dialog box and i can see the values not getting changed in the po..getting data inconsistencies...what is the cause of this and how to overcome? both the updates are V1 and i need both of them synchronously. from the library i can see that, we should use COMMIT WORK AND WAIT, but this -- bapi_transaction_commit with wait = 'X' does the same, right? pl advise

Sathish R

1 ACCEPTED SOLUTION

Former Member
0 Kudos

before calling BAPI_PO_CHANGE

gv_bapi_po_change = 'X'.

EXPORT gv_bapi_po_change FROM gv_bapi_po_change TO MEMORY ID 'BAPIPO'.

WAIT UP TO 1 SECONDS.

CALL FUNCTION 'BAPI_PO_CHANGE'

AFTEr that CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

with out any parameters.

2 REPLIES 2

Former Member
0 Kudos

before calling BAPI_PO_CHANGE

gv_bapi_po_change = 'X'.

EXPORT gv_bapi_po_change FROM gv_bapi_po_change TO MEMORY ID 'BAPIPO'.

WAIT UP TO 1 SECONDS.

CALL FUNCTION 'BAPI_PO_CHANGE'

AFTEr that CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

with out any parameters.

Former Member
0 Kudos

Hai,

Call Function Module DEQUEUE_ALL with parameter _SYNCHRON = 'X' after calling function module

bapi_transaction_commit with wait = 'X'.