Skip to Content
0
Former Member
Mar 26, 2009 at 05:54 AM

not appending properly

30 Views

I have a problem in my report where

i have made a loop at it_pos into wa_pos

;

;

;

;

in my Read statment

READ TABLE it_bseg INTO wa_bseg WITH KEY belnr = wa_pos-belnr.

IF sy-subrc = 0.

wa_final-gross = wa_bseg-dmbtr.

endif.

iF WA_BSEG-HKONT = '0000500100'.

WA_FINAL-NET = WA_BSEG-DMBTR.

Endif.

if wa_bseg-hkont = '0000301500 '.

wa_final-sertax = wa_bseg-dmbtr.

Endif.

APPEND wa_final TO it_final.

CLEAR: wa_final, wa_kna1, wa_bseg, wa_adv, wa_brand.

ENDLOOP.

.............

my problem is while debugging iam getting all the Gl(hkont) correctly but all the amount

gets updated in wa_final-gross field itself.

i.e for every gl(hkont) it has to corresponding get into that field

ie if hkont = '000301500'

it has to be filled in my wa_final-sertax and so....

but instead it gets filled in my wa_Final-gross itself .

so therefore

gross and net is getting filled in the alv but it is shatered and comes alternatively jumbled.

what to do ... help me out

tjhanx in advance