<?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/1865029#M364797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give p_orgin in capital letters&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'P_ORGIN' for user sy-uname....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Feb 2007 08:09:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-05T08:09:12Z</dc:date>
    <item>
      <title>Authority-check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865028#M364796</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 need to chek the authorization for P_orgin for the user .&lt;/P&gt;&lt;P&gt;I have written the code chek in my Z report .&lt;/P&gt;&lt;P&gt;But its always returning mr the sy-subrc as 12 .&lt;/P&gt;&lt;P&gt;can any1 tell me the possible rectifications for the same . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is as given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT  'p_orgin' for user sy-uname&lt;/P&gt;&lt;P&gt;                ID 'INFTY' FIELD '*'&lt;/P&gt;&lt;P&gt;                ID 'SUBTY' FIELD '*'&lt;/P&gt;&lt;P&gt;                ID 'AUTHC' FIELD '*'&lt;/P&gt;&lt;P&gt;                ID 'PERSA' FIELD '*'&lt;/P&gt;&lt;P&gt;                ID 'VDSK1' FIELD '*'&lt;/P&gt;&lt;P&gt;                ID 'PROFL' FIELD '*'&lt;/P&gt;&lt;P&gt;                ID 'PERSG' FIELD '*'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc NE 0 .&lt;/P&gt;&lt;P&gt;message i007.&lt;/P&gt;&lt;P&gt;*leave to list-processing.&lt;/P&gt;&lt;P&gt;*STOP.&lt;/P&gt;&lt;P&gt;*leave to screen 0.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 08:06:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865028#M364796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T08:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865029#M364797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give p_orgin in capital letters&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'P_ORGIN' for user sy-uname....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 08:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865029#M364797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T08:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865030#M364798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sy-subrc will be 12, when&lt;/P&gt;&lt;P&gt;Specified object not maintained in the user master record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So check whetehr it is maintained and specify &amp;lt;b&amp;gt;'P_ORIGIN'&amp;lt;/b&amp;gt; in caps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f (see SAP authorization concept). &lt;/P&gt;&lt;P&gt;You must specify all authorizations for an object and a also a value for each ID (or DUMMY). &lt;/P&gt;&lt;P&gt;The system checks the values for the IDs by AND-ing them together, i.e. all values must be part of an authorization assigned to the user. &lt;/P&gt;&lt;P&gt;If a user has several authorizations for an object, the values are OR-ed together. This means that if the CHECK finds all the specified values in one authorization, the user can proceed. Only if none of the authorizations for a user contains all the required values is the user rejected. &lt;/P&gt;&lt;P&gt;If the return code value in SY-SUBRC is 0, the user has the required authorization and may continue. &lt;/P&gt;&lt;P&gt;The return code value changes according to the different error scenarios. The return code values have the following meaning: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4 &lt;/P&gt;&lt;P&gt;User has no authorization in the SAP System for such an action. If necessary, change the user master record. &lt;/P&gt;&lt;P&gt;8 &lt;/P&gt;&lt;P&gt;Too many parameters (fields, values). Maximum allowed is 10. &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;12 &lt;/P&gt;&lt;P&gt;Specified object not maintained in the user master record.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;16 &lt;/P&gt;&lt;P&gt;No profile entered in the user master record. &lt;/P&gt;&lt;P&gt;24 &lt;/P&gt;&lt;P&gt;The field names of the check call do not match those of an authorization. Either the authorization or the call is incorrect. &lt;/P&gt;&lt;P&gt;28 &lt;/P&gt;&lt;P&gt;Incorrect structure for user master record. &lt;/P&gt;&lt;P&gt;32 &lt;/P&gt;&lt;P&gt;Incorrect structure for user master record. &lt;/P&gt;&lt;P&gt;36 &lt;/P&gt;&lt;P&gt;Incorrect structure for user master record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the return code value is 8 or 24, inform the person responsible for the program. If the return code value is 4, 12, 16 or 24, consult your system administrator if you think you should have the relevant authorization. In the case of errors 28 to 36, contact SAP because authorizations have probably been destroyed. &lt;/P&gt;&lt;P&gt;Individual authorizations are assigned to users in their respective user profiles, i.e. they are grouped together in profiles which are stored in the user master record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 08:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865030#M364798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T08:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865031#M364799</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;AT selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'p_orgin' for user sy-uname&lt;/P&gt;&lt;P&gt;ID 'INFTY' FIELD '*'&lt;/P&gt;&lt;P&gt;ID 'SUBTY' FIELD '*'&lt;/P&gt;&lt;P&gt;ID 'AUTHC' FIELD '*'&lt;/P&gt;&lt;P&gt;ID 'PERSA' FIELD '*'&lt;/P&gt;&lt;P&gt;ID 'VDSK1' FIELD '*'&lt;/P&gt;&lt;P&gt;ID 'PROFL' FIELD '*'&lt;/P&gt;&lt;P&gt;ID 'PERSG' FIELD '*'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc NE 0 .&lt;/P&gt;&lt;P&gt;message i007.&lt;/P&gt;&lt;P&gt;*leave to list-processing.&lt;/P&gt;&lt;P&gt;*STOP.&lt;/P&gt;&lt;P&gt;*leave to screen 0.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the Field you need to use the values for those fields to check the same, if you do not want to check then then use DUMMY instead of the '*'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 08:11:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865031#M364799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T08:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865032#M364800</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;It is a good practise to use option 'Pattern' from toolbar to implement authority-checks to avoid typing errors...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 08:12:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865032#M364800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T08:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865033#M364801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt; the sy-subrc has changed now to 4. &lt;/P&gt;&lt;P&gt;Though in the user master I am having * in for all the fields . &lt;/P&gt;&lt;P&gt;Now what cud havee been the p[ossible reason for statement failure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 08:13:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865033#M364801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T08:13: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/1865034#M364802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;abap80,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Fm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'AUTHORITY_CHECK'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              user                = sy-uname&lt;/P&gt;&lt;P&gt;              object              = l_object&lt;/P&gt;&lt;P&gt;              field1              = l_field1&lt;/P&gt;&lt;P&gt;              value1              = l_value1&lt;/P&gt;&lt;P&gt;              field2              = l_field2&lt;/P&gt;&lt;P&gt;              value2              = l_value2&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              user_dont_exist     = 1&lt;/P&gt;&lt;P&gt;              user_is_authorized  = 2&lt;/P&gt;&lt;P&gt;              user_not_authorized = 3&lt;/P&gt;&lt;P&gt;              user_is_locked      = 4&lt;/P&gt;&lt;P&gt;              OTHERS              = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 2.&lt;/P&gt;&lt;P&gt;      MOVE sy-subrc TO l_value1.&lt;/P&gt;&lt;P&gt;      MESSAGE e998(zmamap) WITH sy-uname l_value1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls.Mark if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 08:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865034#M364802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T08:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865035#M364803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Specify:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ID 'INFTY' FIELD 'DUMMY'&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;if the access right for eg infotype is irrelevant for you, otherwise try:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ID 'INFTY' FIELD '107'&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;if you want to check access right for given eg infotype...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 08:24:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865035#M364803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T08:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865036#M364804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answers given by were really helpful .&lt;/P&gt;&lt;P&gt;My sincere thanks to all of u who came up with the kind gesture.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2007 09:46:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check/m-p/1865036#M364804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-05T09:46:59Z</dc:date>
    </item>
  </channel>
</rss>

