<?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 Re: authorization check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969870#M948229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cosmos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check the authorization of the user of an ABAP program, use the AUTHORITY-CHECK statement: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT '&amp;lt;object&amp;gt;'&lt;/P&gt;&lt;P&gt;                        ID '&amp;lt;name1&amp;gt;' FIELD &amp;lt;f1&amp;gt; &lt;/P&gt;&lt;P&gt;                        ID '&amp;lt;name2&amp;gt;' FIELD &amp;lt;f2&amp;gt; &lt;/P&gt;&lt;P&gt;                            .............&lt;/P&gt;&lt;P&gt;                        ID '&amp;lt;name10&amp;gt;' FIELD &amp;lt;f10&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;object&amp;gt; is the name of the object that you want to check. You must list the names (&amp;lt;name1&amp;gt;, &amp;lt;name2&amp;gt; ...) of all authorization fields that occur in &amp;lt;object&amp;gt;. You can enter the values &amp;lt;f 1 &amp;gt;, &amp;lt;f 2 &amp;gt;.... for which the authorization is to be checked either as variables or as literals. The AUTHORITY-CHECK statement checks the useru2019s profile for the listed object, to see whether the user has authorization for all values of &amp;lt;f&amp;gt;. Then, and only then, is SY-SUBRC set to 0. You can avoid checking a field by replacing FIELD &amp;lt;f&amp;gt; with DUMMY. You can only evaluate the result of the authorization check by checking the contents of SY-SUBRC. For a list of the possible return values and further information, see the keyword documentation for the AUTHORITY-CHECK statement. For further general information about the SAP authorization concept, refer to Users and Authorizations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SPFLI.&lt;/P&gt;&lt;P&gt;   AUTHORITY-CHECK OBJECT 'F_SPFLI'&lt;/P&gt;&lt;P&gt;                        ID 'ACTVT'  FIELD '02'&lt;/P&gt;&lt;P&gt;                        ID 'NAME' FIELD SPFLI-CARRID&lt;/P&gt;&lt;P&gt;                        ID 'CITY'   DUMMY.&lt;/P&gt;&lt;P&gt;   IF SY-SUBRC NE 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the user has the following authorizations for F_SPFLI:&lt;/P&gt;&lt;P&gt;ACTVT 01-03, NAME AA-LH, CITY none,&lt;/P&gt;&lt;P&gt;and the value of SPFLI-CARRID is not between "AA" and "LH", the authorization check terminates the SELECT loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;I think you have already gone through this below links:&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaccb35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaccb35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://abapprogramming.blogspot.com/2008/03/abap-synteax-for-authority-check.html" target="test_blank"&gt;http://abapprogramming.blogspot.com/2008/03/abap-synteax-for-authority-check.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ionelburlacu.ro/sap0/abap018.htm" target="test_blank"&gt;http://sap.ionelburlacu.ro/sap0/abap018.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2008 16:24:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-12T16:24:14Z</dc:date>
    <item>
      <title>authorization check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969867#M948226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i do Enhancement for BW and my customer tell me that he&lt;/P&gt;&lt;P&gt;wont to check if user have authorization to watch the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. i can do that in Enhancement ?&lt;/P&gt;&lt;P&gt;2. what i have to check ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i see the code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT object&lt;/P&gt;&lt;P&gt;ID name1 FIELD f1&lt;/P&gt;&lt;P&gt;ID name2 FIELD f2&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ID name10 FIELD f10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i have to put in object and what in name1 &amp;amp; and name2....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 16:11:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969867#M948226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T16:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: authorization check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969868#M948227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;object is the name of the authorization object.&lt;/P&gt;&lt;P&gt;name1, name2, ... are the fields of the authorization object.&lt;/P&gt;&lt;P&gt;f1, f2, ... are possible values for authorization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DUMMY parameter indicates that there is no need to verify that field.&lt;/P&gt;&lt;P&gt;If SY-SUBRC = 0 authorized user&lt;/P&gt;&lt;P&gt;If SY-SUBRC &amp;lt;&amp;gt; 0 unauthorized users&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 16:17:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969868#M948227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T16:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: authorization check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969869#M948228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a transaction code associated with the process that you want to do the authority check on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 16:21:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969869#M948228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T16:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: authorization check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969870#M948229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cosmos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check the authorization of the user of an ABAP program, use the AUTHORITY-CHECK statement: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT '&amp;lt;object&amp;gt;'&lt;/P&gt;&lt;P&gt;                        ID '&amp;lt;name1&amp;gt;' FIELD &amp;lt;f1&amp;gt; &lt;/P&gt;&lt;P&gt;                        ID '&amp;lt;name2&amp;gt;' FIELD &amp;lt;f2&amp;gt; &lt;/P&gt;&lt;P&gt;                            .............&lt;/P&gt;&lt;P&gt;                        ID '&amp;lt;name10&amp;gt;' FIELD &amp;lt;f10&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;object&amp;gt; is the name of the object that you want to check. You must list the names (&amp;lt;name1&amp;gt;, &amp;lt;name2&amp;gt; ...) of all authorization fields that occur in &amp;lt;object&amp;gt;. You can enter the values &amp;lt;f 1 &amp;gt;, &amp;lt;f 2 &amp;gt;.... for which the authorization is to be checked either as variables or as literals. The AUTHORITY-CHECK statement checks the useru2019s profile for the listed object, to see whether the user has authorization for all values of &amp;lt;f&amp;gt;. Then, and only then, is SY-SUBRC set to 0. You can avoid checking a field by replacing FIELD &amp;lt;f&amp;gt; with DUMMY. You can only evaluate the result of the authorization check by checking the contents of SY-SUBRC. For a list of the possible return values and further information, see the keyword documentation for the AUTHORITY-CHECK statement. For further general information about the SAP authorization concept, refer to Users and Authorizations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SPFLI.&lt;/P&gt;&lt;P&gt;   AUTHORITY-CHECK OBJECT 'F_SPFLI'&lt;/P&gt;&lt;P&gt;                        ID 'ACTVT'  FIELD '02'&lt;/P&gt;&lt;P&gt;                        ID 'NAME' FIELD SPFLI-CARRID&lt;/P&gt;&lt;P&gt;                        ID 'CITY'   DUMMY.&lt;/P&gt;&lt;P&gt;   IF SY-SUBRC NE 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the user has the following authorizations for F_SPFLI:&lt;/P&gt;&lt;P&gt;ACTVT 01-03, NAME AA-LH, CITY none,&lt;/P&gt;&lt;P&gt;and the value of SPFLI-CARRID is not between "AA" and "LH", the authorization check terminates the SELECT loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;I think you have already gone through this below links:&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaccb35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaccb35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://abapprogramming.blogspot.com/2008/03/abap-synteax-for-authority-check.html" target="test_blank"&gt;http://abapprogramming.blogspot.com/2008/03/abap-synteax-for-authority-check.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ionelburlacu.ro/sap0/abap018.htm" target="test_blank"&gt;http://sap.ionelburlacu.ro/sap0/abap018.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 16:24:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969870#M948229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T16:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: authorization check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969871#M948230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Alvaro Giancarl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt; u think i can do it in user-exit, i have to do it for bw system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 17:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969871#M948230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T17:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: authorization check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969872#M948231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Syed Abdul Adil    	,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks ,&lt;/P&gt;&lt;P&gt;i understand that i have to put object name in :&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT '&amp;lt;object&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what i have to put in:&lt;/P&gt;&lt;P&gt;ID '&amp;lt;name1&amp;gt;' FIELD &amp;lt;f1&amp;gt;&lt;/P&gt;&lt;P&gt;ID '&amp;lt;name2&amp;gt;' FIELD &amp;lt;f2&amp;gt;  ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where i can find it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 17:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969872#M948231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T17:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: authorization check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969873#M948232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Table TSTCA holds the information for transactions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 18:03:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-check/m-p/3969873#M948232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T18:03:34Z</dc:date>
    </item>
  </channel>
</rss>

