<?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 Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-problem/m-p/5729148#M1299656</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;Do like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"get user county
user_molga = ...

"get molga for particular record from PA0001
select single MOLGA from T500P 
                     into     ee_molga
                     where PERSA = PA0001-WERKS.  "check EE's personal area here
if sy-subrc = 0.
   if user_molga = ee_molga. 
       "user is authorizated
   else.
       "user is not authorizated
   endif.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2009 16:00:02 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2009-06-09T16:00:02Z</dc:date>
    <item>
      <title>Authority Check Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-problem/m-p/5729147#M1299655</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 am facing a strange problem in SAP HR. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made a Z program and it fetches data from table PA0001. Now the requirement is that if a user from one country is logged on then he/she can't see data of an employee from another country. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For e.g. a french employee can not see an Indian Employee's records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using authority check P_ORGINCON and it is not working I have also tried Function Module HR_CHECK_AUTHORITY_PERNR that too did not work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An employee from one country can still read data from PA0001 of employee of another country. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me on this.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;Abhishek Sahi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 15:35:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-problem/m-p/5729147#M1299655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T15:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-problem/m-p/5729148#M1299656</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;Do like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"get user county
user_molga = ...

"get molga for particular record from PA0001
select single MOLGA from T500P 
                     into     ee_molga
                     where PERSA = PA0001-WERKS.  "check EE's personal area here
if sy-subrc = 0.
   if user_molga = ee_molga. 
       "user is authorizated
   else.
       "user is not authorizated
   endif.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 16:00:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-problem/m-p/5729148#M1299656</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-09T16:00:02Z</dc:date>
    </item>
  </channel>
</rss>

