<?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: Problem with Internal Table as Subroutine Formal Parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145591#M1367673</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 the quick reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Soumyaprakash: I have problem with this declaration. Although I have passed "zpld_nmck" (a structure), but I got the error message stating that it is not a structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Vishnu: Thanks for the solution. It worked! The only drawback one is that this is considered obsolete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Vikranth: Sorry for the imprecise description from my side. I need to use subroutines in a function module. So, l_it_subareaid cannot be used in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Ankur: Thanks for the information. But the problem is that I have 10 subroutines need to be called in a function module. It would inconvenient to declare all these table types. Do you have any other suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joon Meng&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Sep 2009 14:53:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-08T14:53:27Z</dc:date>
    <item>
      <title>Problem with Internal Table as Subroutine Formal Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145586#M1367668</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 question for specifying internal table type of the subroutine parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code could not compile due to the parameter definition problem. I wonder the cause of the problem in the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM checkinfoobject&lt;/P&gt;&lt;P&gt;  USING value(l_it_subareaid) &lt;STRONG&gt;TYPE STANDARD TABLE OF&lt;/STRONG&gt; zpld_nmck.&lt;/P&gt;&lt;P&gt;   .....&lt;/P&gt;&lt;P&gt;   .....&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"TYPE STANDARD TABLE OF" cannot be used in specifying parameter for subroutine.&lt;/P&gt;&lt;P&gt;Why is this so?&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;Regards,&lt;/P&gt;&lt;P&gt;Joon Meng&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 13:23:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145586#M1367668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T13:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Internal Table as Subroutine Formal Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145587#M1367669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;form abcd USING abc type STANDARD TABLE vbak. 
  
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 13:26:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145587#M1367669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T13:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Internal Table as Subroutine Formal Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145588#M1367670</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;only for a structure or a Variable we use USING parameters, if you wnt to pass a Table in subroutine u should use TABLES parameter...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM checkinfoobject TABLES it_subareaid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM checkinfoobject TABLES it_subareaid STRUCTURE zpld_nmck.&lt;/P&gt;&lt;P&gt;ENDFORM.&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;Rgds,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 13:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145588#M1367670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T13:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Internal Table as Subroutine Formal Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145589#M1367671</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;Try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: l_it_subareaid TYPE STANDARD TABLE OF zpld_nmck .
FORM checkinfoobject TABLES l_it_subareaid
USING value(l_it_subareaid) 



ENDFORM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 13:31:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145589#M1367671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T13:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Internal Table as Subroutine Formal Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145590#M1367672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You cannot pass tables like that.&lt;/P&gt;&lt;P&gt;It needs to be passed using the TABLES options.&lt;/P&gt;&lt;P&gt;But that is obsolete now.&lt;/P&gt;&lt;P&gt;So do as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare a table type of zpld_nmck in your global declaration and then use the same in your exporting or importing parameter of the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: TT_ zpld_nmck type standard table of  zpld_nmck.


FORM checkinfoobject
USING value(l_it_subareaid) TYPE TT_ zpld_nmck 
.....
.....
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 13:36:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145590#M1367672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T13:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Internal Table as Subroutine Formal Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145591#M1367673</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 the quick reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Soumyaprakash: I have problem with this declaration. Although I have passed "zpld_nmck" (a structure), but I got the error message stating that it is not a structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Vishnu: Thanks for the solution. It worked! The only drawback one is that this is considered obsolete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Vikranth: Sorry for the imprecise description from my side. I need to use subroutines in a function module. So, l_it_subareaid cannot be used in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Ankur: Thanks for the information. But the problem is that I have 10 subroutines need to be called in a function module. It would inconvenient to declare all these table types. Do you have any other suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joon Meng&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 14:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145591#M1367673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T14:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Internal Table as Subroutine Formal Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145592#M1367674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Using TABLES within a SUBROUTINE is OBSOLETE practise.&lt;/P&gt;&lt;P&gt;If you do the extended program check and run the code inspector you will find that it is an obsolete practise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently only USING and CHANGING options are allowed for a subroutine and in case you need to pass tables you have to pass them using table types only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 15:05:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table-as-subroutine-formal-parameter/m-p/6145592#M1367674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T15:05:53Z</dc:date>
    </item>
  </channel>
</rss>

