<?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: Filling internal table dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084381#M1357516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, why don't you filter all the entires you want and delete the entries you do not want. LOOP over internal table and do a DELETE table INDEX sy-tabix for the entries you do not want. Or is this to simple? Succes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Sep 2009 06:53:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-11T06:53:18Z</dc:date>
    <item>
      <title>Filling internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084380#M1357515</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 internal table with fields F1, V1, F2, V2, F3, V3, F4, V4, F5, V5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if the internal table is having fields and values  like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; Fields:   F1       V1       F2      V2     F3    V3     F4     V4     F5     V5
  Values:  A        10        B        20   C     30      D      40     E      50 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the output as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Fields: F1       V1       F2      V2     F3    V3
 Values: C      30         D      40      E     50&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always want field values C, D and E only. and F4 V4 F5 V5 fields as empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if the internal table is having fields and values  like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; Fields:   F1       V1       F2      V2     F3    V3     F4     V4     F5     V5 
  Values:  A        10                                                                                ----&amp;gt;Row1
                              B       20                                                                              ----&amp;gt;Row2
                                           C     30                                                                  ----&amp;gt;Row3
                                                           D      40                                                 ----&amp;gt;Row4
                                                                          E      50 ----&amp;gt;Row5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the output as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Fields: F1       V1       F2      V2     F3    V3
 Values: C      30         D      40      E     50&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always want field values C, D and E only. and F4 V4 F5 V5 fields as empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Vishnu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 06:48:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084380#M1357515</guid>
      <dc:creator>former_member188829</dc:creator>
      <dc:date>2009-09-11T06:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Filling internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084381#M1357516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, why don't you filter all the entires you want and delete the entries you do not want. LOOP over internal table and do a DELETE table INDEX sy-tabix for the entries you do not want. Or is this to simple? Succes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 06:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084381#M1357516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-11T06:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Filling internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084382#M1357517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Understabd the following code to populate the dynamic internal table&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 = y_i_fcat&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      ep_table        = y_i_dyn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  assign y_i_dyn-&amp;gt;* to &amp;lt;y_i_dyn&amp;gt;.&lt;/P&gt;&lt;P&gt;  create data y_wa_dyn like line of &amp;lt;y_i_dyn&amp;gt;.&lt;/P&gt;&lt;P&gt;  assign y_wa_dyn-&amp;gt;* to &amp;lt;y_wa_dyn&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Move data from Final table to dynamic table &amp;lt;y_i_dyn&amp;gt;&lt;/P&gt;&lt;P&gt;  loop at y_i_final into y_wa_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    assign component 'VBELN' of structure &amp;lt;y_wa_dyn&amp;gt; to &amp;lt;y_v_fld&amp;gt;.&lt;/P&gt;&lt;P&gt;    &amp;lt;y_v_fld&amp;gt; = y_wa_final-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    y_lv_cntr = y_lv_cntr + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    concatenate 'PARVW' '-' y_lv_cntr into y_lv_parvw.&lt;/P&gt;&lt;P&gt;    assign component y_lv_parvw of structure &amp;lt;y_wa_dyn&amp;gt; to &amp;lt;y_v_fld&amp;gt;.&lt;/P&gt;&lt;P&gt;    &amp;lt;y_v_fld&amp;gt; = y_wa_final-parvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    concatenate 'KUNNR' '-' y_lv_cntr into y_lv_kunnr.&lt;/P&gt;&lt;P&gt;    assign component y_lv_kunnr of structure &amp;lt;y_wa_dyn&amp;gt; to &amp;lt;y_v_fld&amp;gt;.&lt;/P&gt;&lt;P&gt;    &amp;lt;y_v_fld&amp;gt; = y_wa_final-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    concatenate 'ADRNR' '-' y_lv_cntr into y_lv_adrnr.&lt;/P&gt;&lt;P&gt;    assign component y_lv_adrnr of structure &amp;lt;y_wa_dyn&amp;gt; to &amp;lt;y_v_fld&amp;gt;.&lt;/P&gt;&lt;P&gt;    &amp;lt;y_v_fld&amp;gt; = y_wa_final-adrnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    at end of vbeln.&lt;/P&gt;&lt;P&gt;      append &amp;lt;y_wa_dyn&amp;gt; to &amp;lt;y_i_dyn&amp;gt;.&lt;/P&gt;&lt;P&gt;      free: &amp;lt;y_wa_dyn&amp;gt;,&amp;lt;y_v_fld&amp;gt;.&lt;/P&gt;&lt;P&gt;      clear y_lv_cntr.&lt;/P&gt;&lt;P&gt;    endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&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;RK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 06:56:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084382#M1357517</guid>
      <dc:creator>rthoodi</dc:creator>
      <dc:date>2009-09-11T06:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Filling internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084383#M1357518</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;&lt;/P&gt;&lt;P&gt;Try this :-&lt;/P&gt;&lt;P&gt; ITAB-f1 = 'A'.&lt;/P&gt;&lt;P&gt;     ITAB-f2 = 'B'.&lt;/P&gt;&lt;P&gt;     ITAB-f3 = 'C'.&lt;/P&gt;&lt;P&gt;     ITAB-f4 = 'D'.&lt;/P&gt;&lt;P&gt;     ITAB-f5 = 'E'.&lt;/P&gt;&lt;P&gt;     ITAB-V1 = '10'.&lt;/P&gt;&lt;P&gt;     ITAB-V2 = '20'.&lt;/P&gt;&lt;P&gt;     ITAB-V3 = '30'.&lt;/P&gt;&lt;P&gt;     ITAB-V4 = '40'.&lt;/P&gt;&lt;P&gt;     ITAB-V5 = '50'.&lt;/P&gt;&lt;P&gt;APPEND ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab .&lt;/P&gt;&lt;P&gt;  itab-f1 = itab-f3.&lt;/P&gt;&lt;P&gt;  itab-v1 = itab-v3.&lt;/P&gt;&lt;P&gt;  itab-f2 = itab-f4.&lt;/P&gt;&lt;P&gt;  itab-v2 = itab-v4.&lt;/P&gt;&lt;P&gt;  itab-f3 = itab-f5.&lt;/P&gt;&lt;P&gt;  itab-v3 = itab-v5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: itab-F4, itab-V4, itab-F5, itab-V5.&lt;/P&gt;&lt;P&gt;  MODIFY itab TRANSPORTING f1 f2 f3 v1 v2 v3 f4 f5 v4 v5.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Prakash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 07:10:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084383#M1357518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-11T07:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Filling internal table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084384#M1357519</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;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab.
if not itab-f3 is initial.
iout-f1 = itab-f3.
endif.

if not itab-v3 is initial.
iout-v1 = itab-v3.
endif.

if not itab-f4 is initial.
iout-f2 = itab-f4.
endif.

if not itab-v4 is initial.
iout-v2 = itab-v4.
endif.

if not itab-f5 is initial.
iout-f3 = itab-f5.
endif.

if not itab-v5 is initial.
iout-v3 = itab-v5.
endif.

append iout.
clear iout.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 07:28:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-internal-table-dynamically/m-p/6084384#M1357519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-11T07:28:16Z</dc:date>
    </item>
  </channel>
</rss>

