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

tables

Former Member
0 Likes
525

I want to read 200 registers of a table into an internal table, but 50 are limited to 90 kwh, 50 >90 kwh and <100kmw,....

ex:

select * into ita_reg from z where cod < 90.

endselect.

select * into ita_reg from z where (cod < 100 and cod >90).

endselect.

...

how can i do it?

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
491

can you use the "UP TO n ROWS" extension?

Regards,

Rich Heilman

Message was edited by: Rich Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
492

can you use the "UP TO n ROWS" extension?

Regards,

Rich Heilman

Message was edited by: Rich Heilman

Read only

Former Member
0 Likes
491

You can use Ranges

RANGES wa_z FOR marc-matnr.

CLEAR wa_z.

wa_z-sign = 'I'.

wa_z-option = 'BT'.

wa_z-low = 90.

wa_z-high = 100.

APPEND wa_z.

Then:

Select *

INTO TABLE ita_reg

FROM z

WHERE cod IN wa_z.

Hope this works for you.