<?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: Passing internal table to subroutine in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371607#M1040214</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;PRE&gt;&lt;CODE&gt;CASE mark.
  WHEN 1.
    PERFORM output_file TABLES itab1 USING p_file1.     
  WHEN 2.
    PERFORM output_file TABLES itab2 USING p_file2.
ENDCASE.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  output_file                                              *
*&amp;amp;---------------------------------------------------------------------*
FORM output_file TABLES p_itab USING   p_p_file.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename              = p_p_file
      filetype              = 'ASC'
      write_field_separator = 'X'
    TABLES
      data_tab              = p_itab
    EXCEPTIONS
      OTHERS                = 1.
ENDFORM.                               " output_file&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Aug 2008 07:34:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-27T07:34:55Z</dc:date>
    <item>
      <title>Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371599#M1040206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Frndz,&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;         I am use funtion GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       I called this function in a subroutine. I have to pass various internal tables to this form ..&lt;/P&gt;&lt;P&gt;       How to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say &lt;/P&gt;&lt;P&gt;case mark.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;peform download using it1.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;perform download using it1.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download.&lt;/P&gt;&lt;P&gt;call funtion 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = &amp;lt;dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:02:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371599#M1040206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T07:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371600#M1040207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi siva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you call like this peform download using it1.&lt;/P&gt;&lt;P&gt;then you define like &lt;/P&gt;&lt;P&gt;form download using it1..&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Deva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:06:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371600#M1040207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T07:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371601#M1040208</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;follow this link &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/example%2bof%2bpassing%2binternal%2btables%2bto%2ban%2bsubroutine" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/example%2bof%2bpassing%2binternal%2btables%2bto%2ban%2bsubroutine&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Snehi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:08:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371601#M1040208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T07:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371602#M1040209</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;Just do like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it1 like it_orginal,&lt;/P&gt;&lt;P&gt;         it2 like it_orginal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case mark.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;peform download using it1.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;perform download using it2.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download using it_final like it_orginal.&lt;/P&gt;&lt;P&gt;call funtion 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = it_final&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anversha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anversha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:12:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371602#M1040209</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2008-08-27T07:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371603#M1040210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siva,&lt;/P&gt;&lt;P&gt;Use the option &lt;STRONG&gt;tables&lt;/STRONG&gt; instead of &lt;STRONG&gt;using&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
case mark.
when 1.
perform download tables it1.  "tables
when 2.
perform download tables it2.  "tables
endcase.


*tables type any
form download tables it type any.   
call funtion 'GUI_DOWNLOAD'
TABLES
DATA_TAB = &amp;lt;dyn_table&amp;gt;
endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:22:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371603#M1040210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T07:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371604#M1040211</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 can use using or tables .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case mark.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;peform download using it1. &lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;perform download tables it1&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;perform download using it1.&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;perform download tables it2&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download tables int_tab type table&lt;/P&gt;&lt;P&gt;call funtion 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = &amp;lt;dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371604#M1040211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T07:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371605#M1040212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi siva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can use this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case mark.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;peform download using it1.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;perform download using it2.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download using p_table type any table.&lt;/P&gt;&lt;P&gt;call funtion 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = &amp;lt;dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U ll get the desired result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Success.............&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:31:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371605#M1040212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T07:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371606#M1040213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,,,&lt;/P&gt;&lt;P&gt;Do it in this way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case mark.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;peform download &lt;STRONG&gt;TABLES&lt;/STRONG&gt; it1. ...........&amp;gt; Instead if using&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;perform download &lt;STRONG&gt;TABLES&lt;/STRONG&gt; it2..............&amp;gt; Instead if using&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download &lt;STRONG&gt;TABLES p_itab STRUCTURE wa_data&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;call funtion 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = p_itab&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Here structure of internal table it1 , it2 and work area WA_DATA must be same..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:33:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371606#M1040213</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2008-08-27T07:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371607#M1040214</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;PRE&gt;&lt;CODE&gt;CASE mark.
  WHEN 1.
    PERFORM output_file TABLES itab1 USING p_file1.     
  WHEN 2.
    PERFORM output_file TABLES itab2 USING p_file2.
ENDCASE.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  output_file                                              *
*&amp;amp;---------------------------------------------------------------------*
FORM output_file TABLES p_itab USING   p_p_file.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename              = p_p_file
      filetype              = 'ASC'
      write_field_separator = 'X'
    TABLES
      data_tab              = p_itab
    EXCEPTIONS
      OTHERS                = 1.
ENDFORM.                               " output_file&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371607#M1040214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T07:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Passing internal table to subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371608#M1040215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Danq All.&lt;/P&gt;&lt;P&gt;As the problem was solved am closing the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 07:59:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-internal-table-to-subroutine/m-p/4371608#M1040215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T07:59:12Z</dc:date>
    </item>
  </channel>
</rss>

