<?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 code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026016#M415311</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can attach the authorization object to any of the roles you have in PFCG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2007 18:19:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-07T18:19:06Z</dc:date>
    <item>
      <title>Authorization code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026015#M415310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I have the authorization key. I would like to know how to use the B_USERSTAT object to give authorization for this authorization key....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 18:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026015#M415310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-07T18:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026016#M415311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can attach the authorization object to any of the roles you have in PFCG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 18:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026016#M415311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-07T18:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026017#M415312</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;perform authority_check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;double on authority check and it will open up a form for you.&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;      Form  authority_check&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form authority_check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'B_USERSTAT'&lt;/P&gt;&lt;P&gt;         ID 'STSMA' FIELD '      '&lt;/P&gt;&lt;P&gt;         ID 'OBTYP' FIELD '     '&lt;/P&gt;&lt;P&gt;         ID 'BERSL' FIELD '    '&lt;/P&gt;&lt;P&gt;         ID 'ACTVT' FIELD '    '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTH_CLEARED  =  'X'.&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;you have to fill in between '     '  with the information you have .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACTVT is same for all  '01'  for CREATION , '02' FOR CHANGE ETC&lt;/P&gt;&lt;P&gt;endform.                    " authority_check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF AUTH_CLEARED = 'X'.&lt;/P&gt;&lt;P&gt;YOUR REMAINING CODE&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE  : 'NOT AUTHORIZED',&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;&lt;/P&gt;&lt;P&gt;HOPE IAM CLEAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;\VENKI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 18:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026017#M415312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-07T18:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026018#M415313</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;if you want the authorization object for a user , you better contact your security person or  a basis person can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is for your information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want  to assign an object to a user , you have a create  a role in PFCG &lt;/P&gt;&lt;P&gt;and then  create a profile for that role , then assign the object to that role and then give user name for whom you want the authorization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you have compare user profiles and then the user has to log off and log in again in order to be effective.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the user has SAP_ALL already assigned to him this doesn't work.&lt;/P&gt;&lt;P&gt;SAP_ALL is the master of auth objects it just over writes all other auth objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope iam not confusing you with this . Its always better to contact the security incharge . They are in a better position to help you out .If you want anything else , get back to me i can help with the creation of objects , roles , profiles etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;venki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 18:50:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026018#M415313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-07T18:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026019#M415314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Insert  this code in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AUTHORITY-CHECK OBJECT 'B_USERSTAT'
         ID 'STSMA' FIELD '__________'
         ID 'OBTYP' FIELD '__________'
         ID 'BERSL' FIELD &amp;lt;your authorization key&amp;gt;
         ID 'ACTVT' FIELD '__________'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your authorization key will go against BERSL ID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 19:36:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026019#M415314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-07T19:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026020#M415315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI &lt;/P&gt;&lt;P&gt;Please copy and Paste it it will definatly work  I have used in my object.&lt;/P&gt;&lt;P&gt;Do only one change assign your transactioncode instead of my Tcode.&lt;/P&gt;&lt;P&gt;I have marked it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: v_object LIKE UST12-OBJCT VALUE 'S_TCODE' ,
        v_field  LIKE UST12-FIELD VALUE 'TCD',
        v_tcode  LIKE UST12-VON   VALUE 'ZWFP1'.     "&amp;lt;--- Assign your Tcode

*&amp;amp; FUNCTION TO GET THE AUTHORITY CHECK
  CALL FUNCTION 'AUTHORITY_CHECK'                       
    EXPORTING
      user                = sy-uname
      object              = v_object
      field1              = v_field
      value1              = v_tcode
    EXCEPTIONS
      user_dont_exist     = 1
      user_is_authorized  = 2
      user_not_authorized = 3
      user_is_locked      = 4
      OTHERS              = 5.
*    -- If the user does not have proper authorization then display message
  IF sy-subrc &amp;lt;&amp;gt; 2.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    STOP.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2007 19:59:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-code/m-p/2026020#M415315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-07T19:59:46Z</dc:date>
    </item>
  </channel>
</rss>

