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: 

internal tables

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

former_member598013
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

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

Regards,

Chris Gu

Former Member
0 Kudos

Hello,

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

This will be the better solution.

Thanks.

0 Kudos

MY REQUIREMENT IS DIFFRENT..SELECT + WHERE + UPTO

0 Kudos

>

> 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' .

0 Kudos

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.

0 Kudos

>

> 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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

Use upto

Tks,

Krishna..