<?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: calling same form multiple times in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850485#M46125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kranthi,&lt;/P&gt;&lt;P&gt;           You have mentioned that you are calling the sub-routine using different tablenames.Sadly enough you have to call the perform several times.We could help you out if you could give us the exact requirements.You can use the solution suggested by Jayanthi as long as you have values passed to all the formal parameters or the one suggested by Bhandari.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please close the thread by awarding some reward points.In case you have any more questions please post the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Nishanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2005 05:17:10 GMT</pubDate>
    <dc:creator>nishanthbhandar</dc:creator>
    <dc:date>2005-06-15T05:17:10Z</dc:date>
    <item>
      <title>calling same form multiple times</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850482#M46122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i need to call a single form with different table names as parameters depending on conditions.&lt;/P&gt;&lt;P&gt;for eg here is the approach &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if flag1_is_set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call form1 multiple times with table1, table2....... as parameters&lt;/P&gt;&lt;P&gt; "and i can avoid this&lt;/P&gt;&lt;P&gt; "  form 1 using table 1&lt;/P&gt;&lt;P&gt; "  form 1 using table 2&lt;/P&gt;&lt;P&gt; "  form 1 using table 3&lt;/P&gt;&lt;P&gt; "  form 1 using table 4&lt;/P&gt;&lt;P&gt; "  form 1 using table 5&lt;/P&gt;&lt;P&gt;elseif&lt;/P&gt;&lt;P&gt;  flag2_is_set&lt;/P&gt;&lt;P&gt;    form 1 using table 2&lt;/P&gt;&lt;P&gt;elseif&lt;/P&gt;&lt;P&gt;  flag3_is_set&lt;/P&gt;&lt;P&gt;   form 1 using table 3.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt;but i cannot call forms like this. can someone suggest&lt;/P&gt;&lt;P&gt;an equivalent implementation on how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i dont implement in the above mentioned approach i have to code the same thing with minor changes multiple times&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your help would be appreciated.&lt;/P&gt;&lt;P&gt;kranthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2005 23:01:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850482#M46122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-14T23:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: calling same form multiple times</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850483#M46123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont think you have any other option but to use perform several times with different tables .OR if you like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at internal tables (of difftable names )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform &amp;lt; &amp;gt;&amp;gt; using inttab-intabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 01:01:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850483#M46123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T01:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: calling same form multiple times</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850484#M46124</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 assume that you want to call the form at the maximum 3 times if flag1 is set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( flag1 = 'X' or flag2 = 'X' or flag3 = 'X').&lt;/P&gt;&lt;P&gt;Perform form1 tables &lt;/P&gt;&lt;P&gt;              table1 table2 table3.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If flag2 is set,then I assume that you are refreshing table1 and table3.Then in that case those tables are initial.So it won't affect.Similarly for flag3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 03:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850484#M46124</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-06-15T03:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: calling same form multiple times</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850485#M46125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kranthi,&lt;/P&gt;&lt;P&gt;           You have mentioned that you are calling the sub-routine using different tablenames.Sadly enough you have to call the perform several times.We could help you out if you could give us the exact requirements.You can use the solution suggested by Jayanthi as long as you have values passed to all the formal parameters or the one suggested by Bhandari.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please close the thread by awarding some reward points.In case you have any more questions please post the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Nishanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 05:17:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850485#M46125</guid>
      <dc:creator>nishanthbhandar</dc:creator>
      <dc:date>2005-06-15T05:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: calling same form multiple times</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850486#M46126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might try passing a field symbol (itab) in the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And assign the filed symbol with your itab as per the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check if the program below gives you any idea.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  Z_RAM_DYN_TAB_IN_FORM.
PARAMETERS : P_TAB1 TYPE C.

DATA: lt_users2 type standard table of usr02.
DATA: lt_users1 type standard table of usr01.

FIELD-SYMBOLS: &amp;lt;fs_itab&amp;gt; type standard table.

SELECT * into table lt_users1 FROM usr01.

SELECT * into table lt_users2 FROM usr02.

 IF P_TAB1 eq 'X'.
   ASSIGN lt_users1 to &amp;lt;fs_itab&amp;gt;.
 ELSE.
   ASSIGN lt_users2 to &amp;lt;fs_itab&amp;gt;.
 ENDIF.

PERFORM test_form TABLES &amp;lt;fs_itab&amp;gt;.

FORM test_form TABLES x_itab .

FIELD-SYMBOLS: &amp;lt;fs_wa&amp;gt; type any.
FIELD-SYMBOLS: &amp;lt;fs_field&amp;gt; type any.

  LOOP AT x_itab ASSIGNING &amp;lt;fs_wa&amp;gt;.

    DO 5 times.     "Write first 5 fields of itabs.
      ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;fs_wa&amp;gt; to &amp;lt;fs_field&amp;gt;.
      WRITE :  &amp;lt;fs_field&amp;gt;.
    ENDDO.
    WRITE :/.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ram Manohar Tiwari&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2005 17:39:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-same-form-multiple-times/m-p/850486#M46126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-15T17:39:00Z</dc:date>
    </item>
  </channel>
</rss>

