<?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 authorization object assigned to transaction does not work in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368002#M808276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a transaction code reffering to SAP query program. This program should check authorization for company code. In the definition of the transaction (se93) I put F_BKPF_BUK authorization object and specified its fields values: ACTVT = '03', BUKRS = ' '. Because BUKRS is left empty, that means that it is to be read from users roles. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, a user who has company code 1107 defined in the role should run the program, but not for company code 7000 (not defined in the role).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the user can also run the program for this 7000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am realy confused and kindly ask you for help to solve the issue. It is an urgent matter ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rafal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2008 14:30:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-01T14:30:10Z</dc:date>
    <item>
      <title>authorization object assigned to transaction does not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368002#M808276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a transaction code reffering to SAP query program. This program should check authorization for company code. In the definition of the transaction (se93) I put F_BKPF_BUK authorization object and specified its fields values: ACTVT = '03', BUKRS = ' '. Because BUKRS is left empty, that means that it is to be read from users roles. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, a user who has company code 1107 defined in the role should run the program, but not for company code 7000 (not defined in the role).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the user can also run the program for this 7000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am realy confused and kindly ask you for help to solve the issue. It is an urgent matter ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rafal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 14:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368002#M808276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T14:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: authorization object assigned to transaction does not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368003#M808277</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 don't think the authoriation object in SE93 works as you expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The check works as follows, let's say you have object F_BKPF_BUK with values ACTVT = '03', BUKRS = '7000' in the check.  The auth check will look in the user master for the object (F_BKPF_BUK) then the required values for activity and company code.  If there's a match, the check is passed and things continue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you leave BUKRS blank then the value always passes the check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 14:40:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368003#M808277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T14:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: authorization object assigned to transaction does not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368004#M808278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but nonetheless you can achieve your goal: got to tx. SU24 and type in the name of your transaction. then you can show/add values that should be checked when your transaction is run. in your case you might want to consider assigning F_BKPF_BUK in SU24 to be checked in the runtime of your transaction and leave the checking for S_TCODE to SE93.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;of course you would have to create a role which has your transaction code in it (you can also use an existing role). SU24 will now take care that F_BKPF_BUK is added to the authorization values in that role and you can adjust it as needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 15:51:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368004#M808278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T15:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: authorization object assigned to transaction does not work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368005#M808279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it looks like in se93 I can only set authorization check only for one authorization object with specified fields values (empty field means accept all values). For example, if there is a role that is defined to accept ACTVT = '03' and BUKRS = 1107, 2007, 2009 of authorization object F_BKPF_BUK, I can only specify for my transaction in se93 one of these BUKRS values, ie. 1107 or 2007 or 2009. I think this is the same with su24 ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I check authorization in a SAP query for cc, then? I think the only reasonable way is to put ABAP statement AUTHORITY-CHECK in the code of the query. Well, I tried this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use a query for which an infoset is already defined. In the infoset (sq02) I need to code authorization check statement. It is company code value to be checked. An input field for cc is a select-option in the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The query program starts with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report AQT6ZR00005SRI==M5_1==========.&lt;/P&gt;&lt;P&gt;include /1BCDWB/IQ000000000005DAT.&lt;/P&gt;&lt;P&gt;data %dtab type standard table of /1BCDWB/IQ000000000005 with header line.&lt;/P&gt;&lt;P&gt;data %subrc type sy-subrc.&lt;/P&gt;&lt;P&gt;include /1BCDWB/IQ000000000005SSCR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In /1BCDWB/IQ000000000005SSCR include I have the select-options defined:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block qsel&lt;/P&gt;&lt;P&gt;with frame title text-s02.&lt;/P&gt;&lt;P&gt;select-options SP$00001 for REGUH-ABSBU.&lt;/P&gt;&lt;P&gt;select-options SP$00003 for REGUH-LAUFD.&lt;/P&gt;&lt;P&gt;select-options SP$00004 for REGUH-LAUFI.&lt;/P&gt;&lt;P&gt;select-options SP$00005 for REGUH-VBLNR.&lt;/P&gt;&lt;P&gt;select-options SP$00006 for REGUH-IDOC_NUM memory id DCN.&lt;/P&gt;&lt;P&gt;select-options SP$00007 for REGUH-RZAWE.&lt;/P&gt;&lt;P&gt;selection-screen end of block qsel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I am interested in SP$00001 that contains company code range. I am trying to put an additional code into infoset (sq02-&amp;gt;Extras-&amp;gt;Code). The code looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'DATA' block &lt;/P&gt;&lt;P&gt;TABLES: t001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'AT SELECTION-SCREEN OUTPUT' block &lt;/P&gt;&lt;P&gt;SELECT * FROM t001 WHERE bukrs IN SP$00001.&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'&lt;/P&gt;&lt;P&gt;ID 'BUKRS' FIELD t001-bukrs&lt;/P&gt;&lt;P&gt;ID 'ACTVT' FIELD '03'.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e000(zz) WITH 'No authorization for company code' t001-bukrs '!'.&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;The problem is, when I do syntax checking, I got an error:&lt;/P&gt;&lt;P&gt;The IN operator with "SP$00001" is followed neither by an internal table nor by a value list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like I have no access to the SP$00001 from my additional code. Please, advice me how to program the auth-check using company code values from SP$00001 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. By the way: I have no idea what $ means in the select-options names.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 09:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authorization-object-assigned-to-transaction-does-not-work/m-p/3368005#M808279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T09:06:54Z</dc:date>
    </item>
  </channel>
</rss>

