‎2011 Jan 05 10:59 AM
Hi Experts,
My piece of code -
CASE int_edidd-segnam.
WHEN c_E1EDK01.
IF xekpo-loekz = c_loekz.
CLEAR xekpo-brgew.
ENDIF.
wa_idoc_data-segnam = 'ZE1EDK01'.
wa_idoc_data-psgnum = int_edidd-segnum.
CLEAR : lv_menge.
For sum the quantity on header
LOOP AT xekpo INTO wa_ekpo WHERE loekz <> c_loekz.
lv_menge = lv_menge + wa_ekpo-menge.
ENDLOOP.
wa_data_header-menge = lv_menge.
wa_idoc_data-sdata = wa_data_header .
APPEND wa_idoc_data TO int_edidd.
CLEAR :wa_idoc_data.
*ENDIF.
when 'E1EDKA1'.
wa_idoc_data-segnam = 'ZE1EDKA2'.
wa_idoc_data-psgnum = int_edidd-segnum.
*For Container number
wa_data-zcontainer = dekko-zzconnum.
wa_idoc_data-sdata = wa_data .
APPEND wa_idoc_data TO int_edidd.
CLEAR :wa_idoc_data.
ENDCASE.
I have check at debugging and found that int_edidd-segnam does not change that is the reason that 'E1EDKA1' segment does not get triggered.
Please give your valuable suggestion <priority reduced by moderator>.
Thanks,
Sahil
Edited by: Thomas Zloch on Jan 5, 2011 12:56 PM
‎2011 Jan 05 11:26 AM
Hi,
I hope your code is in loop on int_edidd internal table.
Regards,
Himanshu
‎2011 Jan 05 11:44 AM
Hi,
check the EDIDC table DOCTY,CIMTYP...
when ever the CIMTYP(idoc Extension comes ) read the segment and write your code...
example code..
loop at int_edidd where segnam = 'E1EDKA1'.
if control_record_out-cimtyp eq 'ZORDSCH5'. "Extension idoc
"Modify or Append new record..
endif.
endloop.
Prabhudas