<?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: authority check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152591#M117907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To check the authorization of the user of an ABAP program, we use the AUTHORITY-CHECK statement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;There is an authorization object called F_SPFLI. It contains the fields ACTVT,&lt;/P&gt;&lt;P&gt;NAME, and CITY.&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 &amp;#147;AA&amp;#148; and &amp;#147;LH&amp;#148;, the authorization&lt;/P&gt;&lt;P&gt;check terminates the SELECT loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;satesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2006 03:52:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-21T03:52:15Z</dc:date>
    <item>
      <title>authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152588#M117904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any one explain about authority check .&lt;/P&gt;&lt;P&gt;pls&lt;/P&gt;&lt;P&gt;thank's&lt;/P&gt;&lt;P&gt;anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 03:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152588#M117904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-21T03:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152589#M117905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT used to check whether authorization is entered in the user master record of the current user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is used to restrict users from executing the code and allowing only users with the permissions to execute it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 03:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152589#M117905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-21T03:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152590#M117906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the SAP HELP on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK checks for one object whether the user has an authorization for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;authority-check object 'S_TCODE'&lt;/P&gt;&lt;P&gt;                id     'TCD' &lt;/P&gt;&lt;P&gt;                field  'SM35'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  User does not have authority for transaction SM35!!!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Documentation:&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://help.sap.com/saphelp_nw04s/helpdata/en/52/67129f439b11d1896f0000e8322d00/content.htm"&amp;gt;Authority-Check&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lanka&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 03:44:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152590#M117906</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-21T03:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152591#M117907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To check the authorization of the user of an ABAP program, we use the AUTHORITY-CHECK statement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;There is an authorization object called F_SPFLI. It contains the fields ACTVT,&lt;/P&gt;&lt;P&gt;NAME, and CITY.&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 &amp;#147;AA&amp;#148; and &amp;#147;LH&amp;#148;, the authorization&lt;/P&gt;&lt;P&gt;check terminates the SELECT loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;satesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 03:52:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152591#M117907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-21T03:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152592#M117908</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;Go through the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/security/authority/authhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/security/authority/authhome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gayathri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 04:03:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152592#M117908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-21T04:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152593#M117909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Authorization check in abap programs is possible using the Authority-Check statement. It allows you to check the entries in the user master record for specific authorization objects against any other values. Therefore, if a transaction or program is not sufficiently protected or not every user that is authorized to use the program can also execute all the actions, this statement must be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT  0.&lt;/P&gt;&lt;P&gt;    MESSAGE e184(sabapdocu) WITH text-010.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT  carrid connid fldate seatsmax seatsocc&lt;/P&gt;&lt;P&gt;    FROM  sflight&lt;/P&gt;&lt;P&gt;    INTO  CORRESPONDING FIELDS OF wa_flights&lt;/P&gt;&lt;P&gt;    WHERE carrid = pa_carr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE: / wa_flights-carrid,&lt;/P&gt;&lt;P&gt;             wa_flights-connid,&lt;/P&gt;&lt;P&gt;             wa_flights-fldate,&lt;/P&gt;&lt;P&gt;             wa_flights-seatsmax,&lt;/P&gt;&lt;P&gt;             wa_flights-seatsocc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the system checks with the authorization object S_CARRID whether or not the user has a display authorization (03) for the airline entered on a selection screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOr futher more details, check out this &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/security/authority/authority_tcode.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/security/authority/authority_tcode.htm&lt;/A&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;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;prema.A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 04:07:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152593#M117909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-21T04:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152594#M117910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi anilchoudary,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;authority-check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. suppose you are developing a report in FI&lt;/P&gt;&lt;P&gt;  and u want to check, whether the user&lt;/P&gt;&lt;P&gt;  has the right for company code 1000&lt;/P&gt;&lt;P&gt;  (for  eg, which is provided on selection screen)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. HOW DO U CHECK ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. For that purpose, SAP has devised&lt;/P&gt;&lt;P&gt;   the concept of AUTHORITY-OBJECTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. In these objects, there are FIELDS&lt;/P&gt;&lt;P&gt;   for eg. BUKRS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   here u can specify 1000&lt;/P&gt;&lt;P&gt;   and if sy-subrc =0, then the user has right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Similary there are OTHER objects&lt;/P&gt;&lt;P&gt;   for other PURPOSES.&lt;/P&gt;&lt;P&gt;  eg. plant, pernr, org unit etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Please see syntax of AUTHORITY-CHECK&lt;/P&gt;&lt;P&gt;   ITS VERY SIMPLE TO USE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. IMPORTANT THING IS&lt;/P&gt;&lt;P&gt;   if we / sap&lt;/P&gt;&lt;P&gt;   do not TAKE CARE OF THIS DISCIPLINE&lt;/P&gt;&lt;P&gt;  IN THE CODING ITSELF,&lt;/P&gt;&lt;P&gt;  then nothing can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THIS RESTRICTION / CHECKING OF RIGHTS/AUTHORITY&lt;/P&gt;&lt;P&gt;HAS TO BE DONE WHILE CODING ITSELF.&lt;/P&gt;&lt;P&gt;OTHER WISE NOTHING PREVENTS THE USER&lt;/P&gt;&lt;P&gt;TO SEE ALL INFORMATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Amit Mittal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2006 04:41:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1152594#M117910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-21T04:41:43Z</dc:date>
    </item>
  </channel>
</rss>

