Skip to Content
avatar image
Former Member

Two decision tables into one Result table

Good day all,

Please suggest the best way how to collect information from 2 different decision tables that have a Key field into one result table.

for example

DT_1 have columnt A and column B(key column).

DT_2 have column B(key column) and column C

Now i have itab_table that need to be filled with A and C columns.

I tried to loop at DT_1 insert value column A to itab_table.

then tried in rules of first loop i tried to loop at DT_2 with condition column B = (don't know how to give this value dynamycally from 1st loop at DT_1).

Rg Dan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 25, 2014 at 09:16 AM

    Hi Dan,

    I do not know if this is the best way, but one that should work :-)

    You loop over DT_1 using a loop expression. This way you get a structure of the type "line of DT_1" with field A and B. WIthin the loop you create a rule that calls a tables expression. WIthin the table expression you read the line specifing the key column B. Here you can use the structure namely the field B. As a result you have a second structure of the type "line of DT_2" with the fields B and C.

    Now you can move the fields of the two structures to your target structure with line type A and C and append/insert this structure to your itab_table.

    BR

    Christian

    Add comment
    10|10000 characters needed characters exceeded