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: 

CDS View join with authoritiy check

frankmueller9
Participant
0 Kudos
207

Hello,

I want to select for a complex scenario some data with a CDS Views (not CDS View Entity).

To make the scenario easy is here a similar example.

I want to select distinct all material numbers from MARA where the user has at least for one plant in MARC the authority.

Here is my approach:

I create a CDS View Z_I_MARC on MARC with the fields MATNR and WERKS and add an authority check on the field WERKS.

I create an additional CDS View Z_I_DISTINCT_MATERIAL on MARA that selects distinct only the field MATNR from MARA and inner joins the CDS View Z_I_MARC.

When I do it that way, then the authority of the CDS View Z_I_MARC will not be checked in the CDS View Z_I_DISTINCT_MATERIAL.

How can I check the authority in the CDS View Z_I_DISTINCT_MATERIAL without the field WERKS in the field list?

Best regards

Frank

0 REPLIES 0