2012 May 30 2:59 PM
Hello all,
I am using the FM ws_deliver_update within a loop to update all the deliveries in the shipment. I am facing an issue that out of 2 only one delivery gets updated and the other does not. The fields i am updating are :lgtor and lgbzo. I have passed X for KZTOR and KZLGBZO in vbkok_wa.
I have passed the following parameters:
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = wa_vbkok
commit = 'X'
delivery = wa_likp-vbeln
EXCEPTIONS
error_message = 1
OTHERS = 2.
Hello all,
I am using the FM ws_deliver_update within a loop to update all the deliveries in the shipment. I am facing an issue that out of 2 only one delivery gets updated and the other does not. The fields i am updating are :lgtor and lgbzo. I have passed X for KZTOR and KZLGBZO in vbkok_wa.
I have passed the following parameters:
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = wa_vbkok
commit = 'X'
delivery = wa_likp-vbeln
EXCEPTIONS
error_message = 1
OTHERS = 2.
2012 May 30 5:10 PM
Hi Arjun,
I believe you need to add a Commit Work and Wait statement after the execution of FM 'WS_DELIVERY_UPDATE'. Due to a delay in database commit, 1 of the updates is missed.
Use BAPI_TRANSACTION_COMMIT and check if it's return parameter is initial. There may be some errors in that case the return parameter will have some value.
Regards, Pranav.