Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 22, 2007 at 07:35 AM

    select *

    from mara

    up to 1 rows

    into w_mara.

    endselect.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

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

  • avatar image
    Former Member
    Mar 22, 2007 at 07:36 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 22, 2007 at 07:40 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 22, 2007 at 07:40 AM

    narenra,

    Use this,

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

    Regards,

    Ramganesan K.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 22, 2007 at 07:41 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded