<?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 objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825432#M352229</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;Please check the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6859e07211d2acb80000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6859e07211d2acb80000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapsecurityonline.com/r3_security/r3_security_tips.htm" target="test_blank"&gt;http://www.sapsecurityonline.com/r3_security/r3_security_tips.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jan 2007 10:53:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-24T10:53:42Z</dc:date>
    <item>
      <title>authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825431#M352228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;       can any body help me what are authorization objects and how they are use full in abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how they can be created&lt;/P&gt;&lt;P&gt;how to implement in my z-prog / z-tables etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mukesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 10:50:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825431#M352228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T10:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825432#M352229</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;Please check the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6859e07211d2acb80000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6859e07211d2acb80000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapsecurityonline.com/r3_security/r3_security_tips.htm" target="test_blank"&gt;http://www.sapsecurityonline.com/r3_security/r3_security_tips.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 10:53:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825432#M352229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T10:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825433#M352230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;P&gt;By using this authorization objectsm we restrict the userd not to use soem transaction code. and we might restrict the users not to use some data ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the below documantation &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Authorization Check for Transactions&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;You can directly link authorization objects with transaction codes. You can enter values for the fields of an authorization object in the transaction maintenance. Before the transaction is executed, the system compares these values with the values in the user master record and only starts the transaction if the appropriate authorization exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Authorization Check for ABAP Programs&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;For ABAP programs, the two objects S_DEVELOP (program development and program execution) and S_PROGRAM (program maintenance) exist. They contains a field P_GROUP that is connected with the program attribute authorization group. Thus, you can assign users program-specific authorizations for individual ABAP programs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Authorization Check in ABAP Programs&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;A more sophisticated, user-programmed authorization check is possible using the Authority-Check statement. It allows you to check the entries in the user master record for specific authorization objects against any other values. Therefore, if a transaction or program is not sufficiently protected or not every user that is authorized to use the program can also execute all the actions, this statement must be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT object&lt;/P&gt;&lt;P&gt;                        ID name1 FIELD f1&lt;/P&gt;&lt;P&gt;                        ID name2 FIELD f2&lt;/P&gt;&lt;P&gt;                        ...&lt;/P&gt;&lt;P&gt;                        ID namen FIELD fn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the Simpel Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT demo_authorithy_check.

PARAMETERS pa_carr LIKE sflight-carrid.
DATA wa_flights LIKE demo_focc.

AT SELECTION-SCREEN.

  AUTHORITY-CHECK OBJECT 'S_CARRID'
                  ID 'CARRID' FIELD pa_carr
                  ID 'ACTVT' FIELD '03'.

  IF sy-subrc = 4.
    MESSAGE e045(sabapdocu) WITH pa_carr.
  ELSEIF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE e184(sabapdocu) WITH text-010.
  ENDIF.

START-OF-SELECTION.

  SELECT  carrid connid fldate seatsmax seatsocc
    FROM  sflight
    INTO  CORRESPONDING FIELDS OF wa_flights
    WHERE carrid = pa_carr.

    WRITE: / wa_flights-carrid,
             wa_flights-connid,
             wa_flights-fldate,
             wa_flights-seatsmax,
             wa_flights-seatsocc.

  ENDSELECT.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 10:53:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825433#M352230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T10:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825434#M352231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;authorization objects are ones which are used to check whether an user has access to an object or not. If the user has access he can use the object else he will be exited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the user needs to be assigned a role with the authorization object and associated fields.&lt;/P&gt;&lt;P&gt; in program u need to write as...&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT '&amp;lt;authotiry object name&amp;gt;'&lt;/P&gt;&lt;P&gt;ID '&amp;lt;field name&amp;gt;' FIELD '&amp;lt;field value&amp;gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say authority object created as F_BKPF_BUP &amp;amp; field for T001B-BRGRU has 0001 &amp;amp; 0002.&lt;/P&gt;&lt;P&gt;the user has access to T001B-BRGRU = 0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now,&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'F_BKPF_BUP'&lt;/P&gt;&lt;P&gt;ID 'BRGRU' VALUE '0001'.&lt;/P&gt;&lt;P&gt;User can't access object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'F_BKPF_BUP'&lt;/P&gt;&lt;P&gt;ID 'BRGRU' VALUE '0002'.&lt;/P&gt;&lt;P&gt;User can access object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 10:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825434#M352231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T10:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825435#M352232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Authorisation objects are used to restrict certain transactions to users.Critical data must be protected from unauthorised users.For example,the head has access to certain data.But it cannot be accessed by his subordinate.For this we need to define roles.&lt;/P&gt;&lt;P&gt;&amp;#149;Create an authorization object with transaction SU21.&lt;/P&gt;&lt;P&gt;An object usually consists of the ACTVT (activity) field and one other field,which specifies the data type to be protected.By ACTVT, we can decide if the data is accessible for change,display only etc.&lt;/P&gt;&lt;P&gt;&amp;#149;Add authorization fields to the authorization object created.&lt;/P&gt;&lt;P&gt;&amp;#149;Assign the authorization object to the transaction using SE93.&lt;/P&gt;&lt;P&gt;Attach the authorization object to the role using transaction PFCG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Beejal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Reward if answer is helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 11:05:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825435#M352232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T11:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825436#M352233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DEAR Sudheer,&lt;/P&gt;&lt;P&gt;                        THANKS A LOT,                         &lt;/P&gt;&lt;P&gt;THAT IS FINE , BUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 . HOW TO CREATE IT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. WHO / HOW AND WHERE I FEED THAT FILEDS DATA ON USERS LEVEL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR EXP. &lt;/P&gt;&lt;P&gt;             IF I WANT TO RESTRICT REPORT  FOR A USER NOT TO RUN FOR PERTICULAR PLANT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tHANKS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MUKESH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 11:22:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825436#M352233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T11:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825437#M352234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;            now if i create it and put it in t-code &amp;amp; in prog. and then what happen when&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. object not assign to user&lt;/P&gt;&lt;P&gt;2. object assign to user but revelant fileds data not assign to user&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mukesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 11:50:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825437#M352234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T11:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825438#M352235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Creation of authorisation objects can be done in se80.&lt;/P&gt;&lt;P&gt;If you open a package and right click you can choose create.  Then select others, then authorization object.&lt;/P&gt;&lt;P&gt;You can create authorisation objects there and also add fields .&lt;/P&gt;&lt;P&gt;If you assign these authorisation objects to profiles in your roles (and limit these to certain values), users who have these roles have authorisation for these objects will have this authorisation, others won't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your report you can do the check for the authorisation object as shown in other replies in this thread.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AUTHORITY-CHECK OBJECT '&amp;lt;authotiry object name&amp;gt;'
ID '&amp;lt;field name&amp;gt;' FIELD '&amp;lt;field value&amp;gt;'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Dries Horions&lt;/P&gt;&lt;P&gt;I see  Beejal replied while I was typing this, transaction SU21 can indeed also be used to create authorisation objects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 11:53:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825438#M352235</guid>
      <dc:creator>dhorions</dc:creator>
      <dc:date>2007-01-24T11:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: authorization objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825439#M352236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mukesh,&lt;/P&gt;&lt;P&gt;Use the following code.&lt;/P&gt;&lt;P&gt;TABLES t001w.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS s_werks FOR t001w-werks.&lt;/P&gt;&lt;P&gt;PARAMETERS p_werks type t001w-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data s_werk TYPE SD_WERKS_RANGES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;APPEND LINES OF s_werks TO s_werk.&lt;/P&gt;&lt;P&gt;CALL METHOD zkltest=&amp;gt;validate_plant&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    so_werks = s_werk&lt;/P&gt;&lt;P&gt;    p_werks  = p_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE 'SUCCESSFUL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD validate_plant.&lt;/P&gt;&lt;P&gt;  DATA : l_flag    TYPE c,&lt;/P&gt;&lt;P&gt;         l_message TYPE string VALUE 'You are not Authorized to use the following Plants ',&lt;/P&gt;&lt;P&gt;         wa_werks  TYPE ty_werks,&lt;/P&gt;&lt;P&gt;         i_werks   TYPE STANDARD TABLE OF ty_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF so_werks IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT werks FROM t001w "Do this only if Select-options is passes&lt;/P&gt;&lt;P&gt;               INTO TABLE i_werks&lt;/P&gt;&lt;P&gt;               WHERE werks IN so_werks.&lt;/P&gt;&lt;P&gt;elseif p_werks IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT werks FROM t001w "Do this if Parameter is passed&lt;/P&gt;&lt;P&gt;               INTO TABLE i_werks&lt;/P&gt;&lt;P&gt;               WHERE werks = p_werks.&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;  LOOP AT i_werks INTO wa_werks.&lt;/P&gt;&lt;P&gt;    AUTHORITY-CHECK OBJECT 'M_MATE_WRK'&lt;/P&gt;&lt;P&gt;             ID 'ACTVT' FIELD '03'&lt;/P&gt;&lt;P&gt;             ID 'WERKS' FIELD wa_werks-werks.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      l_flag = '1'.&lt;/P&gt;&lt;P&gt;      CONCATENATE l_message ', ' wa_werks INTO l_message.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF l_flag EQ '1'.&lt;/P&gt;&lt;P&gt;    CLEAR : so_werks,&lt;/P&gt;&lt;P&gt;            p_werks.&lt;/P&gt;&lt;P&gt;    MESSAGE l_message TYPE 'W'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 10:53:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-objects/m-p/1825439#M352236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-21T10:53:32Z</dc:date>
    </item>
  </channel>
</rss>

