Application Development and Automation 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: 
Read only

read with great or less

Former Member
0 Likes
2,148

hallow

do i can read with great or less?

READ TABLE intab into wa_intab WITH KEY key > wa_intab_2-aa

or something eq that can help me

Regards

i reward

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,125

Hi!

With READ TABLE you can't perform a condition like this.

Use LOOP instead of it.

LOOP AT itab INTO wa WHERE itab-field <= '123'.

EXIT. "to read only the first record

ENDLOOP.

Regards

Tamá

hallow

do i can read with great or less?

READ TABLE intab into wa_intab WITH KEY key > wa_intab_2-aa

or something eq that can help me

Regards

i reward

3 REPLIES 3
Read only

Former Member
0 Likes
2,125

Hi,

Read statement with greater or lesser is not allowed.

WHY? think think ..

you are reading a lint into work area , that means you can get only one line when you read from an internal table..

If you put greater than od less than, there may be so many values for that condition,

so READ doesnot allow GT or LT / GE, LE , NE.. etc.

Instaed you can use

<b>LOOP at ITAB into WA where field > 'value'.</b>rewards if useful,

regardsa,

nazeer

Read only

Former Member
0 Likes
2,126

Hi!

With READ TABLE you can't perform a condition like this.

Use LOOP instead of it.

LOOP AT itab INTO wa WHERE itab-field <= '123'.

EXIT. "to read only the first record

ENDLOOP.

Regards

Tamá

Read only

varma_narayana
Active Contributor
0 Likes
2,125

Hi.. antonio..

Not possible with READ TABLE to use the other operators except = (EQ).

In that case you have to use LOOP.. ENDLOOP.

LOOP AT ITAB WHERE MENGE > 100.

ENDLOOP.

<b>reward if Helpful.</b>