<?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: One perform with different internal table structure to 1 function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229383#M138859</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this by using Field symbols.&lt;/P&gt;&lt;P&gt;Define &lt;/P&gt;&lt;P&gt;field-symbols &amp;lt;FS&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;and assign you structure to &amp;lt;FS&amp;gt; and pass &amp;lt;FS&amp;gt; to the FM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Apr 2006 20:53:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-21T20:53:49Z</dc:date>
    <item>
      <title>One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229381#M138857</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;I am downloading an internal table in to excel using  function  EXCEL_OLE_STANDARD_DAT'&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here&amp;#146;s my code ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM  sub_excel_download2..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form sub_excel_download2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM :::  call function 'MS_EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            file_name                 =  'C:\TEMP\file'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        CREATE_PIVOT              = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        DATA_SHEET_NAME           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        PIVOT_SHEET_NAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        PASSWORD                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        PASSWORD_OPTION           = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        PIVOT_FIELD_TAB           =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            data_tab                  =  it_excel_tab2        &lt;/P&gt;&lt;P&gt;           file_not_exist            = 1&lt;/P&gt;&lt;P&gt;           filename_expected         = 2&lt;/P&gt;&lt;P&gt;           communication_error       = 3&lt;/P&gt;&lt;P&gt;           ole_object_method_error   = 4&lt;/P&gt;&lt;P&gt;           ole_object_property_error = 5&lt;/P&gt;&lt;P&gt;           invalid_filename          = 6&lt;/P&gt;&lt;P&gt;           invalid_pivot_fields      = 7&lt;/P&gt;&lt;P&gt;           download_problem          = 8&lt;/P&gt;&lt;P&gt;           others                    = 9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write: / 'Error downloading to Excel'.&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;endform.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 internal tables which I want to download , but user has to select check box on selection screen . Remember my internal tables structures are different .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q: Is there any way I can &amp;lt;b&amp;gt;pass internal table dynamically to my perform as well as to call function 'MS_EXCEL_OLE_STANDARD_DAT' on the basis of user selection, using one perform ?&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform excel_download  using dynamic table . ( &amp;lt;b&amp;gt;where my excel table structures are different&amp;lt;/b&amp;gt; ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form excel_download  using &amp;lt;b&amp;gt;dynamic table&amp;lt;/b&amp;gt; . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'MS_EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            file_name                 =  'C:\TEMP\file'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        CREATE_PIVOT              = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        DATA_SHEET_NAME           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        PIVOT_SHEET_NAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        PASSWORD                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        PASSWORD_OPTION           = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        PIVOT_FIELD_TAB           =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            data_tab                  =  &amp;lt;b&amp;gt;dynamic_table&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;           file_not_exist            = 1&lt;/P&gt;&lt;P&gt;           filename_expected         = 2&lt;/P&gt;&lt;P&gt;           communication_error       = 3&lt;/P&gt;&lt;P&gt;           ole_object_method_error   = 4&lt;/P&gt;&lt;P&gt;           ole_object_property_error = 5&lt;/P&gt;&lt;P&gt;           invalid_filename          = 6&lt;/P&gt;&lt;P&gt;           invalid_pivot_fields      = 7&lt;/P&gt;&lt;P&gt;           download_problem          = 8&lt;/P&gt;&lt;P&gt;           others                    = 9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write: / 'Error downloading to Excel'.&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;Endform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for your input/suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Saquib khan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 20:44:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229381#M138857</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-04-21T20:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229382#M138858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be I am missing something but did you try &lt;/P&gt;&lt;P&gt;"Form excel_download &amp;lt;u&amp;gt;tables&amp;lt;/u&amp;gt; dynamic_table"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 20:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229382#M138858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T20:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229383#M138859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this by using Field symbols.&lt;/P&gt;&lt;P&gt;Define &lt;/P&gt;&lt;P&gt;field-symbols &amp;lt;FS&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;and assign you structure to &amp;lt;FS&amp;gt; and pass &amp;lt;FS&amp;gt; to the FM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 20:53:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229383#M138859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T20:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229384#M138860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want a Dynamic internal table in Perform . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform excel_download using &amp;lt;b&amp;gt;&amp;lt;dynamic table:Structure like my 3 tables which change on the basis of user selection &amp;gt;&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Amandeep for your valuable inputs .Can you please post some example of code. So I can give it a shot.&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;&lt;/P&gt;&lt;P&gt;Message was edited by: Saquib Khan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 20:56:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229384#M138860</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-04-21T20:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229385#M138861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;True, you have your dynamic internal table defined, filled and then this form is called. So I see it like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fill itab1.&lt;/P&gt;&lt;P&gt;perform download_table_to_excel tables itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fill itab2.&lt;/P&gt;&lt;P&gt;perform download_table_to_excel tables itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fill itab3.&lt;/P&gt;&lt;P&gt;perform download_table_to_excel tables itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download_table_to_excel tables itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function ....&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isn't this your flow?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 21:02:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229385#M138861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T21:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229386#M138862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean that the name of the table should be dynamically determined or that the structure of the table itself is dynamic (or both)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 21:07:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229386#M138862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T21:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229387#M138863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;NO Sri, I have already 3 internal tables Itab1, itab2, itab3 .. which has different structures OK ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I don&amp;#146;t want to write perform 3 times as well as I don&amp;#146;t want to call FM 3 times . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for that I write perform in which I pass internal table ( Itab1,itab2,itab3 ) dynamically as well as pass the IT structure to FM dynamically .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way my One perform can out put Itab,itab2 and itab3 when user select the different check box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I make my self clear .&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Saquib Khan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 21:08:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229387#M138863</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-04-21T21:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229388#M138864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't have to specify the type of the tables parameter in your FORM definition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 21:09:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229388#M138864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T21:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229389#M138865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I think I understand it now. So you have one perform within which you want to dynamically download different itabs based on the checkboxes user selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  FORM download_itabs_to_excel.

    FIELD-SYMBOLS: &amp;lt;itab&amp;gt; TYPE STANDARD TABLE.

    IF p_chkbx1 = 'X'.
      ASSIGN itab1[] TO &amp;lt;itab&amp;gt;.
      CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          file_name                       = p_file
*   CREATE_PIVOT                    = 0
*   DATA_SHEET_NAME                 = ' '
*   PIVOT_SHEET_NAME                = ' '
*   PASSWORD                        = ' '
*   PASSWORD_OPTION                 = 0
       TABLES
*   PIVOT_FIELD_TAB                 =
         data_tab                        = &amp;lt;itab&amp;gt;
*   FIELDNAMES                      =
* EXCEPTIONS
*   FILE_NOT_EXIST                  = 1
*   FILENAME_EXPECTED               = 2
*   COMMUNICATION_ERROR             = 3
*   OLE_OBJECT_METHOD_ERROR         = 4
*   OLE_OBJECT_PROPERTY_ERROR       = 5
*   INVALID_PIVOT_FIELDS            = 6
*   DOWNLOAD_PROBLEM                = 7
*   OTHERS                          = 8
                .
      IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDIF.

  ENDFORM.                    "download_to_excel&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to repeat the IF P_CHKBX1 = 'X' for each of the checkboxes selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I got it correct this time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 21:16:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229389#M138865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T21:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229390#M138866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you understand the one part of story. Now like you are passing internal table to FM in the above code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I also pass internal table to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM download_itabs_to_excel using &amp;lt;b&amp;gt;&amp;lt;dynamic table &amp;gt;?&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM download_itabs_to_excel using &amp;lt;b&amp;gt;&amp;lt;dynamic_table&amp;gt;?&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your input and time ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saquib&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 21:24:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229390#M138866</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-04-21T21:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229391#M138867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let us say we can do this, what do you want to do with the &amp;lt;dynamic_table&amp;gt; inside the form? Just pass it to the function call? In that case you can put the function call in a form and don't use any parameters. Just make the previous field-symbol definition global. So now the flow more or less will be&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
form download_based_on_user_choice.

  if p_chkbx1 = 'X'.
    assign itab1[] to &amp;lt;itab&amp;gt;.
    perform download_itab_to_excel.
  endif.

  if p_chkbx2 = 'X'.
    assign itab2[] to &amp;lt;itab&amp;gt;.
    perform download_itab_to_excel.
   endif.

  if p_chkbx3 = 'X'.
    assign itab3[] to &amp;lt;itab&amp;gt;.
    perform download_itab_to_excel.
  endif.

endform.

form download_itab_to_excel.

  call function .... table ... = &amp;lt;itab&amp;gt; ...

endform. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this what you want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 21:33:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229391#M138867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T21:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229392#M138868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No:( . never mind !!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let say &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 "Filled with data for excel &lt;/P&gt;&lt;P&gt;itab2 :filld with data for excel &lt;/P&gt;&lt;P&gt;itab3 : filled with data for excel .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only want &amp;lt;u&amp;gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;only one perform&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/u&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;i&amp;gt;I do this ... and Its working :)&amp;lt;/i&amp;gt;&amp;lt;/u&amp;gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;if p_chkbx1 = 'X'.&lt;/P&gt;&lt;P&gt; assign itab1[] to &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;elseif p_chkbx2 = 'X'.&lt;/P&gt;&lt;P&gt; assign itab2[] to &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;elseif p_chkbx3 = 'X'.&lt;/P&gt;&lt;P&gt;assign itab3[] to &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*"Where out tab could be 1,2, or 3 on user slection&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;perform download_excel using &amp;lt;Itab&amp;gt;.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download_excel using Itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          file_name                       = p_file&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CREATE_PIVOT                    = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATA_SHEET_NAME                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PIVOT_SHEET_NAME                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PASSWORD                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PASSWORD_OPTION                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PIVOT_FIELD_TAB                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         data_tab                        = &amp;lt;itab&amp;gt; "&amp;lt;b&amp;gt;Could be 1,2, or 3&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELDNAMES                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_NOT_EXIST                  = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILENAME_EXPECTED               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  COMMUNICATION_ERROR             = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OLE_OBJECT_METHOD_ERROR         = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OLE_OBJECT_PROPERTY_ERROR       = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INVALID_PIVOT_FIELDS            = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DOWNLOAD_PROBLEM                = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                          = 8&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                .&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&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;&lt;/P&gt;&lt;P&gt;endform &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Saquib Khan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 21:47:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229392#M138868</guid>
      <dc:creator>former_member181966</dc:creator>
      <dc:date>2006-04-21T21:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: One perform with different internal table structure to 1 function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229393#M138869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't mention that they are radiobuttons. I thought they are real checkboxes where the user can choose all or some or none of the options. Yes if they are just radiobuttons, then you can do the way you explained. I see that you figured it out already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Apr 2006 19:15:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/one-perform-with-different-internal-table-structure-to-1-function-module/m-p/1229393#M138869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-22T19:15:37Z</dc:date>
    </item>
  </channel>
</rss>

