<?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: Tables in the subroutine in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937141#M692230</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;all tables which u are using in a subrotine should be declared in program n not in subroutine as u r calling sub routines using perform statement using tables keyword u must call. if u dont  declare them in main program u ll get an error stating dat tables ........... are not declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;generally wat objects u require locally are declared in a sub routine using keyword LOCAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if useful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Suresh Aluri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2007 08:15:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-16T08:15:07Z</dc:date>
    <item>
      <title>Tables in the subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937137#M692226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I declare tables in the subroutine?&lt;/P&gt;&lt;P&gt;Since I am accessing table fields in the subroutine I need to declare them in  subroutine.&lt;/P&gt;&lt;P&gt;Is it a bad practice or what?&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;Shaily&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 07:58:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937137#M692226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T07:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Tables in the subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937138#M692227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shaily,&lt;/P&gt;&lt;P&gt;Yes u can definitely use tables in a subroutine.&lt;/P&gt;&lt;P&gt;The syntax goes like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM subroutine_name TABLES itab1 USING field1 changing field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this the TABLES should always preceed the USING and CHANGING addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in the definition of subroutine, the code goes like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM subroutine_name TABLES itab1 structure &amp;lt;Structure same as that of itab&amp;gt; USINg field1 CHANGING field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 08:06:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937138#M692227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T08:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Tables in the subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937139#M692228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;variable declared with tables statement are always global , whether u declare it in the main prog or a subroutine.. they are always accessable globally.,..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it is always recommended to declare tables in the main prog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No rewards Plz..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 08:06:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937139#M692228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T08:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Tables in the subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937140#M692229</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;check the belowcode...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; PERFORM send_file_as_email_attachment&lt;/P&gt;&lt;P&gt;                     TABLES  t_mess_bod&lt;/P&gt;&lt;P&gt;                             t_mess_att&lt;/P&gt;&lt;P&gt;                     USING   p_email&lt;/P&gt;&lt;P&gt;                             'Example .xls documnet attachment'&lt;/P&gt;&lt;P&gt;                             'PDF'&lt;/P&gt;&lt;P&gt;                             v_attachment_name&lt;/P&gt;&lt;P&gt;                             v_attachment_desc&lt;/P&gt;&lt;P&gt;                             p_sender&lt;/P&gt;&lt;P&gt;                             v_sender_type&lt;/P&gt;&lt;P&gt;                    CHANGING v_error&lt;/P&gt;&lt;P&gt;                             v_reciever.&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 08:11:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937140#M692229</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-10-16T08:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Tables in the subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937141#M692230</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;all tables which u are using in a subrotine should be declared in program n not in subroutine as u r calling sub routines using perform statement using tables keyword u must call. if u dont  declare them in main program u ll get an error stating dat tables ........... are not declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;generally wat objects u require locally are declared in a sub routine using keyword LOCAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if useful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Suresh Aluri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 08:15:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937141#M692230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T08:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Tables in the subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937142#M692231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My subroutine is in a include , which is again in standard User exit(FM).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot declare the tables in the FM global data as it is standard Program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I use subroutine also within this Include is a doubt for me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only problem is I wanted if use the statement : &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Tables: mara,mard.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to confirm if this is not a bad practice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shaily&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 08:48:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-in-the-subroutine/m-p/2937142#M692231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T08:48:23Z</dc:date>
    </item>
  </channel>
</rss>

