<?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: user restriction for report data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250441#M1383607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to create an authorization object and use in your program&lt;/P&gt;&lt;P&gt;amd maintain authorization values in user profiles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  TABLES : PA0001,pa0034.
   SELECT-OPTIONS:  S_WERKS FOR PA0001-WERKS , "Personnel Area
                   S_BTRTL FOR PA0001-BTRTL , "Personnel Subarea
                   S_PERSG FOR PA0001-PERSG , "Employee Group
                   S_PERSK FOR PA0001-PERSK . "Employee Subgroup
 SELECT-OPTIONS: S_FUNKT   FOR PA0034-FUNKT.
 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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2009 07:04:06 GMT</pubDate>
    <dc:creator>GauthamV</dc:creator>
    <dc:date>2009-09-24T07:04:06Z</dc:date>
    <item>
      <title>user restriction for report data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250439#M1383605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii,&lt;/P&gt;&lt;P&gt;i want to put restriction on user to view data of other plant in my z report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example &lt;/P&gt;&lt;P&gt;user of plant 100 can view details of plant 100 only&lt;/P&gt;&lt;P&gt;if he enter plant 200 in report ..error msg pop up..or no data found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 06:58:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250439#M1383605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T06:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: user restriction for report data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250440#M1383606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the authorization object and use them in ur program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:01:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250440#M1383606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T07:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: user restriction for report data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250441#M1383607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to create an authorization object and use in your program&lt;/P&gt;&lt;P&gt;amd maintain authorization values in user profiles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  TABLES : PA0001,pa0034.
   SELECT-OPTIONS:  S_WERKS FOR PA0001-WERKS , "Personnel Area
                   S_BTRTL FOR PA0001-BTRTL , "Personnel Subarea
                   S_PERSG FOR PA0001-PERSG , "Employee Group
                   S_PERSK FOR PA0001-PERSK . "Employee Subgroup
 SELECT-OPTIONS: S_FUNKT   FOR PA0034-FUNKT.
 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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250441#M1383607</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2009-09-24T07:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: user restriction for report data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250442#M1383608</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;After collecting all the desired data into final internal table.&lt;/P&gt;&lt;P&gt;use If condition and restrict use to view data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-uname = First user.&lt;/P&gt;&lt;P&gt;delete it_final where werks = '100'.&lt;/P&gt;&lt;P&gt;elseif sy-uname = Second_user.&lt;/P&gt;&lt;P&gt;delete it_final where werks = '200'.&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 this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250442#M1383608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T07:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: user restriction for report data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250443#M1383609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/SPE/CONS_GET_PLANTS_USER&lt;/P&gt;&lt;P&gt;will this FM help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:12:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250443#M1383609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T07:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: user restriction for report data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250444#M1383610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank u ppl..&lt;/P&gt;&lt;P&gt;let me try..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-restriction-for-report-data/m-p/6250444#M1383610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T07:22:34Z</dc:date>
    </item>
  </channel>
</rss>

