Hi All,
I have DEPT DOCTORNAME NATINALITY ADMISSION DISCARGES ALIVE DEAD
SEVEN FIELDS andi am getting records in itab and finaaly appending to itab1
in the loop and endloop .the problem is if i found the condition below i need to count the record , but my count is coming always 1 , pls suggest the best way.
if wa_final-bewty eq '1'.
lv_count = 0.
lv_count = lv_count + 1.
add lv_count to t_final-count.
ENDIF.
APPEND T_FINAL TO T_FINAL1.
endloop.
regards
subbara
why are you intializing it to 0 when condition is satisfied you can intialize lv_count outside loop and in loop you increment
its value if condtion is satisfied.
Hi,
I agree with Kishan P.
you initializing count in the loop.
what you can do is clear the vairable once before the loop.
clear count.
loop at itab.
code.
endloop.
please debug before posting. It helps to give you better understanding of the flow of your code and you catch the errors faster.
Regards,
Sakshi
Add a comment