Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how can I read an entry from an internal table with a specified key

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

ritesh_dugad2
Active Participant
0 Kudos

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.

2 REPLIES 2

ritesh_dugad2
Active Participant
0 Kudos

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.

0 Kudos

thank you, that solved the problem.