12-29-2014 2:51 PM
Dear All,
I have this scenario: the end user creates an inbound delivery with VL31N and for some positions changes the quantity to 0 (insted of deleting the item from the confirmation). I need to do some development in order to delete those lines - if possible before the delivery is saved.
I checked badi LE_SHP_DELIVERY_PROC and bapi BAPI_INB_DELIVERY_CHANGE.
I may delete those item only from a Z*report using above mentioned bapi - or there is another possibility to use the bapi from the badi, before the delivery is saved?
Regards,
Florina R.
12-31-2014 1:09 PM
Solved.
I used method IF_EX_LE_SHP_DELIVERY_PROC~SAVE_DOCUMENT_PREPARE.
CASE if_trtyp .
WHEN 'H' .
LOOP AT ct_xlips INTO wa_lips
WHERE lfimg = 0 .
IF NOT wa_lips IS INITIAL .
wa_lips-updkz = 'D' .
MODIFY ct_xlips FROM wa_lips .
ENDIF .
ENDLOOP .
WHEN 'V' .
LOOP AT ct_xlips INTO wa_lips
WHERE lfimg = 0 .
IF NOT wa_lips IS INITIAL .
wa_lips-updkz = 'D' .
APPEND wa_lips TO ct_ylips .
ENDIF .
ENDLOOP .
WHEN OTHERS .
ENDCASE .
Useful information:http://scn.sap.com/thread/1756614