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: 

Regarding accessing of datain internal table.

Former Member
0 Kudos

Hi all,

My problem is

loop at i_equi into wa_equi. (wa_equi-equnr = 1)

READ TABLE i_values

INTO wa_values

WITH KEY objek = wa_equi-equnr

BINARY SEARCH.

The values in i_values are

objek atflv atnam

<b> 1 20.3 SEL</b>

1 25.3 OBJ

1 66.3 IPG

i am getting only first record...how to get the remaining two records.

*i cant use loop inside loop.

Need ur help.

Regards,

Karthick.

2 REPLIES 2

0 Kudos

Hi,

READ can only be used to read one RECORD.

You need to use LOOP ENDLOOP for more than one record along with WHERE as follows.

DATA: temp_valuesl like i_values.

loop at i_equi into wa_equi. (wa_equi-equnr = 1)

loop at i_values into wa_values where objek = wa_equi-equnr.

append wa_values to temp_values.

endloop.

endloop.

Regards,

Sesh

Former Member
0 Kudos

yes read table only fetches the first record when it matches with the condition for your requirement you have to use loop inside loop.

loop at i_equi into wa_equi. (wa_equi-equnr = 1)

loop at i_values where objek = wa_equi-equnr

<do processing>

endloop.

endloop.

regards

shiba dutta