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: 

Structure inside internal table

Former Member
0 Kudos

Hi all,

What is the best way for reading a record from structure inside an internal table.

Thanks,

Hagit

7 REPLIES 7

Former Member
0 Kudos

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

Former Member
0 Kudos

hi,

plz expalin in detail

Former Member
0 Kudos

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.

Former Member
0 Kudos

structure does not contain any record.

0 Kudos

Hi how it will be?

Deepika Reddy wrote:
structure does not contain any record.

Regards

Former Member
0 Kudos

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

Former Member
0 Kudos

by using read statements we can retrieving a record is the best process.

if there arebulk of records looping is the best process...