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

SELECT QUERY

Former Member
0 Likes
1,107

HOW TO MAKE SELECT QUERY FOR 100 ROWS WITH WHERE CONDITION

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,091

Hi

use Upto 100 rows before where condition

regards

Shiva

13 REPLIES 13
Read only

Former Member
0 Likes
1,092

Hi

use Upto 100 rows before where condition

regards

Shiva

Read only

Former Member
0 Likes
1,090

See this example

data it_makt type table of makt.

select up to 100 rows from makt into table it_makt

where matnr < 9999999.

Please reward if useful

Thanks Arjun

Read only

Former Member
0 Likes
1,090

Try Like this,

DATA:

it_sflight TYPE TABLE OF sflight.

SELECT * FROM sflight

UP TO 100 ROWS

INTO TABLE it_sflight

WHERE carrid = 'AA'.

Read only

Former Member
0 Likes
1,090

Hi,

SELECT *

INTO CORRESPONDING FIELDS OF TABLE itab1

FROM TABLE_1 UP TO 100 ROWS.

FOR ALL ENTRIES IN itab

WHERE <conditions>.

check this link

http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb39c4358411d1829f0000e829fbfe/frameset.htm

.

Regards

Read only

Former Member
0 Likes
1,090

Use the below syntax.......

select * from vbak up to 100 rows into table t_vbak where vbeln = p_vbeln.

reward if useful..............

Read only

Former Member
0 Likes
1,090

Hi,

SELECT * FROM KNA1 INTO TABLE IT_KNA1 UP TO 100 ROWS WHERE <condition>.

This is the syntax for ur requirement.

If u need some more,then post your doubt clearly,then only you can get the exact solution.

Regards,

Chandu.

Read only

dhruv_shah3
Active Contributor
0 Likes
1,090

Hi,

SELECT MATNR MTART FROM MARA INTO TABLE IT_MARA UP TO 100 ROWS

WHERE MTART = 'CONT'.

HTH

regards,

Dhruv Shah

Read only

Former Member
0 Likes
1,090

hi.

do this way.

select * up to 100 rows from <ddic table> into table itab.

Read only

Former Member
0 Likes
1,090

Hi,

Select * from MARA

upto 100 rows

into table gt_mara

where <condition>.

Please reward points if useful.

Regards

rose

Read only

Former Member
0 Likes
1,090

hi.

do this way.

select * up to 100 rows from <ddic table> into table itab where condition .

Read only

Former Member
0 Likes
1,090

Hi

i am sending the code.go through this .

tables:kna1.

types:begin of st_kna1,

kunnr type kunnr,

land1 type land1,

name1 type name1,

ort01 type ort01,

end of st_kna1.

data: wa_kna1 type st_kna1,

it_kna1 type standard table of st_kna1.

select-options: pa_kunnr for kna1-kunnr.

select kunnr land1 name1 ort01 from kna1

into table it_kna1 up to 100 rows where kunnr in pa_kunnr.

loop at it_kna1 into wa_kna1.

write:/ wa_kna1-kunnr,

wa_kna1-land1,

wa_kna1-name1,

wa_kna1-ort01.

endloop.

Read only

Former Member
0 Likes
1,090

Hi,

try this

Select matnr from mara into table <itab>

up to 100 rows where matnr like '1*'.

Read only

Former Member
0 Likes
1,090

hi

use this select query.

select vblen

posnr

name1

from vbak up to 100 rows into table vbak_itab where (your condition).

make sure u leave space between ( up to ). and also type rows not row.

mark the question as answered if ur problem is solved.

regards

Manoharan