Skip to Content
0
Former Member
Mar 27, 2006 at 09:28 AM

BAPI_OUTB_DELIVERY_CONFIRM_DEC problem in change quantity.

89 Views

Dear all,

I used BAPI_OUTB_DELIVERY_CONFIRM_DEC to PGI . And I also want to change the delivered quantity.

But the bapi did not work . What's the problem?

DATA: BAPI_Z05DOGI_DELIVERY LIKE BAPIOBDLVHDRCON-DELIV_NUMB ,

BAPI_Z05DOGI_HEADER_DATA LIKE BAPIOBDLVHDRCON OCCURS 0 WITH HEADER LINE ,

BAPI_Z05DOGI_HEADER_CONTROL LIKE BAPIOBDLVHDRCTRLCON OCCURS 0 WITH HEADER LINE,

BAPI_Z05DOGI_ITEM_DATA LIKE BAPIOBDLVITEMCON OCCURS 0 WITH HEADER LINE,

BAPI_Z05DOGI_ITEM_CONTROL LIKE BAPIOBDLVITEMCTRLCON OCCURS 0 WITH HEADER LINE ,

BAPI_Z05DOGI_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE .

CLEAR: BAPI_Z05DOGI_DELIVERY , BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA ,BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .

REFRESH: BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA , BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .

BAPI_Z05DOGI_DELIVERY = ZMM_WB1-ISSUE .

BAPI_Z05DOGI_HEADER_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.

APPEND BAPI_Z05DOGI_HEADER_DATA.

BAPI_Z05DOGI_HEADER_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.

BAPI_Z05DOGI_HEADER_CONTROL-POST_GI_FLG = 'X'.

APPEND BAPI_Z05DOGI_HEADER_CONTROL.

BAPI_Z05DOGI_ITEM_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.

BAPI_Z05DOGI_ITEM_DATA-DELIV_ITEM = 10.

BAPI_Z05DOGI_ITEM_DATA-DLV_QTY = XTAB-LFIMG.

BAPI_Z05DOGI_ITEM_DATA-SALES_UNIT = XTAB-MEINS.

BAPI_Z05DOGI_ITEM_DATA-DLV_QTY_IMUNIT = XTAB-LFIMG.

APPEND BAPI_Z05DOGI_ITEM_DATA.

BAPI_Z05DOGI_ITEM_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.

BAPI_Z05DOGI_ITEM_CONTROL-DELIV_ITEM = 10.

BAPI_Z05DOGI_ITEM_CONTROL-CHG_DELQTY = 'X'.

APPEND BAPI_Z05DOGI_ITEM_CONTROL.

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'

EXPORTING

DELIVERY = BAPI_Z05DOGI_DELIVERY

HEADER_DATA = BAPI_Z05DOGI_HEADER_DATA

HEADER_CONTROL = BAPI_Z05DOGI_HEADER_CONTROL

TABLES

ITEM_DATA = BAPI_Z05DOGI_ITEM_DATA

ITEM_CONTROL = BAPI_Z05DOGI_ITEM_CONTROL

RETURN = BAPI_Z05DOGI_RETURN.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

IMPORTING

RETURN = BAPI_Z05DOGI_RETURN.

Can anybody help me ? Thanks very much indeed.

Thanks and Best Regards.