04-19-2007 5:12 PM
Hello All...
some coding
LOOP AT t_fkkcoll.
Check Amount border low <= BETRW
If ht_betrw_range-LOW <= t_fkkcoll-BETRW and h_count = 1.
h_count = h_count + 1.
delete t_fkkcoll[].
clear t_fkkcoll.
endif.
endloop.
Clear h_count.
-
t_fkkcoll
Key Value
001 100
002 200
003 500
-
my Questions:
-
How can i leave the Loop at the Value 500 and delete all other entry from the l_tkkcol ???
my goal.
-
1. each individual voucher of a VK/a GP does not lie below the border -- a delivery
2. mind. 1 voucher lies over the lower bound -- all vouchers are delivered
BSp : The Border ist 5 the values are 1 2 3 4 - do nothing
The Border ist 5 the values are 1 3 5 6 - all vouchers are delivered
Thanks for Help.
Chris
04-19-2007 6:15 PM
Hi. It might be easier to move the record to a temporary area once you find the one that you want, clear the table, and then move it back. Here is what I mean:
LOOP AT t_fkkcoll.
IF t_fkkcoll-value = '500'.
wa_fkkcoll = t_fkkcoll. "saves the record you want
EXIT.
ENDIF.
ENDLOOP.
CLEAR t_fkkcoll. "clears the header line
CLEAR t_fkkcoll[]. "clears the table rows
APPEND wa_fkkcoll TO t_fkkcoll. "moves your record back in
I hope this helps.
- April King
04-19-2007 5:21 PM
Hi Christian ,
I couldn' t get your problem right but if you want to delete records from your internal table from certain point you can use like
delete itab from 3 ." here 3 can be your index
Regards
Caglar
04-19-2007 5:25 PM
And you can leave the loop as
loop at t_fkkcoll.
if t_fkkcoll-value = 500.
exit.
endif.
endloop.
Regards
Caglar
Message was edited by:
Caglar Ozkor
04-19-2007 6:15 PM
Hi. It might be easier to move the record to a temporary area once you find the one that you want, clear the table, and then move it back. Here is what I mean:
LOOP AT t_fkkcoll.
IF t_fkkcoll-value = '500'.
wa_fkkcoll = t_fkkcoll. "saves the record you want
EXIT.
ENDIF.
ENDLOOP.
CLEAR t_fkkcoll. "clears the header line
CLEAR t_fkkcoll[]. "clears the table rows
APPEND wa_fkkcoll TO t_fkkcoll. "moves your record back in
I hope this helps.
- April King