<?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: abap in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/3005327#M710158</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer to this link for Authorization Checks in Your Own Developments &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create an Authorization Field&lt;/P&gt;&lt;P&gt;2. Create an Authorization Object&lt;/P&gt;&lt;P&gt;3. Programming Authorization Checks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/52/67167f439b11d1896f0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/52/67167f439b11d1896f0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample program.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:wa_flight TYPE t_flight,&lt;/P&gt;&lt;P&gt;it_flights TYPE t_flighttab.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS so_carr FOR wa_flight-carrid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;for authority-check:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**********************&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;allowed_carriers TYPE RANGE OF t_flight-carrid,&lt;/P&gt;&lt;P&gt;wa_allowed_carr LIKE LINE OF allowed_carriers.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fill a range table with the allowed carriers:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************&lt;/P&gt;&lt;P&gt;SELECT carrid&lt;/P&gt;&lt;P&gt;FROM scarr&lt;/P&gt;&lt;P&gt;INTO wa_allowed_carr-low&lt;/P&gt;&lt;P&gt;WHERE carrid IN so_carr.&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'S_CARRID'&lt;/P&gt;&lt;P&gt;ID 'CARRID' FIELD wa_allowed_carr-low&lt;/P&gt;&lt;P&gt;ID 'ACTVT' FIELD '03'. " display&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;CLEAR wa_allowed_carr.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;wa_allowed_carr-sign = 'I'.&lt;/P&gt;&lt;P&gt;wa_allowed_carr-option = 'EQ'.&lt;/P&gt;&lt;P&gt;APPEND wa_allowed_carr TO allowed_carriers.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://techrepublic.com.com/5100-6329_11-5110893.html#" target="test_blank"&gt;http://techrepublic.com.com/5100-6329_11-5110893.html#&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/ab035.htm" target="test_blank"&gt;http://www.sap-img.com/ab035.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check these posts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="954395"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="954365"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;(all operations). * includes all authorization levels simultaneously, that is it has the same meaning as R, M, W, E, D and S.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;From SAP HELP&lt;/P&gt;&lt;P&gt;...........................&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f (see SAP authorization concept). &lt;/P&gt;&lt;P&gt;You must specify all authorizations for an object and a also a value for each ID (or DUMMY). &lt;/P&gt;&lt;P&gt;The system checks the values for the IDs by AND-ing them together, i.e. all values must be part of an authorization assigned to the user.&lt;/P&gt;&lt;P&gt;............................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I suppose your solution is working NOW, but tommorow?: if you use a solution not supported by SAP, you can't be sure it'll still work in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/ef/4aba3b3bf00152e10000000a114084/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/ef/4aba3b3bf00152e10000000a114084/frameset.htm&lt;/A&gt; &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;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2007 08:09:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-30T08:09:32Z</dc:date>
    <item>
      <title>abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/3005325#M710156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the authority object&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 07:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/3005325#M710156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T07:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/3005326#M710157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using SU21 u can create Authorisation Object. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Details to give an authorisation for ABAP PROGRAMS are as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The smallest unit against which the check should be run is the authorization &lt;/P&gt;&lt;P&gt;field. &lt;/P&gt;&lt;P&gt;The ABAP command AUTHORITY-CHECK is used for performing authorizaton checks in programs. Before accessing the database the user should carry out an &lt;/P&gt;&lt;P&gt;authorization check which is implemented in the ABAP program. The &lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK statement first checks if the user has the authorization &lt;/P&gt;&lt;P&gt;containing all the required values. Then the code value in the system field &lt;/P&gt;&lt;P&gt;SY-SUBRC is checked. If the required value is available for each &lt;/P&gt;&lt;P&gt;authorization field, the check is successful (SY-SUBRC = 0). If the value is &lt;/P&gt;&lt;P&gt;not 0, then the check is unsuccessful, which means that the user does not &lt;/P&gt;&lt;P&gt;possess the required authorization and an error message will be displayed. &lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK sets SY-SUBRC to 4, 8, 12, 16, 24, 28, 32 or 36 depending on &lt;/P&gt;&lt;P&gt;the cause of the authorization failure, e.g. return code 4 means that the &lt;/P&gt;&lt;P&gt;user does not have the required authorization; SY-SUBRC = 8 means that the &lt;/P&gt;&lt;P&gt;check could not successfully be carried out since not all fields of the &lt;/P&gt;&lt;P&gt;object were specified. The field SUBRC is in the APAB Dictionary SYST. To &lt;/P&gt;&lt;P&gt;address the system field in an ABAP program, the form SY-&amp;lt;fieldname&amp;gt; is &lt;/P&gt;&lt;P&gt;used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP syntax of the AUTHORITY-CHECK statement is: &lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT '&amp;lt;object&amp;gt;' (which created by you in SU21) &lt;/P&gt;&lt;P&gt;ID '&amp;lt;name1&amp;gt;' FIELD &amp;lt;f1&amp;gt; (fields given in Authorisation object) &lt;/P&gt;&lt;P&gt;??????????? &lt;/P&gt;&lt;P&gt;ID '&amp;lt;name10&amp;gt;' FIELD &amp;lt;f10&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where &amp;lt;object&amp;gt; is the name of the authorization object that has to be &lt;/P&gt;&lt;P&gt;checked, &amp;lt;name1&amp;gt;,..., &amp;lt;name10&amp;gt; are the authorization fields in the object, &lt;/P&gt;&lt;P&gt;and &amp;lt;f1&amp;gt;,... ,&amp;lt;f10&amp;gt; are the values for which the authorization is to be &lt;/P&gt;&lt;P&gt;checked. If after the field name is entered DUMMY, the check for a &lt;/P&gt;&lt;P&gt;particular field will not be carried out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tcode for Authority object are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SU20 -&lt;/P&gt;&lt;HR originaltext="----------" /&gt;&lt;P&gt;&amp;gt; for authorization field&lt;/P&gt;&lt;P&gt;SU21----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;&amp;gt; Authorization Object&lt;/P&gt;&lt;P&gt;SU22----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;&amp;gt; Assign Authorization Object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to su21 to create the Authority object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implementing in code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'YTM1SD001'&lt;/P&gt;&lt;P&gt;ID 'ACTVT' FIELD '16'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE i003 WITH sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STOP.&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;&lt;/P&gt;&lt;P&gt;call function 'AUTHORITY_CHECK_TCODE'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;tcode = 'YSCC'&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;ok = 0&lt;/P&gt;&lt;P&gt;not_ok = 2.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 2.&lt;/P&gt;&lt;P&gt;message e077(s#) with 'YSCC'. " No authorization to transaction&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Minal Nampalliwar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 07:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/3005326#M710157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T07:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/3005327#M710158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer to this link for Authorization Checks in Your Own Developments &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create an Authorization Field&lt;/P&gt;&lt;P&gt;2. Create an Authorization Object&lt;/P&gt;&lt;P&gt;3. Programming Authorization Checks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/52/67167f439b11d1896f0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/52/67167f439b11d1896f0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample program.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:wa_flight TYPE t_flight,&lt;/P&gt;&lt;P&gt;it_flights TYPE t_flighttab.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS so_carr FOR wa_flight-carrid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;for authority-check:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**********************&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;allowed_carriers TYPE RANGE OF t_flight-carrid,&lt;/P&gt;&lt;P&gt;wa_allowed_carr LIKE LINE OF allowed_carriers.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fill a range table with the allowed carriers:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************&lt;/P&gt;&lt;P&gt;SELECT carrid&lt;/P&gt;&lt;P&gt;FROM scarr&lt;/P&gt;&lt;P&gt;INTO wa_allowed_carr-low&lt;/P&gt;&lt;P&gt;WHERE carrid IN so_carr.&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'S_CARRID'&lt;/P&gt;&lt;P&gt;ID 'CARRID' FIELD wa_allowed_carr-low&lt;/P&gt;&lt;P&gt;ID 'ACTVT' FIELD '03'. " display&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;CLEAR wa_allowed_carr.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;wa_allowed_carr-sign = 'I'.&lt;/P&gt;&lt;P&gt;wa_allowed_carr-option = 'EQ'.&lt;/P&gt;&lt;P&gt;APPEND wa_allowed_carr TO allowed_carriers.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://techrepublic.com.com/5100-6329_11-5110893.html#" target="test_blank"&gt;http://techrepublic.com.com/5100-6329_11-5110893.html#&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/ab035.htm" target="test_blank"&gt;http://www.sap-img.com/ab035.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check these posts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="954395"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="954365"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;(all operations). * includes all authorization levels simultaneously, that is it has the same meaning as R, M, W, E, D and S.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;From SAP HELP&lt;/P&gt;&lt;P&gt;...........................&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f (see SAP authorization concept). &lt;/P&gt;&lt;P&gt;You must specify all authorizations for an object and a also a value for each ID (or DUMMY). &lt;/P&gt;&lt;P&gt;The system checks the values for the IDs by AND-ing them together, i.e. all values must be part of an authorization assigned to the user.&lt;/P&gt;&lt;P&gt;............................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I suppose your solution is working NOW, but tommorow?: if you use a solution not supported by SAP, you can't be sure it'll still work in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/ef/4aba3b3bf00152e10000000a114084/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/ef/4aba3b3bf00152e10000000a114084/frameset.htm&lt;/A&gt; &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;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 08:09:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/3005327#M710158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T08:09:32Z</dc:date>
    </item>
  </channel>
</rss>

