<?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: Insert values into dynamically created internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875905#M1594258</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You All.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 May 2011 05:16:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-24T05:16:16Z</dc:date>
    <item>
      <title>Insert values into dynamically created internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875902#M1594255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a  dynamic internal table using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to insert values into the dynamic internal table. How Do I insert values into corresponding columns of the dynamic internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searched for many codes on net but I could not find appropriate one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;vendor_101_xyz_international     HY01  HY02  HY03  HY04  Total&lt;/P&gt;&lt;P&gt;article     description                      fergy  mash  kenyi  yaya&lt;/P&gt;&lt;P&gt;101          saffron                            04       06      09       01        20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created dynamic internal tabel with columns:&lt;/P&gt;&lt;P&gt;vendor_101_xyz_international     HY01  HY02  HY03  HY04  Total&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now I wanto add values:&lt;/P&gt;&lt;P&gt;101          saffron                            04       06      09       01        20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here  coulumns HY01  HY02  HY03  HY04  can change to one or two or any number.&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;Dep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 08:58:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875902#M1594255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T08:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into dynamically created internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875903#M1594256</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;If you are able to create a dynamic internal table then why are you not able to create a dynamic line type.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
field:symbols:&amp;lt;fs&amp;gt; type any.
data:wf_ref type ref to data.

create data wf_ref like line of &amp;lt;fs_tab&amp;gt;.  "&amp;lt;fs_tab&amp;gt; is your dynamic internal table
if wf_ref is bound.
assign wf_ref-&amp;gt;* to &amp;lt;fs&amp;gt;.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now you can use &amp;lt;fs&amp;gt; as your work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search for more details in SCN regarding this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 09:12:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875903#M1594256</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-05-23T09:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into dynamically created internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875904#M1594257</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'm not sure about your requirement but you can try to append an initial line and then loop at the dynamic table like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
field-symbols: &amp;lt;fs_data&amp;gt; type standard table,
               &amp;lt;fs_wa&amp;gt;   type any,
               &amp;lt;fs_val&amp;gt;  type any.

assign dynamic_table-&amp;gt;* to &amp;lt;fs_data&amp;gt;. "your dynamic internal table
append initial line to &amp;lt;fs_data&amp;gt;.

loop at &amp;lt;fs_data&amp;gt; assigning &amp;lt;fs_wa&amp;gt;.

    assign component 'HY01' of structure &amp;lt;fs_wa&amp;gt; to &amp;lt;fs_val&amp;gt;.
    &amp;lt;fs_val&amp;gt; = 'saffron'. "value to be inserted
    
    assign component 'HY02' of structure &amp;lt;fs_wa&amp;gt; to &amp;lt;fs_val&amp;gt;.
    &amp;lt;fs_val&amp;gt; = '04'.
    
    "and so on..

endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 09:58:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875904#M1594257</guid>
      <dc:creator>jarryq</dc:creator>
      <dc:date>2011-05-23T09:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into dynamically created internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875905#M1594258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You All.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 05:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-dynamically-created-internal-table/m-p/7875905#M1594258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-24T05:16:16Z</dc:date>
    </item>
  </channel>
</rss>

