Skip to Content
0
Former Member
Aug 05, 2016 at 08:22 AM

Delivery update bapi is successful, but delivery is not updated.

341 Views

The scenario is to update a tracking number field (ZTRACK_NO) in the custom tab of the Delivery Header. I am using the BAPI: BAPI_OUTB_DELIVERY_CHANGE with extension parameter.

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'

EXPORTING

HEADER_DATA = GS_HEADER_DATA

HEADER_CONTROL = GS_HEADER_CONTROL

DELIVERY = GS_DLVRY

TABLES

EXTENSION2 = GT_EXTENSION2

RETURN = GT_RETURN.

if GT_RETURN[] is initial.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = c_x.

endif

This is working perfectly in most of the cases, but in some scenarios, the bapi is successful but the delivery is not updated with the tracking number.

Out of 2000 delivery records, 1800 records got updated correctly, but random 200 records are not updated. The interesting part is: bapi RETURN is initial (success) in all the cases.

Can you think about any functional scenario where this happens? I am absolutely clueless about this issue.

Please help......