<?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: Internal table logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768507#M332028</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 believe the exporting parameters is static..You cannot create exporting parameters on the fly..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Dec 2006 19:29:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-27T19:29:17Z</dc:date>
    <item>
      <title>Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768499#M332020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to write the each content (each row) of my internal table to output parameters (out1, out2,out3...outn) of my Func Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table has only one column. The contents of my internal table is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cont1&lt;/P&gt;&lt;P&gt;cont2&lt;/P&gt;&lt;P&gt;cont3&lt;/P&gt;&lt;P&gt;..............&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;contn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output should be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;out1 = cont1&lt;/P&gt;&lt;P&gt;out2 = cont2&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;outn = contn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls tell me if this a way of doing this. Points will be awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Dany&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 18:53:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768499#M332020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T18:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768500#M332021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use field symbols for this.   Questions,  are CONT1, CONT2, CONT3 are these varaibles names within the function module?   Are the field names always like this CONT and (1) numeric or alpha?   What about OUT1, OUT2, etc,  same thing here?  Always OUT and numeric or alpha?  If so you can build the field names on the fly and assign to field symbols in order to move them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:00:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768500#M332021</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-27T19:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768501#M332022</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;You can do it using field-symbols..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if there are more number of rows in the internal table than the number of exporting parameters...what should happen..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or it the number of rows in the internal table is always fixed as the number of exporting parameters..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768501#M332022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T19:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768502#M332023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its like if you have particular number of output parameters (suppose 5 output parameters) then you can loop on internal table and assign the values like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table itab into x_itab index 1.&lt;/P&gt;&lt;P&gt;out1 = x_itab-field.&lt;/P&gt;&lt;P&gt;Read table itab into x_itab index 2.&lt;/P&gt;&lt;P&gt;out2 = x_itab-field.&lt;/P&gt;&lt;P&gt;Read table itab into x_itab index 3.&lt;/P&gt;&lt;P&gt;out3 = x_itab-field.&lt;/P&gt;&lt;P&gt;Read table itab into x_itab index 4.&lt;/P&gt;&lt;P&gt;out4 = x_itab-field.&lt;/P&gt;&lt;P&gt;Read table itab into x_itab index 5.&lt;/P&gt;&lt;P&gt;out5 = x_itab-field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, &lt;/P&gt;&lt;P&gt;You can use the output parameter as Table and pass your table to it directly and take you internal table in the program and work with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amandeep Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768502#M332023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T19:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768503#M332024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this maybe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: cont1 type c value 'A',
      cont2 type c value 'B',
      cont3 type c value 'C',
      cont4 type c value 'D'.

data: out1 type c,
      out2 type c,
      out3 type c,
      out4 type c.


data: begin of itab occurs 0,
      fld(30) type c,
      end of itab.

data: out_field(30).

field-symbols: &amp;lt;fs_i&amp;gt;,
               &amp;lt;fs_o&amp;gt;.

itab-fld = 'CONT1'.  append itab.
itab-fld = 'CONT2'.  append itab.
itab-fld = 'CONT3'.  append itab.
itab-fld = 'CONT4'.  append itab.


loop at itab.

  assign (itab-fld) to &amp;lt;fs_i&amp;gt;.

  out_field = 'OUT'.
  out_field+3(1) = itab-fld+4(1).

  assign (out_field) to &amp;lt;fs_o&amp;gt;.

  &amp;lt;fs_o&amp;gt; = &amp;lt;fs_i&amp;gt;.


endloop.


write:/ out1, out2, out3, out4.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:06:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768503#M332024</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-27T19:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768504#M332025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONT1..etc are contents of my itab. It can be num or alphanum..&amp;amp; its char type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field names can be num or alphanu. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUT 1, OUT2 are export params of FM ..just display the content of my itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q) How  can we  build the field names on the fly and assign to field symbols in order to move them? Pls tell me using Work Areas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narendra:&lt;/P&gt;&lt;P&gt;Thanks for your response. &lt;/P&gt;&lt;P&gt;The no of rows of internal table is not fixed...can u help me doing this with work areas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768504#M332025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T19:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768505#M332026</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;Check this example..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;        value(10),&lt;/P&gt;&lt;P&gt;      END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-value = 'CONT1'.APPEND itab.&lt;/P&gt;&lt;P&gt;itab-value = 'CONT2'.APPEND itab.&lt;/P&gt;&lt;P&gt;itab-value = 'CONT3'.APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***Assuming if you have three exporting parameters..&lt;/P&gt;&lt;P&gt;***Named OUT1 OUT2 &amp;amp; OUT3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_field(30).&lt;/P&gt;&lt;P&gt;DATA: v_char(5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE itab INDEX sy-index.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR: v_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  v_char = sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SHIFT v_char LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE 'OUT' v_char INTO v_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN (v_field) TO &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;fs&amp;gt; = itab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768505#M332026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T19:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768506#M332027</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;The no of rows of internal table is not fixed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cant we build the export parameters of the FM dynamically based on no of records in itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:28:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768506#M332027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T19:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768507#M332028</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 believe the exporting parameters is static..You cannot create exporting parameters on the fly..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:29:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768507#M332028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T19:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768508#M332029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the output provided its for fixed no of output params.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me if i can do it like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT itab INTO wa_itab.&lt;/P&gt;&lt;P&gt;      IF sy-tabix = 1.&lt;/P&gt;&lt;P&gt;        strout1 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;      ELSEIF sy-tabix = 2.&lt;/P&gt;&lt;P&gt;        strout2 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF sy-tabix = 3.&lt;/P&gt;&lt;P&gt;        strout3 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF sy-tabix = 4.&lt;/P&gt;&lt;P&gt;        strout4 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF sy-tabix = 5.&lt;/P&gt;&lt;P&gt;        strout5 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF sy-tabix = 6.&lt;/P&gt;&lt;P&gt;        strout6 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF sy-tabix = 7.&lt;/P&gt;&lt;P&gt;        strout7 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF sy-tabix = 8.&lt;/P&gt;&lt;P&gt;        strout8 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF sy-tabix = 9.&lt;/P&gt;&lt;P&gt;        strout9 = wa_itab-f1.&lt;/P&gt;&lt;P&gt;      ENDIF.&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, 27 Dec 2006 19:46:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768508#M332029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T19:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768509#M332030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can do it like that if you want, as long as the iTAB is sorted correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768509#M332030</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-27T19:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768510#M332031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this. It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amandeep Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2006 19:58:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic/m-p/1768510#M332031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-27T19:58:58Z</dc:date>
    </item>
  </channel>
</rss>

