Skip to Content
avatar image
Former Member

Internal Tables

Hi Gurus,

What statement can I use to select multiple rows of data in an internal table. i.e. a statement that can work the same way as a select statement

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 16, 2009 at 07:29 AM

    Hello

    loop at itab1 where field1 = " condition 1 here
                    and field2 = " condition 2 here
                    and field3 = " condition 3 here
      move-corresponding itab1 to itab2.
      append itab2.
    endloop.
    

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 16, 2009 at 07:32 AM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      >

      > SELECT DISTINCT,

      > SELECT ALL,

      > SELECT ANY.

      >

      > Regds,

      > Anil

      Can you use those statements with internal tables?

  • Jul 16, 2009 at 07:31 AM

    Hi,

    you will have to make use of LOOP.

    Regards,

    Ankur Parab

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 16, 2009 at 07:32 AM

    look at syntax of

    FIND IN TABLE

    statement.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 16, 2009 at 07:31 AM

    Use LOOP at itab into wa_tab WHERE <logical expression>

    <Logical expression> is similar to the one you give in your WHERE clause while executing a SELECT statement.

    Provide feedback if this helps!!

    Cheers,

    Shailesh.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 16, 2009 at 07:52 AM

    Hi :

    There are no selection stmt on Int Table as ur request..You need to process your data by Loop.

    Try below it can be useful :

    DELETE itab WHERE cond .

    eg :

    DELETE itab WHERE Filed1 NE 'A' .

    Resultant table will have records only with field1 = A .

    Thanks

    Praveen

    Add comment
    10|10000 characters needed characters exceeded