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

internal tables

Former Member
0 Likes
1,386

how can i restrict the no of records to 1000 in an internal table?

can i use upto n rows clause in SELECT statement with WHERE clause?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,363

Hi,

select kunnr

from kna1

into table it_kna1

where kunnr GE '100'.

loop at it_kna1 into wa_kna1 up to 1000 rows.

write : / wa_kna1-kunnr.

endloop.

10 REPLIES 10
Read only

Former Member
0 Likes
1,363

Hi

option1:

You can use Select up to n rows.

Option2:

You can use select with packet size 1000 once you see their are 1000 entries in your table.

Option3:

Select reocrds in an internal table and then filter it out for first 1000 reocrds by looping.

Option 1 is them most prefered one in your case.

Regards

Neha

Read only

Former Member
0 Likes
1,363

Hi Vamsi,

You can use to restrict the internal table by UP TO 1000 ROWS.


SELECT * FROM MARA
INTO TABLE IT_MARA
UP TO 1000 ROWS.

Thanks,

Chidanand

Read only

Former Member
0 Likes
1,363

Hi,

If you don't need to do other conditions, you can use up to 1000 rows in the select statement.

Regards,

Chris Gu

Read only

Former Member
0 Likes
1,363

Hello,

You can use the select statement with option UPTO 1000 Rows.

This will be the better solution.

Thanks.

Read only

0 Likes
1,363

MY REQUIREMENT IS DIFFRENT..SELECT + WHERE + UPTO

Read only

0 Likes
1,363

>

> MY REQUIREMENT IS DIFFRENT..SELECT + WHERE + UPTO

It will work.Did you try ?

REPORT  ZVAMSI.
data:i_mara TYPE STANDARD TABLE OF mara.
SELECT * from mara into TABLE i_mara UP TO 1000 rows where AENAM = 'JONY' .

Read only

0 Likes
1,363

Hi,

select kunnr

from kna1

into table it_kna1

where kunnr GE '100'.

loop at it_kna1 into wa_kna1 up to 1000 rows.

write : / wa_kna1-kunnr.

endloop.

Read only

0 Likes
1,363

>

> Hi,

> select kunnr

> from kna1

> into table it_kna1

> where kunnr GE '100'.

>

> loop at it_kna1 into wa_kna1 up to 1000 rows.

> write : / wa_kna1-kunnr.

> endloop.

Looks like your Syntax check is turned off.

Read only

Former Member
0 Likes
1,364

Hi,

select kunnr

from kna1

into table it_kna1

where kunnr GE '100'.

loop at it_kna1 into wa_kna1 up to 1000 rows.

write : / wa_kna1-kunnr.

endloop.

Read only

Former Member
0 Likes
1,363

Hi,

Use upto

Tks,

Krishna..