<?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 Optimizing multiple performs.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239674#M482774</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I basically want to embed multiple similar kind of performs in one single Perform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a standard BAPI which get details of a given object number in multiple tables (54 internal tables). After that , I am using perform statement which does the initializaton check for each internal table, and then download data for each internal table in flat files as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call function 'XYZ'.&lt;/P&gt;&lt;P&gt;Exporting......&lt;/P&gt;&lt;P&gt;..............&lt;/P&gt;&lt;P&gt;Tables&lt;/P&gt;&lt;P&gt; PTRVG = A1[]&lt;/P&gt;&lt;P&gt; PTRVF = A2[]&lt;/P&gt;&lt;P&gt;  .....&lt;/P&gt;&lt;P&gt;  .....&lt;/P&gt;&lt;P&gt; PTGTR = A54[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF  A1[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      FNAME = 'A1.txt'.&lt;/P&gt;&lt;P&gt;      perform download tables A1&lt;/P&gt;&lt;P&gt;                              using FNAME.&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;&lt;/P&gt;&lt;P&gt;IF  A54[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      FNAME = 'A54.txt'.&lt;/P&gt;&lt;P&gt;      perform download tables A54&lt;/P&gt;&lt;P&gt;                              using FNAME.&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;Now this creates 54 flat files using 54 internal tables. This is what I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;But, I don't want to write perform 54 times. I was wondering if there is a way I can write ONE perform inside a loop which will check for INITIAL for every internal table which will get looped one after another.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know a table called The table FUPARAREF which can get Table type parameters in an internal tables for given function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select PARAMETER PPOSITION STRUCTURE FROM FUPARAREF into TABLE PARAMETER_TAB WHERE FUNCNAME = 'ABC'&lt;/P&gt;&lt;P&gt;                                AND PARAMTYPE = 'T'&lt;/P&gt;&lt;P&gt;                                ORDER BY PPOSITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if this can be used to solve my issue ? If not , then any suggestions...&lt;/P&gt;&lt;P&gt;&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;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2007 16:13:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-03T16:13:11Z</dc:date>
    <item>
      <title>Optimizing multiple performs....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239674#M482774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I basically want to embed multiple similar kind of performs in one single Perform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a standard BAPI which get details of a given object number in multiple tables (54 internal tables). After that , I am using perform statement which does the initializaton check for each internal table, and then download data for each internal table in flat files as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call function 'XYZ'.&lt;/P&gt;&lt;P&gt;Exporting......&lt;/P&gt;&lt;P&gt;..............&lt;/P&gt;&lt;P&gt;Tables&lt;/P&gt;&lt;P&gt; PTRVG = A1[]&lt;/P&gt;&lt;P&gt; PTRVF = A2[]&lt;/P&gt;&lt;P&gt;  .....&lt;/P&gt;&lt;P&gt;  .....&lt;/P&gt;&lt;P&gt; PTGTR = A54[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF  A1[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      FNAME = 'A1.txt'.&lt;/P&gt;&lt;P&gt;      perform download tables A1&lt;/P&gt;&lt;P&gt;                              using FNAME.&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;&lt;/P&gt;&lt;P&gt;IF  A54[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      FNAME = 'A54.txt'.&lt;/P&gt;&lt;P&gt;      perform download tables A54&lt;/P&gt;&lt;P&gt;                              using FNAME.&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;Now this creates 54 flat files using 54 internal tables. This is what I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;But, I don't want to write perform 54 times. I was wondering if there is a way I can write ONE perform inside a loop which will check for INITIAL for every internal table which will get looped one after another.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know a table called The table FUPARAREF which can get Table type parameters in an internal tables for given function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select PARAMETER PPOSITION STRUCTURE FROM FUPARAREF into TABLE PARAMETER_TAB WHERE FUNCNAME = 'ABC'&lt;/P&gt;&lt;P&gt;                                AND PARAMTYPE = 'T'&lt;/P&gt;&lt;P&gt;                                ORDER BY PPOSITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if this can be used to solve my issue ? If not , then any suggestions...&lt;/P&gt;&lt;P&gt;&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;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 16:13:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239674#M482774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T16:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Optimizing multiple performs....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239675#M482775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;  Use Case instead of Ifs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreeram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 16:15:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239675#M482775</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-05-03T16:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Optimizing multiple performs....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239676#M482776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not an IF-ELSEIF condition which I can replace by case. &lt;/P&gt;&lt;P&gt;I think Case cannot solve this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 16:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239676#M482776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T16:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Optimizing multiple performs....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239677#M482777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Since you use the same fun module in all the cases (like GUI_DOWNLOAD) noo need to pass the fun module name in perform&lt;/P&gt;&lt;P&gt;better declare 54 ITABs and pass them and change the DB table A1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not itaba1[] is initial.&lt;/P&gt;&lt;P&gt;perform download tables itaba1 changing A1.&lt;/P&gt;&lt;P&gt;...........&lt;/P&gt;&lt;P&gt;perform download tables itaba54 changing A54.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you will pass the internal table to the function module and downloaded data to be passed to Db table A1 and it is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 17:01:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239677#M482777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T17:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Optimizing multiple performs....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239678#M482778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if the following works for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST56                                .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: counter type sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- Form test&lt;/P&gt;&lt;P&gt;FORM test .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Write:/'test', counter.&lt;/P&gt;&lt;P&gt;  counter = counter + 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read an internal table for the values you want to pass to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the perform using this counter.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if counter GE 5.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    Perform test.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " test&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 22:51:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-multiple-performs/m-p/2239678#M482778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T22:51:11Z</dc:date>
    </item>
  </channel>
</rss>

