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: 

select.........upto 1 rows syntax

Former Member
0 Kudos

plz sent the syantax select..........upto 1 rows

1 ACCEPTED SOLUTION

Former Member
0 Kudos

select *

from mara

up to 1 rows

into w_mara.

endselect.

6 REPLIES 6

Former Member
0 Kudos

select *

from mara

up to 1 rows

into w_mara.

endselect.

0 Kudos

tables: mara.

select-options:

s_matnr for mara-matnr.

select *

from mara

up to 1 rows

into mara

where matnr in s_matnr.

endselect.

It's with where clause....

reward if helpful...

Former Member
0 Kudos

Hi,

select * from kna1 up to 1 row where field1 = 'xxx' and field2 = 'yyyy'

* here you need to mention all the primary keys in the select to get the exact record

http://www.sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm

regards

Sudheer

Former Member
0 Kudos

Hi,

SELECT..... FROM <dbtab> [CLIENT SPECIFIED] [BYPASSING BUFFER]

[UP TO <n> ROWS].........

ENDSELECT.

SELECT * FROM MARA INTO ITAB UP TO 20 ROWS WHEER ABC = BCD.

rgds,

prajith

former_member189631
Active Contributor
0 Kudos

narenra,

Use this,

SELECT * FROM TABLE-NAME UP TO 1 ROWS INTO ITAB.

Regards,

Ramganesan K.

Former Member
0 Kudos

Hi,

it will give the same result as select single *.

for select single * u need not write endselect.

the syntax for this is

select * from <db table> up to 1 rows.

endselect.

regards,

bharat chowdary.