Hello, We are trying to remove billing block from delivery via a custom program using BAPI_OUTB_DELIVERY_CHANGE. Set the header DLV_BLOCK field to blank and DLV_BLOCK_FLAG field to 'X'. and populated delivery number on both the header structures. However, the Delivery document is not being updated. Please let me know any suggestions for updating the billing block via a custom program.
*-Populate the header structures---
S_BAPI_DELIVERY_HDR-DELIV_NUMB = PI_VBELN.
S_BAPI_DELIVERY_HDR-DLV_BLOCK = ''.
S_BAPI_DELIVERY_HDRX-DELIV_NUMB = PI_VBELN.
S_BAPI_DELIVERY_HDRX-DLV_BLOCK_FLG = C_YES.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
HEADER_DATA = S_BAPI_DELIVERY_HDR
HEADER_CONTROL = S_BAPI_DELIVERY_HDRX
DELIVERY = PI_VBELN
TABLES
EXTENSION2 = LT_EXT2
RETURN = T_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Thanks in Advance,
Zack.