Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Itertating tuple and updating column value dynamically while join in abap cds

vinayaknath_singh
Associate
Associate
0 Likes
501

Hi,

My requirement is to join two tables as shown below on column ID which is fine. The next condition is I have to also compare Value field and do the comparison as follow: Do 12-10 which gives 2(a positive value), so do not show this row in result. Now when joining with value 15, use 2 with 15.

Do 2-15=-13 which is a negative value so do show this result.

So as mention above in first table I can have one or more than one tuple to be joined with one tuple in second table. Logic have to be dynamically consider updated value of second table for join. Can this be achieved in abap CDS?

Table1:

IDValue
10110
10115

Table2:

IDValue
10112

Regards,

Vinayak.

Hi,

My requirement is to join two tables as shown below on column ID which is fine. The next condition is I have to also compare Value field and do the comparison as follow: Do 12-10 which gives 2(a positive value), so do not show this row in result. Now when joining with value 15, use 2 with 15.

Do 2-15=-13 which is a negative value so do show this result.

So as mention above in first table I can have one or more than one tuple to be joined with one tuple in second table. Logic have to be dynamically consider updated value of second table for join. Can this be achieved in abap CDS?

Table1:

IDValue
10110
10115

Table2:

IDValue
10112

Regards,

Vinayak.

1 REPLY 1
Read only

vinayaknath_singh
Associate
Associate
0 Likes
470

In the above scenario, the expected output is:

IDTable1.ValueTable2.Value
101152