<?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: Create a dynamic Table from another table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066004#M1504002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rodolphe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the Dynamic Internal table using the Following method.&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;i_style_table = gc_yes&lt;/P&gt;&lt;P&gt;it_fieldcatalog = it_fieldcatalog&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;ep_table = lr_table&lt;/P&gt;&lt;P&gt;e_style_fname = mv_style_fname."name for style table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jun 2010 08:40:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-28T08:40:45Z</dc:date>
    <item>
      <title>Create a dynamic Table from another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066001#M1503999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table TOTO of 1 column and n lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From TOTO, i want to create a table TITI with following requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number Columns = n lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i proceed ?&lt;/P&gt;&lt;P&gt;Rodolphe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jun 2010 07:29:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066001#M1503999</guid>
      <dc:creator>former_member215107</dc:creator>
      <dc:date>2010-06-28T07:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dynamic Table from another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066002#M1504000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jun 2010 07:33:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066002#M1504000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-28T07:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dynamic Table from another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066003#M1504001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jun 2010 08:36:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066003#M1504001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-28T08:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dynamic Table from another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066004#M1504002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rodolphe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the Dynamic Internal table using the Following method.&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;i_style_table = gc_yes&lt;/P&gt;&lt;P&gt;it_fieldcatalog = it_fieldcatalog&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;ep_table = lr_table&lt;/P&gt;&lt;P&gt;e_style_fname = mv_style_fname."name for style table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jun 2010 08:40:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066004#M1504002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-28T08:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dynamic Table from another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066005#M1504003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes UmaDave ... strange...&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jun 2010 08:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066005#M1504003</guid>
      <dc:creator>former_member215107</dc:creator>
      <dc:date>2010-06-28T08:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dynamic Table from another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066006#M1504004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are not getting deleted automatically!&lt;/P&gt;&lt;P&gt;They are being deleted by the moderators because you are violating the rules of this forum. This is the right time for you to read the rules to avoid getting your id deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jun 2010 09:05:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066006#M1504004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-28T09:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dynamic Table from another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066007#M1504005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rodolphe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using cl_alv_table_create=&amp;gt;create_dynamic_table may raise exception generate_subpool_dir_full after 36 times (memory issue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_toto,
        col TYPE i,
       END OF ty_toto.

DATA it_toto     TYPE TABLE OF ty_toto.
DATA wa_toto     TYPE          ty_toto.
DATA v_lines     TYPE          i.

DATA dref        TYPE REF TO   data.
DATA struct_type TYPE REF TO   cl_abap_structdescr.
DATA comp_tab    TYPE          cl_abap_structdescr=&amp;gt;component_table.
DATA comp        LIKE LINE OF  comp_tab.

DATA v_col_name  TYPE string.

FIELD-SYMBOLS: &amp;lt;titi&amp;gt; TYPE ANY.

* Create table content
DO 10 TIMES.
  wa_toto-col = sy-index.
  APPEND wa_toto TO it_toto.
ENDDO.

DESCRIBE TABLE it_toto LINES v_lines.

* Define structure
DO v_lines TIMES.
  v_col_name = sy-index.
  CONCATENATE 'COL_LINE_' v_col_name INTO v_col_name.
  CONDENSE v_col_name NO-GAPS.
  comp-name = v_col_name.
  comp-type = cl_abap_elemdescr=&amp;gt;get_i( ).
  APPEND comp TO comp_tab.
ENDDO.

* Create Table
struct_type = cl_abap_structdescr=&amp;gt;create( comp_tab ).
CREATE DATA dref TYPE HANDLE struct_type.

* Assign table
ASSIGN dref-&amp;gt;* TO &amp;lt;titi&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;rea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jun 2010 09:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-dynamic-table-from-another-table/m-p/7066007#M1504005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-28T09:50:14Z</dc:date>
    </item>
  </channel>
</rss>

