Skip to Content
0
Former Member
Feb 28, 2009 at 06:41 AM

Not appending

40 Views

hi experts

i have strucked up with at End of usage in my report,

which i already posted and i have tried with another

way,

and its almost solved,,,,,only problem is that

Iam getting the output for the first liine alone rest its coming as 0.00 and 0.00

When i debugged ....the entire first loop is executed

and then it goes to the second loop aappending all values except my wa_final-gross and wa_final-net

i think i have gone somewhere wrong in loopin or i dont know where

please do help me out

My code

sort it_AMOUNT by belnr.

LOOP AT IT_AMOUNT INTO WA_AMOUNT.

If wa_AMOUNT-hkont = '0000500100'.

wa_final-gross = wa_amount-dmbtr.

eNDIF.

If wa_AMOUNT-koart = 'D'.

wa_final-net = wa_amount-dmbtr.

eNDIF .

Endloop.

loop at it_bseg into wa_bseg .

wa_final-kunnr = wa_bseg-kunnr.

wa_final-xref1 = wa_bseg-xref1.

wa_final-xref2 = wa_bseg-xref2.

read table it_bkpf into wa_bkpf with key belnr = wa_bseg-belnr.

if sy-subrc = 0.

wa_final-xblnr = wa_bkpf-xblnr.

wa_final-bldat = wa_bkpf-bldat.

endif.

At end of belnr.

WA_final-gross = wa_amount-gross.

wa_final-net = wa_amount-net.

Endat.

Clear wa_amount.

append wa_final to it_final.

clear wa_final.

Endloop.

OUTPUT

4552 13.07.2006 Entrepreneurshi Bharat 200,600.00 225,153.00

4552 13.07.2006 ge 0.00 0.00

4552 13.07.2006 test 0.00 0.00

;

;

;

;

;