on 12-25-2014 6:44 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Christian,
Solved by myself.
what i did is LOOP at DT_1 get A and B
maked 2 rules
1st assign values of A and B to structure type of itab_table
2nd rule loop at DT_2
Here im assigning last column C to to structure type of itab_table
and Inserting this structure to itab_tabl.
So in final i got all i need from DT_1 with matches from DT_2.
Happy that i did by myself
Rg Dan
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.