<?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 Object for Z-Report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867804#M1138064</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;there are so many posts on how to create authorization object so search for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after creating it you have to code like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN.
  DATA: h_werks LIKE t500p OCCURS 0 WITH HEADER LINE ,
        h_funkt LIKE t591a OCCURS 0 WITH HEADER LINE .
  REFRESH :h_werks[] , h_funkt .
  CLEAR :h_werks , h_funkt .
  SELECT * FROM t500p INTO TABLE h_werks WHERE persa IN s_werks .
  SELECT * FROM t591a INTO TABLE h_funkt WHERE infty = '0034' AND subty IN s_funkt.

  LOOP AT h_werks .
    LOOP AT h_funkt .
      AUTHORITY-CHECK OBJECT 'Z_HR_AUTH'
               ID 'PERSA' FIELD h_werks-persa
               ID 'FUNKT' FIELD h_funkt-subty.
      IF sy-subrc NE 0.
        MESSAGE e001(zhrrep) WITH h_werks-persa h_funkt-subty .
      ENDIF.
    ENDLOOP.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this tell basis people to maintain that object&lt;/P&gt;&lt;P&gt;in roles or profiles of users with the values you give them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex: here in this case 'Z_HR_AUTH' is the auth object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Dec 2008 07:22:59 GMT</pubDate>
    <dc:creator>GauthamV</dc:creator>
    <dc:date>2008-12-03T07:22:59Z</dc:date>
    <item>
      <title>Authorization Object for Z-Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867799#M1138059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create an authorization object for a Z-Report where i need that the employee who has logged in, should be able to see the data for Only his Personnel Area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. I have 18 Personnel Areas, but i fall in 1 of them so i want that when i open a Z-Tcode, the F4 help for the Personnel Areas should only show the PA under which i fall.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should i do that? and plz tell me whether it is a job of ABAP person or BASIS person?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;Prateek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:01:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867799#M1138059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-03T07:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization Object for Z-Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867800#M1138060</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;you have to create a authorization object and put it in at selection-screen event in report&lt;/P&gt;&lt;P&gt;and ask your basis people to maintain that authorization objectwith respective values&lt;/P&gt;&lt;P&gt;in the role or profiles of the users.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867800#M1138060</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2008-12-03T07:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization Object for Z-Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867801#M1138061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx for replying but i need to know how do i create an authorization object &amp;amp; basis people are asking that its not their job, it cud be done only with ABAP coding... so please tell me the correct way to tell the basis people.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867801#M1138061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-03T07:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization Object for Z-Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867802#M1138062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT u2019S_TRVL_BKSu2019&lt;/P&gt;&lt;P&gt;ID u2019ACTVTu2019 FIELD u201902u2019&lt;/P&gt;&lt;P&gt;ID u2019CUSTTYPEu2019 FIELD u2019Bu2019.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE E...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the authority object assigned in above code is to be created by basis person&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: amit kumar on Dec 3, 2008 12:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867802#M1138062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-03T07:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization Object for Z-Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867803#M1138063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Creation of authorization object and calling it in the program is the job of the developer. Assigning of authorization is the job of basis guy. You can use the transaction SU21 to create the authroization objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:16:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867803#M1138063</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2008-12-03T07:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization Object for Z-Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867804#M1138064</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;there are so many posts on how to create authorization object so search for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after creating it you have to code like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN.
  DATA: h_werks LIKE t500p OCCURS 0 WITH HEADER LINE ,
        h_funkt LIKE t591a OCCURS 0 WITH HEADER LINE .
  REFRESH :h_werks[] , h_funkt .
  CLEAR :h_werks , h_funkt .
  SELECT * FROM t500p INTO TABLE h_werks WHERE persa IN s_werks .
  SELECT * FROM t591a INTO TABLE h_funkt WHERE infty = '0034' AND subty IN s_funkt.

  LOOP AT h_werks .
    LOOP AT h_funkt .
      AUTHORITY-CHECK OBJECT 'Z_HR_AUTH'
               ID 'PERSA' FIELD h_werks-persa
               ID 'FUNKT' FIELD h_funkt-subty.
      IF sy-subrc NE 0.
        MESSAGE e001(zhrrep) WITH h_werks-persa h_funkt-subty .
      ENDIF.
    ENDLOOP.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this tell basis people to maintain that object&lt;/P&gt;&lt;P&gt;in roles or profiles of users with the values you give them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex: here in this case 'Z_HR_AUTH' is the auth object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:22:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867804#M1138064</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2008-12-03T07:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization Object for Z-Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867805#M1138065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goto SU21--&amp;gt; you will find create button below application toolbar --&amp;gt; click create Object Class (you may use existing Object class to hold your Authorization Object, in that case no need to follow this step) --&amp;gt; Select Object class from left side, right click and select Create Authorization Object --&amp;gt; Open another session and create one Z data element and Z domain in it, assign possible values you want to use in Authorization in Values of domain --&amp;gt; Double click on Authorization Object and mention field name as data element name you have created and activated in last step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now your Authorization Object is ready for use in program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your Z program you can check Authorization by &lt;/P&gt;&lt;P&gt;  AUTHORITY-CHECK OBJECT &amp;lt;Authorization Object&amp;gt;&lt;/P&gt;&lt;P&gt;            ID &amp;lt;field name&amp;gt; FIELD &amp;lt;value&amp;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;Take action for no Authorization  &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;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:24:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867805#M1138065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-03T07:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization Object for Z-Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867806#M1138066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx for the reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:25:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-for-z-report/m-p/4867806#M1138066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-03T07:25:36Z</dc:date>
    </item>
  </channel>
</rss>

