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

how to read an internal table with more than one (2 or 3) key field(s).

how to read an internal table with more than one (2 or 3) key field(s). in ecc 6.0 version

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 27, 2008 at 02:15 PM

    read table itab with key KEY1 = <value>

    KEY2 = <value> ....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 27, 2008 at 02:15 PM

    Hi,

    You can use read command as like in the earlier versions.

    Read table with key <field1> = value <field2> = value.

    Regards,

    Sankar.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 27, 2008 at 02:22 PM

    Hi,

    read table <itab) with key fld = <value> fld2 = <value>.

    Regards,

    V.Balaji

    Reward if Usefull...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 27, 2008 at 02:37 PM

    hi ,

    check this..

    report.

    tables: marc,mard.

    data: begin of itab occurs 0,

    matnr like marc-matnr,

    werks like marc-werks,

    pstat like marc-pstat,

    end of itab.

    data: begin of itab1 occurs 0,

    matnr like mard-matnr,

    werks like mard-werks,

    lgort like mard-lgort,

    end of itab1.

    parameters:p_matnr like marc-matnr.

    select matnr

    werks

    pstat

    from marc

    into table itab

    where matnr = p_matnr.

    sort itab by matnr werks.

    select matnr

    werks

    lgort

    from mard

    into table itab1

    for all entries in itab

    where matnr = itab-matnr

    and werks = itab-werks.

    sort itab1 by matnr werks.

    loop at itab.

    read table itab1 with key matnr = itab-matnr

    werks = itab-werks.

    endloop.

    regards,

    venkat.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 27, 2008 at 02:40 PM

    Hi,

    Read table it_itab with key <field1> = value <field2> = value.

    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.