<?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 regd autherisation code for a field in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-autherisation-code-for-a-field/m-p/3937068#M942122</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have one user-exit requirement in VA01 . in va01 i need to provide the autherisation on ORDER-REASION field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:in order resion field F4 (have 5 option there, autherised user need to secect one then document saved else it will the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on my autherisaion code basis will create a role and they will assign the users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any special code to provide autherisations for users.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 May 2008 12:31:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-27T12:31:52Z</dc:date>
    <item>
      <title>regd autherisation code for a field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-autherisation-code-for-a-field/m-p/3937068#M942122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have one user-exit requirement in VA01 . in va01 i need to provide the autherisation on ORDER-REASION field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:in order resion field F4 (have 5 option there, autherised user need to secect one then document saved else it will the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on my autherisaion code basis will create a role and they will assign the users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any special code to provide autherisations for users.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 12:31:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regd-autherisation-code-for-a-field/m-p/3937068#M942122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T12:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: regd autherisation code for a field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regd-autherisation-code-for-a-field/m-p/3937069#M942123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this (not sure if I get your requirement):&lt;/P&gt;&lt;P&gt;Authorization Check in ABAP Programs&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;object is the name of an authorization object. With name1, name2 ... , and so on, you must list all fields of the authorization object object. With  f1, f2 ... , and so on, you must specify the values that the system is to check against the entries in the relevant authorization of the user master record. The AUTHORITY-CHECK statement searches for the specified object in the user profile and checks the useru2019s authorizations for all values of f1, f2 ... . You can avoid checking a field name1, name2 ... by replacing FIELD f1  FIELD f2 with DUMMY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the FIELD addition, you can only specify an elementary field, not a selection table. However, there are function modules available that execute the AUTHORITY-CHECK statement for all values of selection tables. The AUTHORITY-CHECK statement is supported by a statement pattern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only if the user has all authorizations, is the return value sy-subrc of the AUTHORITY-CHECK statement set to 0. The most important return values are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        0: The user has an authorization for all specified values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        4: The user does not have the authorization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        8: The number of specified fields is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        12: The specified authorization object does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A list of all possible return values is available in the ABAP keyword documentation. The content of sy-subrc has to be closely examined to ascertain the result of the authorization check and react accordingly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_authorithy_check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS pa_carr LIKE sflight-carrid.&lt;/P&gt;&lt;P&gt;DATA wa_flights LIKE demo_focc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  AUTHORITY-CHECK OBJECT 'S_CARRID'&lt;/P&gt;&lt;P&gt;                  ID 'CARRID' FIELD pa_carr&lt;/P&gt;&lt;P&gt;                  ID 'ACTVT' FIELD '03'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 4.&lt;/P&gt;&lt;P&gt;    MESSAGE e045(sabapdocu) WITH pa_carr.&lt;/P&gt;&lt;P&gt;  ELSEIF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e184(sabapdocu) WITH text-010.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT  carrid connid fldate seatsmax seatsocc&lt;/P&gt;&lt;P&gt;    FROM  sflight&lt;/P&gt;&lt;P&gt;    INTO  CORRESPONDING FIELDS OF wa_flights&lt;/P&gt;&lt;P&gt;    WHERE carrid = pa_carr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE: / wa_flights-carrid,&lt;/P&gt;&lt;P&gt;             wa_flights-connid,&lt;/P&gt;&lt;P&gt;             wa_flights-fldate,&lt;/P&gt;&lt;P&gt;             wa_flights-seatsmax,&lt;/P&gt;&lt;P&gt;             wa_flights-seatsocc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the system checks with the authorization object S_CARRID whether or not the user has a display authorization (03) for the airline entered on a selection screen. If this is not the case, or a different error occurs, the Selection Screen Processing goes back to the display of the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 12:36:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regd-autherisation-code-for-a-field/m-p/3937069#M942123</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-05-27T12:36:36Z</dc:date>
    </item>
  </channel>
</rss>

