Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Inbound delivery - BAPI_INB_DELIVERY_CHANGE

Former Member
0 Kudos

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.


1 REPLY 1

Former Member
0 Kudos

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