<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CDS DCL Authorization in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-dcl-authorization/m-p/663717#M28967</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;first of all as a Student I am brand new in ABAP and any programming language.&lt;/P&gt;
  &lt;P&gt;I created a simple ALV-Grid with authority check and it was'nt a big of a deal. Now i try to convert the "old" program into a cds view.&lt;/P&gt;
  &lt;P&gt;I managed to code the Data Definition and now I stuck with the authorization:&lt;/P&gt;
  &lt;P&gt;Here the Code from my DCL Source:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;@EndUserText.label:'CDS_TEST'
@MappingRole:true
 define role Z_PSP_TEST{
 grant select on Z_PSP
 where(c.werks) =
 aspectpfcg_auth(ZCO_MDP,
 werks,
 actvt='03');
}

&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;My issue now is in line 4: I named the define role the same way I did it with my define view but it says that no unique key was defined for entity&lt;/P&gt;
  &lt;P&gt;any advise?&lt;/P&gt;
  &lt;P&gt;greeting Dustin&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2018 18:31:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-03-08T18:31:41Z</dc:date>
    <item>
      <title>CDS DCL Authorization</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-dcl-authorization/m-p/663717#M28967</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;first of all as a Student I am brand new in ABAP and any programming language.&lt;/P&gt;
  &lt;P&gt;I created a simple ALV-Grid with authority check and it was'nt a big of a deal. Now i try to convert the "old" program into a cds view.&lt;/P&gt;
  &lt;P&gt;I managed to code the Data Definition and now I stuck with the authorization:&lt;/P&gt;
  &lt;P&gt;Here the Code from my DCL Source:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;@EndUserText.label:'CDS_TEST'
@MappingRole:true
 define role Z_PSP_TEST{
 grant select on Z_PSP
 where(c.werks) =
 aspectpfcg_auth(ZCO_MDP,
 werks,
 actvt='03');
}

&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;My issue now is in line 4: I named the define role the same way I did it with my define view but it says that no unique key was defined for entity&lt;/P&gt;
  &lt;P&gt;any advise?&lt;/P&gt;
  &lt;P&gt;greeting Dustin&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 18:31:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-dcl-authorization/m-p/663717#M28967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-03-08T18:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: CDS DCL Authorization</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-dcl-authorization/m-p/663718#M28968</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abencds_f1_define_role.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abencds_f1_define_role.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 18:59:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-dcl-authorization/m-p/663718#M28968</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-03-08T18:59:34Z</dc:date>
    </item>
  </channel>
</rss>

