2016 Aug 16 11:13 AM
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:
| ID | Value |
|---|---|
| 101 | 10 |
| 101 | 15 |
Table2:
| ID | Value |
|---|---|
| 101 | 12 |
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:
| ID | Value |
|---|---|
| 101 | 10 |
| 101 | 15 |
Table2:
| ID | Value |
|---|---|
| 101 | 12 |
Regards,
Vinayak.
2016 Aug 19 5:57 PM
In the above scenario, the expected output is:
| ID | Table1.Value | Table2.Value |
|---|---|---|
| 101 | 15 | 2 |
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |