<?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: help in perform in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411037#M537770</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Assuming that all the internal tables would be the same type:&lt;/P&gt;&lt;P&gt;within the perform it would not be necessary to know exactly which table name is being used. Instead, internal tables will be passed to the form and will be handled as "formal" parameters inside this form. Then, when returning to the main program, you will be able to distinguish which internal table has been passed to the form.&lt;/P&gt;&lt;P&gt;An example would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab1 occurs 0&lt;/P&gt;&lt;P&gt;f1 type n,&lt;/P&gt;&lt;P&gt;f2 type n&lt;/P&gt;&lt;P&gt;f3 type n,&lt;/P&gt;&lt;P&gt;end of itab1.&lt;/P&gt;&lt;P&gt;data: begin of itab2 occurs 0,&lt;/P&gt;&lt;P&gt;f1 type n,&lt;/P&gt;&lt;P&gt;f2 type n&lt;/P&gt;&lt;P&gt;f3 type n,&lt;/P&gt;&lt;P&gt;end of itab2.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you can see, itab1 and itab2 have really the same structure, so you can also declare them in the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of wa_itab,&lt;/P&gt;&lt;P&gt;f1 type n,&lt;/P&gt;&lt;P&gt;f2 type n,&lt;/P&gt;&lt;P&gt;f3 type n,&lt;/P&gt;&lt;P&gt;end of wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab1 like wa_itab occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        itab2 like wa_itab occurs 0 with header line.&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;Then, you could create a form routine in your report similar as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form fill_tables tables aux_itab structure wa_itab. --&amp;gt; (wa_itab was declared at the beggining of your report)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from xxxx into corresponding fields of table aux_itab. (here, aux_itab is the "alias" for the internal table which has been passed to the form)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;(like this you could fill your internal table as needed), &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;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in your main program you would call the form like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform fill_tables tables itab1.&lt;/P&gt;&lt;P&gt;perform fill_tables tables itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, you can also call the form like this:&lt;/P&gt;&lt;P&gt;perform fill_tables tables: itab1, itab2. (this means that you will call the form twice)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also find more help by pressing 'F1' on the statement "perform" in your ABAP editor. This will show a lot of suggestions about syntax for statement perform/form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards,&lt;/P&gt;&lt;P&gt;Mar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2007 06:50:52 GMT</pubDate>
    <dc:creator>mar_novalbos</dc:creator>
    <dc:date>2007-06-20T06:50:52Z</dc:date>
    <item>
      <title>help in perform</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411034#M537767</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;&lt;/P&gt;&lt;P&gt;in this code of mine i use name_tab nametab_3001 but i have a lot of tables that i &lt;/P&gt;&lt;P&gt;have to do the same code what is have to be change is the just the table &amp;lt;b&amp;gt;nametab_3001 &amp;amp; wa_nametab_3001&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i do it in perform maybe some can help me with that?&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;SELECT SINGLE perid pernr nachn vorna&lt;/P&gt;&lt;P&gt;  FROM pa0002&lt;/P&gt;&lt;P&gt;  INTO (taz9,emp_pernr,famliy_name,first_name)&lt;/P&gt;&lt;P&gt;  WHERE pernr = wa_et_infty_modif-pernr&lt;/P&gt;&lt;P&gt;  AND begda LE wa_et_infty_modif-bdate&lt;/P&gt;&lt;P&gt;  AND endda GE wa_et_infty_modif-bdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_str1 = famliy_name(12).                 "Employee last name&lt;/P&gt;&lt;P&gt;    SHIFT lv_str1 LEFT DELETING LEADING space. "Miror&lt;/P&gt;&lt;P&gt;    TRANSLATE lv_str1 USING c_translate.       "Chinese&lt;/P&gt;&lt;P&gt;  wa_nametab_3001-mishpacha = lv_str1.&lt;/P&gt;&lt;P&gt;  wa_nametab_3001-emp_pernr = emp_pernr.&lt;/P&gt;&lt;P&gt;  APPEND wa_nametab_3001 TO nametab_3001.&lt;/P&gt;&lt;P&gt;   CLEAR wa_nametab_3001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_str2 = first_name(7).                   "Employee first name&lt;/P&gt;&lt;P&gt;    SHIFT lv_str2 LEFT DELETING LEADING space. "Miror&lt;/P&gt;&lt;P&gt;    TRANSLATE lv_str2 USING c_translate.       "Chinese&lt;/P&gt;&lt;P&gt;    wa_nametab_3001-praty = lv_str2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT nametab_3001 INTO wa_nametab_3001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF wa_nametab_3001-emp_pernr = wa_et_infty_modif-pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MOVE: lv_str2 TO wa_nametab_3001-praty.&lt;/P&gt;&lt;P&gt;      MODIFY nametab_3001 FROM wa_nametab_3001 TRANSPORTING praty.&lt;/P&gt;&lt;P&gt;      CLEAR wa_nametab_3001.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 19:14:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411034#M537767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T19:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: help in perform</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411035#M537768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;If all of your internal tables have the same type, you could create a subroutine named form xxxxx tables itab structure wa_nametab_3001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in your main program, when calling this perform you could do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform xxxxx tables: nametab_3001, nametab_3002... (here you would put the tablenames which you are using)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope this helps. &lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Mar Novalbos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 19:53:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411035#M537768</guid>
      <dc:creator>mar_novalbos</dc:creator>
      <dc:date>2007-06-19T19:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: help in perform</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411036#M537769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Mar Novalbos &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can give me example becouse i dont now how the perform now which table i send ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 20:20:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411036#M537769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T20:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: help in perform</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411037#M537770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Assuming that all the internal tables would be the same type:&lt;/P&gt;&lt;P&gt;within the perform it would not be necessary to know exactly which table name is being used. Instead, internal tables will be passed to the form and will be handled as "formal" parameters inside this form. Then, when returning to the main program, you will be able to distinguish which internal table has been passed to the form.&lt;/P&gt;&lt;P&gt;An example would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab1 occurs 0&lt;/P&gt;&lt;P&gt;f1 type n,&lt;/P&gt;&lt;P&gt;f2 type n&lt;/P&gt;&lt;P&gt;f3 type n,&lt;/P&gt;&lt;P&gt;end of itab1.&lt;/P&gt;&lt;P&gt;data: begin of itab2 occurs 0,&lt;/P&gt;&lt;P&gt;f1 type n,&lt;/P&gt;&lt;P&gt;f2 type n&lt;/P&gt;&lt;P&gt;f3 type n,&lt;/P&gt;&lt;P&gt;end of itab2.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you can see, itab1 and itab2 have really the same structure, so you can also declare them in the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of wa_itab,&lt;/P&gt;&lt;P&gt;f1 type n,&lt;/P&gt;&lt;P&gt;f2 type n,&lt;/P&gt;&lt;P&gt;f3 type n,&lt;/P&gt;&lt;P&gt;end of wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab1 like wa_itab occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        itab2 like wa_itab occurs 0 with header line.&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;Then, you could create a form routine in your report similar as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form fill_tables tables aux_itab structure wa_itab. --&amp;gt; (wa_itab was declared at the beggining of your report)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from xxxx into corresponding fields of table aux_itab. (here, aux_itab is the "alias" for the internal table which has been passed to the form)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;(like this you could fill your internal table as needed), &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;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in your main program you would call the form like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform fill_tables tables itab1.&lt;/P&gt;&lt;P&gt;perform fill_tables tables itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, you can also call the form like this:&lt;/P&gt;&lt;P&gt;perform fill_tables tables: itab1, itab2. (this means that you will call the form twice)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also find more help by pressing 'F1' on the statement "perform" in your ABAP editor. This will show a lot of suggestions about syntax for statement perform/form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards,&lt;/P&gt;&lt;P&gt;Mar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2007 06:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-perform/m-p/2411037#M537770</guid>
      <dc:creator>mar_novalbos</dc:creator>
      <dc:date>2007-06-20T06:50:52Z</dc:date>
    </item>
  </channel>
</rss>

