<?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: append rows to dynamic internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415228#M1548579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Keshav..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry,but i really dint get that ref.link. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Oct 2010 07:34:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-19T07:34:43Z</dc:date>
    <item>
      <title>append rows to dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415226#M1548577</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;I have a dynamic internal table &amp;lt;fs_itab&amp;gt;, i need to append rows if some condition is not satisfying...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some of the fields on that intenal table are always same hence i need to append rows only for that columns.fields.&lt;/P&gt;&lt;P&gt;how is it possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example &amp;lt;field1&amp;gt; , &amp;lt;field2&amp;gt; are always constant while dynamic generation of &amp;lt;fs_itab&amp;gt;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so whiel appending the row i need to just modify these fields only...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am trying the following code..but its getting failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;              EXPORTING&lt;/P&gt;&lt;P&gt;                it_fieldcatalog           = gt_fieldcata01&lt;/P&gt;&lt;P&gt;              IMPORTING&lt;/P&gt;&lt;P&gt;                ep_table                  = &amp;lt;fs_data_tempa01&amp;gt;&lt;/P&gt;&lt;P&gt;              EXCEPTIONS&lt;/P&gt;&lt;P&gt;                generate_subpool_dir_full = 1&lt;/P&gt;&lt;P&gt;                OTHERS                    = 2.&lt;/P&gt;&lt;P&gt;            IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;            ASSIGN &amp;lt;fs_data_tempa01&amp;gt;-&amp;gt;* TO &amp;lt;fs_itab&amp;gt;.&lt;/P&gt;&lt;P&gt;            CREATE DATA new_linetempa01 LIKE LINE OF &amp;lt;fs_itab&amp;gt;.&lt;/P&gt;&lt;P&gt;            ASSIGN new_linetempa01-&amp;gt;*  TO &amp;lt;fs_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;fs_wa&amp;gt;-field1 = '1'&lt;/P&gt;&lt;P&gt;       &amp;lt;fs_wa&amp;gt;-field2 = '2'.&lt;/P&gt;&lt;P&gt;        append &amp;lt;fs_wa&amp;gt; to &amp;lt;fs_itab&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls help me out to resolve the issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;john&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 06:09:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415226#M1548577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-19T06:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: append rows to dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415227#M1548578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to use assign component statament to do that.&lt;/P&gt;&lt;P&gt;Check my reply here &lt;SPAN __jive_macro_name="message" id="9562599"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 06:43:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415227#M1548578</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-10-19T06:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: append rows to dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415228#M1548579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Keshav..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry,but i really dint get that ref.link. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 07:34:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415228#M1548579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-19T07:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: append rows to dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415229#M1548580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to my reply in the below threads on working with dynamic internal tables -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1683193"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1771667"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravikiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 07:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415229#M1548580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-19T07:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: append rows to dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415230#M1548581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;fs_wa&amp;gt; is of type &lt;STRONG&gt;any&lt;/STRONG&gt; so you can't statically address its fields. The system simply don't recognize them as during runtime you could i.e. use structure of some other type which wouldn't have these fields, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So all you need is to address these fields dynamically. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
field-symbols &amp;lt;any_field&amp;gt; type any.

assign component 'FIELD1' of structure &amp;lt;fs_wa&amp;gt; to &amp;lt;any_field&amp;gt;.
if sy-subrc = 0.
   &amp;lt;any_field&amp;gt; = 1.
endif.

assign component 'FIELD2' of structure &amp;lt;fs_wa&amp;gt; to &amp;lt;any_field&amp;gt;.
if sy-subrc = 0.
   &amp;lt;any_field&amp;gt; = 2.
endif.

append &amp;lt;fs_wa&amp;gt; to &amp;lt;fs_itab&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;any_field&amp;gt; in turn points to content of &lt;EM&gt;field1&lt;/EM&gt; and &lt;EM&gt;field2&lt;/EM&gt; respectively. As you have addressed them dynamically (by assgining this field to new field symbol) you are able to change its content by this field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 08:29:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415230#M1548581</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-10-19T08:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: append rows to dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415231#M1548582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ravi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I dint get ur links ...sorry..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you kindly help me in achieving the result? ..pls...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually the dynamic internal table is empty and i need to insert the value into certain fields which are always constant in the dynamic internal table.&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;john&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please do not use SMS speak.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Oct 19, 2010 11:30 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 09:11:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415231#M1548582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-19T09:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: append rows to dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415232#M1548583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcin..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u pls. help me out with any useful links reg. dynamic internal tables??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 09:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-rows-to-dynamic-internal-table/m-p/7415232#M1548583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-19T09:27:36Z</dc:date>
    </item>
  </channel>
</rss>

