<?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 external sub-routine internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357332#M1037358</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 am passing an internal table to an external sub-routine using the statement &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM import_if
              IN PROGRAM zrpcetmx0 USING display_table-pernr
                                         seqnr_table-seqnr
                                         fldid
                                         CHANGING zl_table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I declared the internal table like this in the main program&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA zl_table TYPE zl_struc OCCURS 0 WITH HEADER LINE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am trying to append the internal table zl_table in the sub-routine 'import_if' in the program ZRPCETMX0, it is giving a syntax error as ' "ZL_TABLE" is not an internal table'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me. As I see it, zl_table is an internal table right !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Aug 2008 18:34:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-19T18:34:02Z</dc:date>
    <item>
      <title>external sub-routine internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357332#M1037358</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 am passing an internal table to an external sub-routine using the statement &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM import_if
              IN PROGRAM zrpcetmx0 USING display_table-pernr
                                         seqnr_table-seqnr
                                         fldid
                                         CHANGING zl_table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I declared the internal table like this in the main program&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA zl_table TYPE zl_struc OCCURS 0 WITH HEADER LINE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am trying to append the internal table zl_table in the sub-routine 'import_if' in the program ZRPCETMX0, it is giving a syntax error as ' "ZL_TABLE" is not an internal table'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me. As I see it, zl_table is an internal table right !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 18:34:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357332#M1037358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T18:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: external sub-routine internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357333#M1037359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM import_if
              IN PROGRAM zrpcetmx0 USING display_table-pernr
                                         seqnr_table-seqnr
                                         fldid
                                         CHANGING zl_table[]. "use Body , it is taking header only

&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 18:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357333#M1037359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T18:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: external sub-routine internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357334#M1037360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TABLES declared with the OCCURS 0 must be the in the first place in the parameters of the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PERFORM import_if
              IN PROGRAM zrpcetmx0 
TABLES Z_Itable            "&amp;lt;&amp;lt;
USING display_table-pernr
           seqnr_table-seqnr
             fldid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutine must be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM import_if.
TABLES Z_Itable            "&amp;lt;&amp;lt;
USING display_table-pernr
           seqnr_table-seqnr
             fldid.

ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 18:43:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357334#M1037360</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-19T18:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: external sub-routine internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357335#M1037361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when I am trying to pass the internal table with body zl_table[] as you said, the following syntax error is showing up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"In unicode programs, the following characters cannot appear in names, as it does here in the name zl_table[]"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any other way to this perform ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my friend suggests giving it as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;      PERFORM import_if
              IN PROGRAM zrpcetmx9
              USING display_table-pernr
                    seqnr_table-seqnr
                    fldid CHANGING zl_table structure zl_struc. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not get that correct for the "structure zl_struc" part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 19:00:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357335#M1037361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T19:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: external sub-routine internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357336#M1037362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is working for me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTEST_FORMTEST.


data: it_flight like TABLE OF sflight with HEADER LINE,
      wa_flight type sflight.

PERFORM test_form inprogram ZTEST_FORMTEST2 USING wa_flight
                 CHANGING it_flight[].

  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check it once from your end..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTEST_FORMTEST2.


form test_form USING wa_flight type sflight
               CHANGING flight type sflight_tab1.



endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 19:13:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357336#M1037362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T19:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: external sub-routine internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357337#M1037363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did change and see in the sub-routine (form)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM import_if
  USING $pernr
        $seqnr
        $fldid
        $wa_ztab TYPE zl_struc
  CHANGING zl_table TYPE zl_struc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the syntax error is ' The type "zl_struc" is unknown'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I have to declare the structure in the sub-routine as well?&lt;/P&gt;&lt;P&gt;Also you in your example gave the sub-routine a different structure in the changing part, was that intentional?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form test_form USING wa_flight type sflight
               CHANGING flight type sflight_tab1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above one, we did not use sflight_tab1 structure anywhere right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code in the main program is like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;   PERFORM import_if
              IN PROGRAM zrpcetmx9 USING display_table-pernr
                                         seqnr_table-seqnr
                                         fldid
                                         wa_ztab
                                         changing zl_table[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help vijay .. once again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 20:54:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357337#M1037363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T20:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: external sub-routine internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357338#M1037364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;FORM import_if
  USING $pernr
        $seqnr
        $fldid
        $wa_ztab TYPE zl_struc
  CHANGING zl_table TYPE zl_t_struc.  "&amp;lt;------this should be table type&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zl_t_struc should be table type, which can be exists in side the program or Global dictionary level se11 also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also do this...this works inyour case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM import_if
              IN PROGRAM zrpcetmx9 USING display_table-pernr
                                         seqnr_table-seqnr
                                         fldid
                                         wa_ztab
                                         changing zl_table[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM import_if
  USING $pernr
        $seqnr
        $fldid
        $wa_ztab TYPE zl_struc 
        CHANGING zl_table TYPE  type standard table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 21:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357338#M1037364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T21:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: external sub-routine internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357339#M1037365</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 think you are sending table structure which is not available globally then it should have some reference in called program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets try this piece of code, u will understool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;calling program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;line(10).&lt;/P&gt;&lt;P&gt;data end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-line = '1'.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform imp_sub in program ZTEST_2 TABLES itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;line(10).&lt;/P&gt;&lt;P&gt;data: end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data w_line(10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form imp_sub TABLES ITAB2 STRUCTURE ITAB1.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB2 INTO W_LINE.&lt;/P&gt;&lt;P&gt;WRITE:/ W_LINE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is how it works, no need to create any structure globally. Hope you got.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vijay Kumar T (Yash Technologies )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vijay thirumareddi on Aug 19, 2008 11:54 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 21:54:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-sub-routine-internal-table/m-p/4357339#M1037365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-19T21:54:19Z</dc:date>
    </item>
  </channel>
</rss>

