<?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: Dynamic internal table creation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519022#M846394</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;Can I use field symbols in this case. Could anyboby propose any solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Mar 2008 06:56:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-07T06:56:04Z</dc:date>
    <item>
      <title>Dynamic internal table creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519021#M846393</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;I have a problem with creation of  an internal table.&lt;/P&gt;&lt;P&gt;First intarnal table contain two fields name and value.&lt;/P&gt;&lt;P&gt;Second table will be created according to this name value pair.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1&lt;/P&gt;&lt;P&gt;itab2-??? = itab1-value.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How Should I do dynamically so that itab2 can be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jeetu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 06:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519021#M846393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T06:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519022#M846394</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;Can I use field symbols in this case. Could anyboby propose any solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 06:56:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519022#M846394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T06:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519023#M846395</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;This is very good example ,&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;If you give the input as 3...IT will create 3 columns..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_input TYPE i OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_fieldname TYPE char30.&lt;/P&gt;&lt;P&gt;DATA: v_char TYPE numc4.&lt;/P&gt;&lt;P&gt;DATA: it_fldcat TYPE lvc_t_fcat.&lt;/P&gt;&lt;P&gt;DATA: wa_it_fldcat LIKE LINE OF it_fldcat.&lt;/P&gt;&lt;P&gt;DATA: gp_table TYPE REF TO data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;gt_table&amp;gt; TYPE table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO p_input TIMES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_fieldname = 'COL'.&lt;/P&gt;&lt;P&gt;v_char = sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE v_fieldname v_char INTO v_fieldname.&lt;/P&gt;&lt;P&gt;CONDENSE v_fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR wa_it_fldcat.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-fieldname = v_fieldname.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-datatype = 'CHAR'.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-outputlen = 5.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-intlen = 5.&lt;/P&gt;&lt;P&gt;APPEND wa_it_fldcat TO it_fldcat .&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;Internal table creation.. &lt;/P&gt;&lt;P&gt;CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;EXPORTING it_fieldcatalog = it_fldcat&lt;/P&gt;&lt;P&gt;IMPORTING ep_table = gp_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN gp_table-&amp;gt;* TO &amp;lt;gt_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: WA TYPE REF TO DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Work area for the dynamic internal table. &lt;/P&gt;&lt;P&gt;CREATE DATA WA LIKE LINE OF &amp;lt;gt_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Dynamic internal table created'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 07:03:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519023#M846395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T07:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519024#M846396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Murli,&lt;/P&gt;&lt;P&gt;How can I get the internal table from ur example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 07:19:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519024#M846396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T07:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519025#M846397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeetu,&lt;/P&gt;&lt;P&gt;Please refer the following link which explains the concept of dynamic internal table very clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://www.saptechnical.com/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sekhar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 07:24:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519025#M846397</guid>
      <dc:creator>former_member188594</dc:creator>
      <dc:date>2008-03-07T07:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519026#M846398</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;FIELD-SYMBOLS: &amp;lt;gt_table&amp;gt; TYPE table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In field catelog we are appending the column names and length .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_it_fldcat-fieldname = v_fieldname.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-datatype = 'CHAR'.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-outputlen = 5.&lt;/P&gt;&lt;P&gt;wa_it_fldcat-intlen = 5.&lt;/P&gt;&lt;P&gt;APPEND wa_it_fldcat TO it_fldcat .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;add one more field to field to field catelog .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we are passing field catelog to method to create internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table creation.. &lt;/P&gt;&lt;P&gt;CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;EXPORTING it_fieldcatalog = it_fldcat&lt;/P&gt;&lt;P&gt;IMPORTING ep_table = gp_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what ever importing structure we are getting &lt;STRONG&gt;gp_table&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;that we are assignig to field sysmbol &lt;STRONG&gt;gt_table&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You know that field symbol can take any structure dynamically.&lt;/P&gt;&lt;P&gt;here we are assigning workarea to internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: WA TYPE REF TO DATA.&lt;/P&gt;&lt;P&gt;Work area for the dynamic internal table. &lt;/P&gt;&lt;P&gt;CREATE DATA WA LIKE LINE OF &amp;lt;gt_table&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 07:36:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519026#M846398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T07:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table creation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519027#M846399</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;In my case the scnario is a different one.&lt;/P&gt;&lt;P&gt;Let me explain it again. I have table dttab has many fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fields of dttab : f1,f2,f3,f4 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I will get one internal table as itab1 with two fields :name and value. The name field contains the name of fields of dttab. i.e f1, aaa&lt;/P&gt;&lt;P&gt;     f2, bbb&lt;/P&gt;&lt;P&gt;     f3, ccc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I need to create an internal table itab2 of type dttab but dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;itab2-??? = itab1-value ( like 'aaa', 'bbb' etc)&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In place of ??? I need to send f1,f2,f3 etc. But how can I detemine it dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jeetu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 08:05:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-creation/m-p/3519027#M846399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T08:05:08Z</dc:date>
    </item>
  </channel>
</rss>

