hi gurus....
my output is coming correctly with a small problem which iam not
not able to spot it out . My output is correct till 6100000004 having 2 line items but
6100000004 is reapeating the 2 line items again and 6100000002 details which has to be cleared
but showing in the output,,,,wat shud solve the problem, i have given clear too
sort it_ekko by ebeln.
sort it_bseg by belnr.
loop at it_bseg into wa_bseg .
wa_final-ebeln = wa_bseg-ebeln.
read table it_bkpf into wa_bkpf with key belnr = wa_bseg-belnr.
if sy-subrc = 0 .
wa_final-budat = wa_bkpf-budat.
endif.
read table it_lfa1 into wa_lfa1 with key lifnr = wa_bseg-lifnr.
if sy-subrc = 0.
wa_final-name1 = wa_lfa1-name1.
wa_final-ort01 = wa_lfa1-ort01.
Endif.
read table it_J_1IMOVEND into wa_J_1IMOVEND with key lifnr = wa_bseg-lifnr.
if sy-subrc = 0.
wa_final-J_1ILSTNO = wa_J_1IMOVEND-J_1ILSTNO.
endif.
loop at it_ekpo into wa_ekpo where ebeln = wa_bseg-ebeln .
wa_final-ematn = wa_ekpo-ematn.
wa_final-txz01 = wa_ekpo-txz01.
wa_final-menge = wa_ekpo-menge.
wa_final-netwr = wa_ekpo-netwr.
wa_final-navnw = wa_ekpo-navnw.
wa_final-effwr = wa_ekpo-effwr.
append wa_final to it_final.
Endloop.
clear : wa_bkpf, wa_bseg, Wa_lfa1, wa_J_1IMOVEND , wa_ekko, wa_ekpo, wa_final.
Endloop.
6100000001 10.03.2007 Homecast Co., Ltd Korea 000000000030000000 10.000 450.00 0.00 0.00 450.00 6100000002 10.03.2007 Homecast Co., Ltd Korea 000000000030000000 10.000 450.00 0.00 0.00 450.00 6100000003 10.03.2007 Homecast Co., Ltd Korea 000000000030000000 1.000 45.00 0.00 0.00 45.00 6100000004 11.03.2007 Homecast Co., Ltd Korea 000000000030000000 3.000 135.00 0.00 0.00 135.00 6100000004 11.03.2007 Homecast Co., Ltd Korea 000000000030000000 4.000 180.00 0.00 0.00 180.00 6100000004 11.03.2007 Homecast Co., Ltd Korea 000000000030000000 3.000 135.00 0.00 0.00 135.00 6100000004 11.03.2007 Homecast Co., Ltd Korea 000000000030000000 4.000 180.00 0.00 0.00 180.00 6100000002 10.03.2007 000000000030000000 10.000 450.00 0.00 0.00 450.00