Skip to Content
author's profile photo Former Member
Former Member

Internal table

Dear All

how to select one field from internal table, using select query or any other methods?

Thanks and regards

Suresh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 11:20 AM

    hi,

    from internal table?

    what is ur exact need?

    U can get by loop endloop..

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2007 at 11:20 AM

    type in READ TABLE in your ABAP code, click on it and press F1, you'll get full documentation...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 11:23 AM

    Hi suresh,

    Use read table statement.

    if sy-subrc = 0.

    w_f1 = itab-f1.

    endif.

    or u can use move itab-f1 to w_f1.

    If it is helpfull pls reward pts.

    Regards

    Srimanta

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 11:25 AM

    hi,

    Use READ TABLE and u ll get the desire result

    for example

    read table itab1 into wa with key ___.

    or press F1 u ll get the rad table syntax.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2007 at 11:25 AM

    Hi,

    U cannot use select query on internal table,use either READ TABLE or go for loop of the internal table ..

    Regards,

    Nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2007 at 11:25 AM

    Hi,

    U cant select one field from internal table using select query, for that

    u have to use READ statement

    Ex.

    &----


    *& Form SUB_COLLECT_DATA

    &----


    • text

    ----


    FORM sub_collect_data.

    *--Local variables

    DATA : lv_count(3) TYPE c.

    IF NOT it_fpltc[] IS INITIAL.

    LOOP AT it_fpltc INTO wa_fpltc.

    lv_count = wa_fpltc-fpltr+3(3).

    wa_final-ccnum = wa_fpltc-ccnum.

    wa_final-rfzei = lv_count.

    CLEAR : wa_vbrk.

    READ TABLE it_vbrk INTO wa_vbrk WITH KEY rplnr = wa_fpltc-fplnr

    BINARY SEARCH.

    IF sy-subrc EQ 0.

    wa_final-vbeln = wa_vbrk-vbeln.

    wa_final-bukrs = wa_vbrk-bukrs.

    ENDIF.

    APPEND wa_final TO it_final.

    CLEAR : wa_vbrk,

    wa_fpltc,

    lv_count.

    ENDLOOP.

    ENDIF.

    ENDFORM. " SUB_COLLECT_DATA

    Reward Points

    regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2007 at 11:25 AM

    Hi Suresh...

    Select statement is only used to fetch data from DB table.

    For internal table use:

    READ TABLE ITAB WITH KEY MATNR = '100' TRANSPORTING MTART. "Single field

    IF SY-SUBRC = 0.

    WRITE:/ ITAB-MTART.

    ENDIF.

    <b>Reward if Helpful.</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 11:26 AM

    You can not write select query on internal table.

    If you have to read a record from internal table use READ statement.

    If you have select from DB Table, Select Single <fieldname> from DBTABLE into <Variable> where...

    Reward Points if this helps,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.