<?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 for multiple objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554522#M1430187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why is no one responding...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Feb 2010 16:59:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-18T16:59:33Z</dc:date>
    <item>
      <title>Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554519#M1430184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand how to perform authority check for 1 plant, which the code is given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;authority-check object 'ZXXX'&lt;/P&gt;&lt;P&gt;           id 'ACTVT' field actvt&lt;/P&gt;&lt;P&gt;           id 'WERKS' field xwerks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here XWERKS is just one filed. But what i am  supposed to do, if this XWERKS need to be replace by a internal table which stores, a collection of plants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_werks.&lt;/P&gt;&lt;P&gt;authority-check object 'ZXXX'&lt;/P&gt;&lt;P&gt;           id 'ACTVT' field actvt&lt;/P&gt;&lt;P&gt;           id 'WERKS' field it_werks-werks.&lt;/P&gt;&lt;P&gt;if sy-subrc ne '0'. &lt;/P&gt;&lt;P&gt;exit.&lt;/P&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a good way of doing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 16:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554519#M1430184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T16:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554520#M1430185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or for a select option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: db_werks for marc-werks memory id wrk obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at db_werks.&lt;/P&gt;&lt;P&gt;         authority-check object 'ZXXX'&lt;/P&gt;&lt;P&gt;         id 'ACTVT' field actvt&lt;/P&gt;&lt;P&gt;         id 'WERKS' field db_werks-werks.&lt;/P&gt;&lt;P&gt;      if sy-subrc ne '0'. &lt;/P&gt;&lt;P&gt;         exit.&lt;/P&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;Is this best way of programing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vinay k on Feb 18, 2010 5:15 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 16:14:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554520#M1430185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T16:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554521#M1430186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above code didnot work i just checked. it said there is no component called werks in db_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it seems to give out put if i put directly as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: db_werks for marc-werks memory id wrk obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;authority-check object 'ZXXX'&lt;/P&gt;&lt;P&gt;           id 'ACTVT' field '02'&lt;/P&gt;&lt;P&gt;           id 'WERKS' field db_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone  please let meknow, if this is right way doing the thing.&lt;/P&gt;&lt;P&gt;It will be help full if some one responds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 16:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554521#M1430186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T16:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554522#M1430187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why is no one responding...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 16:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554522#M1430187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T16:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554523#M1430188</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 with selection option is wrong. You don't check for intervals and also you don't check for operator and sign in selection criteria. For example you can have line for interval from plant 1000 to 2000 but your code will check only if the user has an authorization for plant 1000. You can also have different operator such as less than.If you want to check authorization for all plants you need to get a table with all plants and do it one by one as you wrote in your first comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 23:42:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554523#M1430188</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2010-02-18T23:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554524#M1430189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi VInay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have selct option you need to consider ranges and exclusions also. If you simply loop, it won't work. Try with below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN  ON db_werks. "Assuming db_werks is your select option.
SELECT werks INTO TABLE i_t001w FROM t001w WHERE werks IN db_werks.

loop at i_t001w INTO wa_t001w.
authority-check object 'ZXXX'
id 'ACTVT' field actvt
id 'WERKS' field wa_t001w-werks.
if sy-subrc ne '0'.
"Here you need to display the error. If you simply exit it wont work.
MESSAGE 'No authorization' TYPE 'E'.
endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 03:37:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554524#M1430189</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-02-19T03:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554525#M1430190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will take Vinod's code as reference because the basic idea is absolutely correct. But i do not agree with the error handling &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose out of the 10 plants selected from T001W (for e.g., only) the user has auth. for 7. Is it ok to stop the user from executing  the report or let him proceed with the 7 &amp;amp; for the 3 plants he does not have auth., display display a log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awaiting responses from fellow SDNers &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 03:46:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554525#M1430190</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-02-19T03:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554526#M1430191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. You are correct. But it completely depends on the requirement. I have come across both the requirements in my experience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Don't allow the user to proceed even if he/she don't have access to at least one. (Above code works for this scenario)&lt;/P&gt;&lt;P&gt;2. Proceed with the one he/she has the access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case we should collect the plants where authorization is failed, delete that record from i_t001w and consider i_t001w for further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i am making some sense:-)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 04:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554526#M1430191</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-02-19T04:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554527#M1430192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Why is no one responding...&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presumably because you obviously don't understand what a select-option is, and how information is stored in it. People are, quite rightly, reluctant to post basic stuff. These are not training forums. I propose you &lt;STRONG&gt;read the ABAP help&lt;/STRONG&gt; before using any statement for the first time. What you do is put your cursor within the keyword you're interested in, and press F1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway- you've got lots of responses now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 05:25:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554527#M1430192</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2010-02-19T05:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Authority-check for multiple objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554528#M1430193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a ton for your responses. I really appreciate it. They helped me get an understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, i did F1 help, i could not correlate to my scenario, so, i posted. Thank you for your suggestion. Next time i will make sure, i do thorough research through F1 before posting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 15:48:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/authority-check-for-multiple-objects/m-p/6554528#M1430193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T15:48:45Z</dc:date>
    </item>
  </channel>
</rss>

