09-17-2008 1:22 PM
Hi all,
What is the best way for reading a record from structure inside an internal table.
Thanks,
Hagit
09-17-2008 1:25 PM
The best way for reading a single record from a internal tables is like this:
READ TABLE it_internal into wa_internal WITH KEY field1 = my_field1
field2 = my_field2.
is there is a structure uinside the record yo can access with:
"wa_internal-structure-field".
was this what you where looking for?
Bye,
Andrew83.
Edited by: Andrew83 on Sep 17, 2008 2:35 PM
09-17-2008 1:26 PM
09-17-2008 1:28 PM
let itab be a internal table, let struc be the structure inside it having fields a, b, c.
then u can read it like this.
loop at itab.
wrtite: itab-struc-a. " to read field a of struc in itab
endloop.
09-17-2008 1:29 PM
09-17-2008 1:32 PM
Hi how it will be?
Deepika Reddy wrote:
structure does not contain any record.
Regards
09-17-2008 2:16 PM
Hi,
Yes Structure does not Hold data, but if you have populated the structure and you want to move its values into the internal table then:
Case1 : if the stucture has same no of fields with same name and type as the Internal table then
APPEND <structure> TO int_tab.
Case2: if the structure and int table have different structures then
MOVE-CORRESPONDING <structure> TO <int table work area>
APPEND <int table work area> TO int_tab
09-17-2008 3:36 PM
by using read statements we can retrieving a record is the best process.
if there arebulk of records looping is the best process...