<?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: Auhority-Check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479945#M224684</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;Usually in this case WE query the Check table of each field and make an internal table of it and then pass it to authority-check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex: VKORG check table TVKO, similary for VTWEG and SPART it is TVTW and TSPA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence do a select on these tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select VKORG from TVTW&lt;/P&gt;&lt;P&gt;where VKORG in S_VKORG&lt;/P&gt;&lt;P&gt;into table t_vkorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly store others in T_VTWEG and T_SPART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at T_VKORG.&lt;/P&gt;&lt;P&gt;Loop at T_VTWEG.&lt;/P&gt;&lt;P&gt;Loop at T_SPART.&lt;/P&gt;&lt;P&gt;Authority Check----&lt;/P&gt;&lt;P&gt;Store only the valid ones in another internal table.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Aug 2006 13:04:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-25T13:04:47Z</dc:date>
    <item>
      <title>Auhority-Check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479941#M224680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt; All&lt;/P&gt;&lt;P&gt; I have following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;  authority-check object 'V_VBAK_VKO'     &lt;/P&gt;&lt;P&gt;                   &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      ID 'VKORG' FIELD P_VKORG          &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      ID 'VTWEG' FIELD P_VTWEG          &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      ID 'SPART' FIELD P_SPART          &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        id 'VKORG' field s_vkorg          &lt;/P&gt;&lt;P&gt;        id 'VTWEG' field s_vtweg          &lt;/P&gt;&lt;P&gt;        id 'SPART' field s_spart  &lt;/P&gt;&lt;P&gt;if sy-subrc ne c_0.     &lt;/P&gt;&lt;P&gt; Message e999 with "No Authorization"&lt;/P&gt;&lt;P&gt;Endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;previously iwas using a single value(P_VKORG,P_VTWEG,P_SPART) in fields   &lt;/P&gt;&lt;P&gt;but now my req has been changed to multiple values.&lt;/P&gt;&lt;P&gt;so plz tell whether my code will work correctly or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i have to do,whether i should use loop and passes single value or there is any other way to check the Authorization.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 12:57:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479941#M224680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T12:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Auhority-Check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479942#M224681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that select options will work here.  You need to have single values when doing authority check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can loop at the select-options, but only if single values are allowed, no ranges, no exclusions.  Make sense?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 12:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479942#M224681</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-25T12:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Auhority-Check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479943#M224682</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;first u have to get the list of Sales Org based on the Input , after that u  have to loop like this.&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;   SELECT VKGRP&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   INTO TABLE I_AUTH_VKGRP&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FROM TVKGR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WHERE VKGRP IN S_VKGRP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; LOOP AT I_AUTH_VKGRP.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   AUTHORITY-CHECK OBJECT ''V_VBAK_VKO' &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            ID 'ACTVT' FIELD '03'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            ID 'VKGRP' FIELD I_AUTH_VKGRP-VKGRP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IF SY-SUBRC NE 0 .&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     MESSAGE E398(00) WITH&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;'User'SY-UNAME'not authorised for Sales Group : ' I_AUTH_VKGRP-VKGRP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&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;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 13:01:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479943#M224682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T13:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Auhority-Check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479944#M224683</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; Your code works fine if ur select-options are with no extensions no -intervals.&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 name10 FIELD f10.        &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;/P&gt;&lt;P&gt;REGARDS,&lt;/P&gt;&lt;P&gt;sAILAJA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 13:01:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479944#M224683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T13:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Auhority-Check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479945#M224684</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;Usually in this case WE query the Check table of each field and make an internal table of it and then pass it to authority-check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex: VKORG check table TVKO, similary for VTWEG and SPART it is TVTW and TSPA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence do a select on these tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select VKORG from TVTW&lt;/P&gt;&lt;P&gt;where VKORG in S_VKORG&lt;/P&gt;&lt;P&gt;into table t_vkorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly store others in T_VTWEG and T_SPART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at T_VKORG.&lt;/P&gt;&lt;P&gt;Loop at T_VTWEG.&lt;/P&gt;&lt;P&gt;Loop at T_SPART.&lt;/P&gt;&lt;P&gt;Authority Check----&lt;/P&gt;&lt;P&gt;Store only the valid ones in another internal table.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 13:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479945#M224684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T13:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Auhority-Check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479946#M224685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You can code something similar to this&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 SELECT * FROM MARA INTO ITAB_MARA
          WHERE MATNR IN S_MATNR
            AND ERDAT IN S_ERDAT.

  AUTHORITY-CHECK 'M_MATNR'
    ID 'MATNR' FIELD ITAB_MARA-MATNR
    ID 'ERDAT' FIELD ITAB_MARA-ERDAT.

  IF SY-SUBRC NE 0.
     MESSAGE e000 WITH 'BLAH BLAH'.
  ELSE.
   APPEND ITAB_MARA.
  ENDIF.
 
 ENDSELECT. 
 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; This way the system will check all the values in the loop and you can also reterive the data in the same pass of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;P&gt; Some points would be nice if it helped&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2006 13:35:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auhority-check/m-p/1479946#M224685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-25T13:35:13Z</dc:date>
    </item>
  </channel>
</rss>

