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

WS_DELIVERY_UPDATE

Former Member
0 Likes
1,349

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.

1 REPLY 1
Read only

former_member222709
Contributor
0 Likes
874

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.