on 06-30-2017 10:30 PM
Hello CDS experts,
I have the following requirement:
In the example above, I only need to select Sales Docs 4 and 5 from VBAK, since 1-3 exist in VBRP.
This would be a LEFT EXCLUDING, (or a LEFT OUTER - INNER join) but I'm not sure this syntax is available:
Any ideas on how to do this through CDS Views?
Much appreciated!
Marcelo
Hi,
To perform an exclusion join in a CDS view, join the base table and the exclusion table with LEFT OUTER JOIN. Then, use WHERE IS NULL in the exclusion table to select those values in the base table that couldn't join with the exclusion table.
In your case, you'll need to perform a VBAK LEFT OUTER JOIN VBRP, then use WHERE VBRP.mandt IS NULL (you can use the MANDT field or any other field of your choice) to show those values in VBAK that couldn't join with VBRP.
Best regards,
Carlos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
105 | |
8 | |
6 | |
6 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.