<?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: Company code authority check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182913#M1624430</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;WHen i created Event 01. It asks for new Include name and i created new include under my view function group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i wonder how to write the code inside the include. because whathever i write i cannot activate independently&lt;/P&gt;&lt;P&gt;I afraid if i activate all functiongroup again could give some generation problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just wrote one below code to check &amp;lt;Ztable&amp;gt;-Bukrs field with authority check.&lt;/P&gt;&lt;P&gt;But give error....what should i do now pls advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Sep 2011 10:18:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-09T10:18:48Z</dc:date>
    <item>
      <title>Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182903#M1624420</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;we have created ZTTL01 table maintenance view. Should not allow unauthorized company code to update/create or display.&lt;/P&gt;&lt;P&gt;I searched thru forums and collected below points. but could not test it successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Authorization object (Z_XXX_BUK) was created.But &amp;lt;Permitted activities&amp;gt; Button is not available in display authorization object(SU21) to see what are the activities are permitted.&lt;/P&gt;&lt;P&gt;In su01 for my user no roles or profiles are defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do&lt;/P&gt;&lt;P&gt;Trying to write  below code in PBO and PAI flow logic of ZCHECK_BUK table for screen 01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PBO &amp;amp; PAI
*First statement
Module Authorictycheck.

module Authoritycheck
  LOOP AT EXTRACT.
    AUTHORITY-CHECK OBJECT 'ZCHECK_BUK'
                        ID 'ACTVT' FIELD '01,02,03'
                        ID 'BUKRS' FIELD ZTTL01-BUKRS.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE e000(zrpt) WITH 'You do not have the authorization to'
    EXIT.                          'access Bukrs'extract-bukrs.
    ENDIF.
  ENDLOOP.
endmodule&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Can i use above code in PBO and PAI to check change of company code?&lt;/P&gt;&lt;P&gt;I am sharing role and profile created by other user, which allows only company code 'A10'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to test this now?&lt;/P&gt;&lt;P&gt;se11-&amp;gt;Utilities-&amp;gt;table contents create should not allow me to input A11 or other company codes? pls confirm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 06:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182903#M1624420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-08T06:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182904#M1624421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;go to transaction SE54 and input your table name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to menu Environment / Events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;activate change mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put a new entry for event 05 (creating a new entry) and put some name for your form routine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hit enter, then an icon will appear on the button next to the name of form routine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;click on this button it will allow you to create the routine in the program for view maintenance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there you put your code in order to do the authority check and refuse the record if needed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 09:38:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182904#M1624421</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2011-09-08T09:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182905#M1624422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;duplicate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 09:46:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182905#M1624422</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2011-09-08T09:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182906#M1624423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;duplicate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 09:46:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182906#M1624423</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2011-09-08T09:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182907#M1624424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Franchios&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the event creation is the aternatve method to check the company code authorization?&lt;/P&gt;&lt;P&gt;Above auhoriztaion check inside LOOP at PBO is not required in case of Event usage?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plsconfirm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 05:14:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182907#M1624424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-09T05:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182908#M1624425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Does the event creation is the aternatve method to check the company code authorization?&lt;/P&gt;&lt;P&gt;&amp;gt; Above auhoriztaion check inside LOOP at PBO is not required in case of Event usage?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the TMG is re-generated your code will be lost, so try not to modify the PBO module in the TMG directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should put your Authorization check in the Event 01 &amp;amp; not on Event 05. This will ensure that the check is performed whenever the data is saved to the DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 05:35:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182908#M1624425</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-09-09T05:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182909#M1624426</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;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is user should not view or update/create the Company code defined in  Authorization code.&lt;/P&gt;&lt;P&gt;If i write Event05, it will be fired only when you try to save the record right? but he will be seeing all the company codes right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried inserting below code  at event 05, why its givnig error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'Z_XXXXX_BUK'&lt;/P&gt;&lt;P&gt;                        ID 'BUKRS' FIELD ZXXXX-bukrs.  .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE E105(ZSCM01).&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;ERROR :&lt;/P&gt;&lt;P&gt;Include LZXXF01&lt;/P&gt;&lt;P&gt;Statement is not accessible.&lt;/P&gt;&lt;P&gt;pls correct me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 06:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182909#M1624426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-09T06:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182910#M1624427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand using event is benefitted rather than using PBO code change.&lt;/P&gt;&lt;P&gt;Above requirement can be solved using event?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot see any event to hide unauthorized company codes?&lt;/P&gt;&lt;P&gt;ofcourse i can use event01 for before saving the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does any additional code has to be done apart from above code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 08:15:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182910#M1624427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-09T08:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182911#M1624428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;I cannot see any event to hide unauthorized company codes?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ofcourse there is &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Event AA: Instead of the Standard Data Read Routine|http://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9f56a9d111d1a5690000e82deaaa/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Event AA&lt;/U&gt;: LOOP on the table TOTAL &amp;amp; remove the records for which the user has no view authority.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Event 01&lt;/U&gt;: If the user tries to create/update/delete the record, check the authority based on the CoCd. If the user is not authorised, then issue a message, set SY-SUBRC to "non-zero" value &amp;amp; set VIM_ABORT_SAVING to 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 08:52:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182911#M1624428</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-09-09T08:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182912#M1624429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you pls guide me little more&lt;/P&gt;&lt;P&gt;I included below code in include LZXXF01. but gives error.&lt;/P&gt;&lt;P&gt;and gives dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHORITY-CHECK OBJECT 'Z_XXXXX_BUK'&lt;/P&gt;&lt;P&gt;ID 'BUKRS' FIELD ZXXXX-bukrs.                                 "Table name is ZXXXX&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;MESSAGE E105(ZSCM01).&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR :&lt;/P&gt;&lt;P&gt;Include LZXXF01&lt;/P&gt;&lt;P&gt;Statement is not accessible.&lt;/P&gt;&lt;P&gt;pls correct me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 09:09:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182912#M1624429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-09T09:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182913#M1624430</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;WHen i created Event 01. It asks for new Include name and i created new include under my view function group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i wonder how to write the code inside the include. because whathever i write i cannot activate independently&lt;/P&gt;&lt;P&gt;I afraid if i activate all functiongroup again could give some generation problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just wrote one below code to check &amp;lt;Ztable&amp;gt;-Bukrs field with authority check.&lt;/P&gt;&lt;P&gt;But give error....what should i do now pls advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 10:18:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182913#M1624430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-09T10:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182914#M1624431</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 am able to achieve the event 01 option and its working fine.&lt;/P&gt;&lt;P&gt;But EventAA, i am not able to get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHich table should i have to LOOP it?&lt;/P&gt;&lt;P&gt;I cannot see anytable by name TOTAL....in my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls confirm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 10:54:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182914#M1624431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-09T10:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182915#M1624432</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 have two issues now.&lt;/P&gt;&lt;P&gt;1)I have records in ZXXX table, but when i see in SM30 the records are empty.&lt;/P&gt;&lt;P&gt;   what could be the reason? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)Like Suhas said, I want to loop the table and remove the corresponding records.&lt;/P&gt;&lt;P&gt;   But which table should i loop? either table controll or Extract table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you pls shed light on this.&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;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 02:54:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182915#M1624432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-14T02:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182916#M1624433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;1)I have records in ZXXX table, but when i see in SM30 the records are empty. what could be the reason?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put the break-point in the subroutine which handles Event AA &amp;amp; debug. I think that may be the Auth. Check is failing &amp;amp; the records are being removed. Did you call the subroutine &lt;EM&gt;FORM TABLE_GET_DATA&lt;/EM&gt; in your event AA, this will populate the table TOTAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; want to loop the table and remove the corresponding records. But which table should i loop? either table controll or Extract table?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you're handling the Event 01, then it should be something like LOOP on TOTAL &amp;amp; READ EXTRACT. There's code snippet provided in the SAP documentation for Event 01 which you can refer while building your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 03:17:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182916#M1624433</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-09-14T03:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182917#M1624434</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;Regarding 1) It works when i remove the FORM routine assinged for EVENTS.&lt;/P&gt;&lt;P&gt;Thanks for ur input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding 2)When the user displays record in SM30 for a table, he must not be able to see the company code AD01.&lt;/P&gt;&lt;P&gt;To achieve this can i use EVENT AA?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create FORM routine &amp;lt;hide_cocode&amp;gt; in EVENT AA and store at include LZXXXXF01.&lt;/P&gt;&lt;P&gt;FORM ZHIDE_COCODE.&lt;/P&gt;&lt;P&gt;DATA: F_INDEX LIKE SY-TABIX."Index to note the lines found"&lt;/P&gt;&lt;P&gt;LOOP AT TOTAL.&lt;/P&gt;&lt;P&gt;READ TABLE EXTRACT WITH KEY &amp;lt;vim_xtotal_key&amp;gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;F_INDEX = SY-TABIX.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;CLEAR F_INDEX.&lt;/P&gt;&lt;P&gt;ENDIF. "(make desired changes to the line TOTAL)&lt;/P&gt;&lt;P&gt;MODIFY TOTAL.&lt;/P&gt;&lt;P&gt;CHECK F_INDEX GT 0.&lt;/P&gt;&lt;P&gt;EXTRACT = TOTAL.&lt;/P&gt;&lt;P&gt;MODIFY EXTRACT INDEX F_INDEX.&lt;/P&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made break point at line LOOP at Total. and executed SM30 and clicked Display button.&lt;/P&gt;&lt;P&gt;Sorry Code stops here and table TOTAL has flat line structure of empty.Loop at total is skipping&lt;/P&gt;&lt;P&gt;what should be done now?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 07:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182917#M1624434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-14T07:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182918#M1624435</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;You've to add the SAP defined sub-routine &lt;EM&gt;table_get_data&lt;/EM&gt; to read the from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM zhide_cocode.
  DATA: f_index LIKE sy-tabix."Index to note the lines found"

  PERFORM table_get_data. "Fetch the table data --&amp;gt; Add this line

  LOOP AT total.
    READ TABLE extract WITH KEY &amp;lt;vim_xtotal_key&amp;gt;.
    IF sy-subrc EQ 0.
      f_index = sy-tabix.
    ELSE.
      CLEAR f_index.
    ENDIF. "(make desired changes to the line TOTAL)
    MODIFY total.
    CHECK f_index GT 0.
    extract = total.
    MODIFY extract INDEX f_index.
*ENDIF.
  ENDLOOP.
  sy-subrc = 0.
ENDFORM.                    "ZHIDE_COCODE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you're clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 09:02:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182918#M1624435</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-09-14T09:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Company code authority check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182919#M1624436</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;Thanks for your reply.&lt;/P&gt;&lt;P&gt;It works..&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;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 03:57:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/company-code-authority-check/m-p/8182919#M1624436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-16T03:57:50Z</dc:date>
    </item>
  </channel>
</rss>

