cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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......

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Can you confirm if there is any BATCH split scenario. Alternatively you may ask ABAP developer to check any particular pattern with those 200 deliveries.

Batch Split in the Decentralized WMS

If you change a batch subitem from a distributed outbound delivery in the decentralized WMS, then this batch subitem already exists in the central ERP system.

The fields HIERARITEM and USEHIERITM are empty. The system copies the batch subitem in the DELIV_ITEM field.

If you change the quantity of a batch main item from a distributed outbound
delivery in the decentralized WMS, then this batch main item already exists in
the central ERP system.

      The fields

HIERARITEM

      and

USEHIERITM

      are empty. The system

      copies the batch subitem into the

DELIV_ITEM

    field.

  • If you perform a batch split for a distributed outbound delivery in the
    decentralized WMS, only the batch main item exists at that time in the central
    ERP system.

      If, for example, you create two batch subitems, three item segments

ItemData

    are generated for transmission to the central ERP system:

    • The item segment for the batch main item HIERARITEM is
      empty.

      The delivery quantity and base quantity are empty.

    • For each subitem, the system generates an item segment with the following
      fields:

DELIV_ITEM

      contains the number of the batch subitem.

HIERARITEM

      contains the number of the batch main item.

USEHIERITM

        with value

1

        shows that the subitem is used as

      a batch subitem.

      The quantity fields match the quantities in the batch subitems.

      The central ERP system performs the batch split subsequently for the

    distributed outbound delivery.

Parameters

former_member569532
Participant
0 Kudos

Hi,


Sometimes it will take time update the tables.Please use wait up to statement.

Ex: Wait upto 5 secs.