<?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 on the Transaction Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558761#M1268562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, David Barber,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur reply.&lt;/P&gt;&lt;P&gt;But after I try to copy the two forms TABLEPROC and TABLE_GET_DATA into my new customised include program which i created in my main program in my function group, those variable in the two forms just now keep saying unknown variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea to overcome this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jun 2009 01:40:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-04T01:40:10Z</dc:date>
    <item>
      <title>Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558752#M1268553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;My requirement is that i need authority check on field WERKS for a transaction code which is having SM30 as Transaction and the view name a table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 10:32:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558752#M1268553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T10:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558753#M1268554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code demonstrates how to check that a user has the correct authority for a particular&lt;/P&gt;&lt;P&gt;transaction code. Useful to check if a user has the correct authority before executing a transaction via&lt;/P&gt;&lt;P&gt;BDC input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;authority-check object 'S_TCODE'&lt;/P&gt;&lt;P&gt;                id     'TCD'&lt;/P&gt;&lt;P&gt;                field  'SM35'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  User does not have authority for transaction SM35!!!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&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;SG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 10:39:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558753#M1268554</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T10:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558754#M1268555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;A method is to put the authority check in the table maintainance generator.&lt;/P&gt;&lt;P&gt;In the table maintainance generator you can change code either by modifying the screen or adding the events as required. Over here you can try to put your authority check because u want the authority at data level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that there is a risk involved in this method.&lt;/P&gt;&lt;P&gt;Incase the table maintainance generator is regenerated then your code changes will be lost.&lt;/P&gt;&lt;P&gt;So you will have to take a backup incase you regenerate the table maintainance generator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 10:48:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558754#M1268555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T10:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558755#M1268556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I have just done the same thing. I tried a few ways but found problems with most of them. You seem to end up with loads of blank lines and things like that if you use the PBO / PAI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I did was create a custom include (ZAUTHCHECK for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then go to include LSVIMFTX and copy form TABLEPROC and put it in your custom include and call it ZTABLEPROC. Then find form TABLE_GET_DATA in include LSVIMFTX and copy it into your custom include and call it ZTABLE_GET_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in your custom include find the line that says "PERFORM table_get_data' and change it to "PERFORM ztable_get_data.".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in ZTABLE_GET_DATA find the line that says "SELECT * FROM (x_header-maintview) INTO TABLE &amp;lt;primtab&amp;gt;.". At this point &amp;lt;primtab&amp;gt; has your raw data in, so just loop through it assigning a new field symbol and do the auth check that you need and delete &amp;lt;primtab&amp;gt; if the auth check fails. This means the non authorised data will never get passed to the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally go to the function group that the table view belongs to and in the main program add your custom include then find the function module called "TABLEPROC_Zxxxxxxxxx" and change the 1 line in there to read "PERFORM ZTABLEPROC".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The good thing about this is that I do not think it will get reset if the tableview regenerates, as the custom includes do not get overridden. I tried changing a view and it did not get lost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bad thing obvisouly is that we have created Z versions of 2 standard subroutines, so if any notes come out for them we will not get them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is of some help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 16:39:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558755#M1268556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T16:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558756#M1268557</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;So, after we copy and paste those coding to our new customised include, all the variable that are used should be declared again or no necessary?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 10:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558756#M1268557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T10:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558757#M1268558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;check out the function module   'AUTHORITY_CHECK_TCODE'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 10:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558757#M1268558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T10:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558758#M1268559</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 in FM 'AUTH_CHECK_TCODE' if exception is ok then there is authority check .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call 'AUTH_CHECK_TCODE'&lt;/P&gt;&lt;P&gt;       id 'TCODE' field tcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    raise ok.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    message i077(s#) with tcode raising not_ok.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aswarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 11:17:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558758#M1268559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T11:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558759#M1268560</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;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;authority-check object 'S_TCODE'&lt;/P&gt;&lt;P&gt;id 'TCD' &lt;/P&gt;&lt;P&gt;field 'SM30'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;User does not have authority for transaction SM30!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way is you can use the FM AUTHORITY_CHECK_TCODE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 13:06:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558759#M1268560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T13:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558760#M1268561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. There is no need to declare anything except any new variables you may want to use as part of your authority check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because the new include is declared in the same top include of your original function group all the original variables will be there already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 14:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558760#M1268561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T14:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Authority Check on the Transaction Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558761#M1268562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, David Barber,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur reply.&lt;/P&gt;&lt;P&gt;But after I try to copy the two forms TABLEPROC and TABLE_GET_DATA into my new customised include program which i created in my main program in my function group, those variable in the two forms just now keep saying unknown variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea to overcome this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 01:40:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-on-the-transaction-code/m-p/5558761#M1268562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T01:40:10Z</dc:date>
    </item>
  </channel>
</rss>

