06-08-2008 3:03 AM
I want to read an entry from an internal table, something like this
SELECT * from itab into workarea
where linenumber = sourcecounter
ENDSELECT.
it works perfectly with DB tables. Not so with internal tables. how to get along with this?
I want to loop backwards in an internal table till a certain condition is met, is there a way to do it.
starting from the start with forwards looping will be too time consuming.
Thanks for your answers,
Binko
Edited by: Binko Binev on Jun 8, 2008 4:24 AM
06-08-2008 6:03 AM
If there is a single entry to be read from the internal table then you can use Read Table Itab with key <condition> binary search.
If you are going to read multille records from internal table then use Loop at Itab where <condition>...endloop.
I hope this is what you were looking for.
06-08-2008 6:03 AM
If there is a single entry to be read from the internal table then you can use Read Table Itab with key <condition> binary search.
If you are going to read multille records from internal table then use Loop at Itab where <condition>...endloop.
I hope this is what you were looking for.
06-08-2008 6:27 AM