Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_OUTB_DELIVERY_CONFIRM_DEC

I'm trying to change the field VEKP-INHALT using BAPI_OUTB_DELIVERY_CONFIRM_DEC. However, nothing gets updated and no error messages are returned. Has anyone used this BAPI before? Here is my code:

select single * from vekp where venum eq i_venum.

if sy-subrc eq 0.

data: HEADER_DATA like

BAPIOBDLVHDRCON,

HEADER_CONTROL like

BAPIOBDLVHDRCTRLCON,

DELIVERY like

BAPIOBDLVHDRCON-DELIV_NUMB,

TECHN_CONTROL like

BAPIDLVCONTROL.

data: HANDLING_UNIT_HEADER like BAPIDLVHDUNHDR

occurs 0 with header line,

HANDLING_UNIT_ITEM like BAPIDLVHDUNITM

occurs 0 with header line,

RETURN2 like BAPIRET2

occurs 0 with header line.

HEADER_DATA-deliv_numb = vekp-vpobjkey.

HEADER_CONTROL-deliv_numb = vekp-vpobjkey.

DELIVERY = vekp-vpobjkey.

HANDLING_UNIT_HEADER-DELIV_NUMB = vekp-vpobjkey.

HANDLING_UNIT_HEADER-CONTENT = '1234567890'.

append HANDLING_UNIT_HEADER.

select * from vepo where venum eq vekp-venum.

HANDLING_UNIT_ITEM-HDL_UNIT_INTO = vepo-venum.

HANDLING_UNIT_ITEM-HDL_UNIT_EXID_INTO = vekp-exidv.

HANDLING_UNIT_ITEM-DELIV_NUMB = vepo-vbeln.

HANDLING_UNIT_ITEM-DELIV_ITEM = vepo-posnr.

HANDLING_UNIT_ITEM-PACK_QTY = vepo-vemng.

HANDLING_UNIT_ITEM-PACK_QTY_BASE = vepo-vemng.

HANDLING_UNIT_ITEM-MATERIAL = vepo-matnr.

HANDLING_UNIT_ITEM-HU_ITEM_TYPE = vepo-velin.

HANDLING_UNIT_ITEM-SALES_UNIT = vepo-vemeh.

HANDLING_UNIT_ITEM-BASE_UOM = vepo-vemeh.

append HANDLING_UNIT_ITEM.

endselect.

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'

EXPORTING

HEADER_DATA = HEADER_DATA

HEADER_CONTROL = HEADER_CONTROL

DELIVERY = DELIVERY

TECHN_CONTROL = TECHN_CONTROL

TABLES

HANDLING_UNIT_HEADER = HANDLING_UNIT_HEADER

HANDLING_UNIT_ITEM = HANDLING_UNIT_ITEM

RETURN = RETURN2

  • TOKENREFERENCE = TOKENREFERENCE

EXCEPTIONS

OTHERS = 1.

commit work.

Tags:
Not what you were looking for? View more on this topic or Ask a question