10-23-2007 4:03 PM
Hi,
I want to add/delete a line item from Sales Order BOM. So I populated E1STPON segment in BOMORD01 IDoc type and processing it. When I keep wa_e1stpon-lkenz = space, I am able to add an item into Sales Order BOM, for deletion I have kept wa_e1stpon-lkenz = 'X'. After processing I am getting a message saying "Item (1) L 30HK410223 00000000000000000000000000000000 ignored (deletion indicator)".
Below is my code, could you please tell what I am missing:
v_lkenz = 'X'.
v_msgfn = '004'. "Change: Message contains changes
Fill E1STZUM - Master BOM (STZU) Segment.
wa_e1stzum-msgfn = v_msgfn.
wa_e1stzum-stlty = 'K'. "Sales order BOM
wa_e1stzum-stlan = wa_input-stlan.
Fill E1KDSTM - Sales Order - Bill of Material Segment.
wa_e1kdstm-msgfn = v_msgfn.
wa_e1kdstm-vbeln = wa_input-vbeln.
wa_e1kdstm-vbpos = wa_input-posnr.
wa_e1kdstm-matnr = wa_input-matnr.
wa_e1kdstm-stlan = wa_input-stlan.
Fill E1STPON - Master Bill Of Material Item Segment.
wa_e1stpon-msgfn = v_msgfn.
wa_e1stpon-id_itm_ctg = wa_input-postp.
wa_e1stpon-id_comp = wa_input-idnrk.
wa_e1stpon-datuv = sy-datum.
wa_e1stpon-lkenz = v_lkenz.
wa_e1stpon-idnrk = wa_input-idnrk.
wa_e1stpon-postp = wa_input-postp.
wa_e1stpon-menge = wa_input-menge.
wa_e1stpon-rvrel = 'X'.
Thanks in advance.
Regards,
Balaji Viswanath.
10-30-2007 2:01 PM
I customized IDOC_INPUT_BOMORD function module and setting memory id flg_ale = space.
Regards,
Balaji Viswanath