2023 Jan 13 5:34 PM
Hello i'm triying to change my quantity to 0 , i really don't know what it can be try.png
This is my code (i think everything looks great)
DATA: lt_return TYPE TABLE OF bapiret2,
ls_header TYPE bapiobdlvhdrchg,
ls_headerx TYPE bapiobdlvhdrctrlchg,
ls_control TYPE bapidlvcontrol,
item_data TYPE bapiobdlvitemchg,
item_ctrl TYPE bapiobdlvitemctrlchg,
lt_item_data TYPE TABLE OF bapiobdlvitemchg,
lt_item_ctrl TYPE TABLE OF bapiobdlvitemctrlchg.
ls_header-deliv_numb = delivery_info-vbeln.
ls_headerx-deliv_numb = delivery_info-vbeln.
ls_control-upd_ind = 'U'.
item_data-deliv_numb = delivery_info-vbeln.
item_data-deliv_item = delivery_info-posnr.
item_data-dlv_qty = 0. "delivery_info-lfimg.
item_data-dlv_qty_imunit = 0. "delivery_info-lips_lgmng.
item_data-del_qty_flo = delivery_info-lips_lfimg_flo.
item_data-dlv_qty_st_flo = delivery_info-lips_lgmng_flo.
item_data-fact_unit_nom = delivery_info-lips_umvkz.
item_data-fact_unit_denom = delivery_info-lips_umvkn.
item_data-conv_fact = delivery_info-lips_umrev.
item_ctrl-deliv_numb = delivery_info-vbeln.
item_ctrl-deliv_item = delivery_info-posnr.
item_ctrl-chg_delqty = abap_true.
APPEND item_data TO lt_item_data.
APPEND item_ctrl TO lt_item_ctrl.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
header_data = ls_header
header_control = ls_headerx
delivery = delivery_info-vbeln
techn_control = ls_control
TABLES
item_data = lt_item_data
item_control = lt_item_ctrl
return = lt_return.
IF lt_return[] IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
2023 Nov 23 7:58 PM