<?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: Verify Authorization for a differnt UserID in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225436#M769324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See my post above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2008 14:28:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-09T14:28:55Z</dc:date>
    <item>
      <title>Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225428#M769316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;     Hope you are all doing great.  I need some help from the experts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is that I am storing UserID in a Table Field as input from end users.  I have to make sure that the entered Userid (not the current end user) has a authorization for a given auth Object field/value combination.  I did a search for Function Modules that begin with Authority_Check but didn't see any obvious ones.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this should be possible, i.e. "AUTHORITY-CHECK OBJECT 'xx' " with also supplying the UserID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you know how to do so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 03:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225428#M769316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T03:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225429#M769317</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;see this link for creating the authority check object,field creating and the syntax need to be used in the program.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 04:04:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225429#M769317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T04:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225430#M769318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;Login to SAP with the normal user and click on the Form Settings button (the one with some little gears) situated in the tools bar .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 04:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225430#M769318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T04:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225431#M769319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Bharat.  I looked at the help earlier.  It shows regular check for current logged in user. note some random user. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hema, not sure what u r referring to. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the Function Code Behind the Authority-check but it gives me Another Auth Error.  Still tryng to find out what is the Auth error running the code bewow. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="8" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;REPORT  ZAUTHCHECK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZAUTHCHECK &lt;/P&gt;&lt;P&gt;*&amp;amp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; &lt;/P&gt;&lt;P&gt;*&amp;amp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'begin of test'. &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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NEW_BUFFERING             = 3 &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   USER                      = 'SAPID' &lt;/P&gt;&lt;P&gt;    OBJECT                    = 'B_USERSTAT' &lt;/P&gt;&lt;P&gt;    FIELD1                    = 'BERSL' &lt;/P&gt;&lt;P&gt;    VALUE1                    = 'PS_APPD' &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD2                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE2                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD3                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE3                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD4                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE4                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD5                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE5                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD6                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE6                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD7                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE7                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD8                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE8                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD9                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE9                    = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD10                   = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUE10                   = ' ' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER_DONT_EXIST           = 1 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER_IS_AUTHORIZED        = 2 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER_NOT_AUTHORIZED       = 3 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER_IS_LOCKED            = 4 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                    = 5 &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          . &lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'End of Check.'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 04:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225431#M769319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T04:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225432#M769320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;For the issue you stated you can use AUTHORITY-CHECK OBJECT ... The syantx for it is&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT objectname &lt;/P&gt;&lt;P&gt;    ID userid1  FIELD fieldvalue1&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    ID userid10 FIELD fieldvalue10. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) you have to create the authorization object...you can ask Basis people to create it.&lt;/P&gt;&lt;P&gt;2) specify proper values to it...&lt;/P&gt;&lt;P&gt;3) Now in the program you can  check the authorization against the required user id and the then process further...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          Hope this will solve your issue....If not let me know..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard....&lt;/P&gt;&lt;P&gt;Reward if useful !!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 04:24:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225432#M769320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T04:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225433#M769321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please chk this link&lt;/P&gt;&lt;P&gt;[Authorization for user|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/concept&lt;EM&gt;of&lt;/EM&gt;Authorization&lt;EM&gt;For&lt;/EM&gt;users&amp;amp;]&lt;/P&gt;&lt;P&gt;in the code &lt;/P&gt;&lt;P&gt; &lt;EM&gt;AUTHORITY-CHECK OBJECT 'ZAUTH'  for userid&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;EM&gt;ID 'ACTVT' FIELD '02'.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;EM&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;EM&gt;APPEND 'EDIT' TO fcode.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;EM&gt;ENDIF.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where user id contains the userid from the table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 04:36:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225433#M769321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T04:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225434#M769322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried the "For userID' addition as below, but it fails the syntex check.  It looked to be the most promising though &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I aa familier with the regualr Authority-Check... but it runs for the logged in user.  I want to run it for some other users.  All the authorizations fields - roles - profiles, are already there.  I want to be able to  check as if the user was actually logged in. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be I didn't word the question right.&lt;/P&gt;&lt;P&gt;I want to do 'Authorization-check' in the program for some other user, who is currently NOT running the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for all the input so far. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************&lt;/P&gt;&lt;P&gt;REPORT  ZZAUTHCHECK                             .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: / 'beging test'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;authority-check object 'A_ALL' for 'sapuser'&lt;/P&gt;&lt;P&gt;id 'M_ACT_PER' field '30'&lt;/P&gt;&lt;P&gt;id 'BUKRS' field '*'.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC 0. &lt;/P&gt;&lt;P&gt;write: / 'sy-subrc = 0'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: / 'end test'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="12" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 05:12:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225434#M769322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T05:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225435#M769323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nevermind.  I found an answer.  It was in my face. When I inserted the Authority-Check using the pattern, the Exceptions section was commented out.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For others:  How to to check for authorization for a user other than the one running the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insert Function Module "Authority_Check" using Edit -&amp;gt; Pattern.  Pass appropriate parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure you UNCOMMENT THE EXCEPTIONS SECTION!!!  Normally it is for other functions, but not this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: brd drb on Jan 9, 2008 9:29 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 14:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225435#M769323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T14:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Verify Authorization for a differnt UserID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225436#M769324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See my post above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 14:28:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-authorization-for-a-differnt-userid/m-p/3225436#M769324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T14:28:55Z</dc:date>
    </item>
  </channel>
</rss>

