Skip to Content
avatar image
-1
Former Member

Join two dynamic internal tables represented by symbolic links

Hello,

I need to loop through two internal tables connected with a key field (inner join), do some manipulations and write the result into another internal table. Something that would look like following:

sort itab2 by datasource.
loop at itab1.
    read table itab2 with key datasource = itab1-datasource.
    if sy-subrc eq 0.
        itab3-datasource = itab1-datasource.
        " etc
        append itab3.
    endif.
endloop.
 

The problem is that I don't have static internal tables. I have two dynamic tables represented by symbolic links, say, <itab1> and <itab2>. That means that syntax like <itab1>-datasource is not available for these dynamic tables.

Please advise how I could do the trick joining two dynamic tables?

Thank you,

Val

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 07 at 07:34 AM

    The common way to work with dynamic data objects are RTTI and ASSIGN COMPONENT.

    Add comment
    10|10000 characters needed characters exceeded