<?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: Dynamically create columns in internal table and populate it in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927979#M940679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabhu,&lt;/P&gt;&lt;P&gt;     Here it is..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step1.Build an field catelog which should consist of all the fields which u want in internal table.&lt;/P&gt;&lt;P&gt;step2.Call the method &lt;/P&gt;&lt;P&gt;step3.Create work area..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;data: t_fieldcat    TYPE   lvc_t_fcat,&lt;/P&gt;&lt;P&gt;             wa_fieldcat   TYPE   lvc_s_fcat.&lt;/P&gt;&lt;P&gt;wa_fieldcat-tabname               =  'EKKO'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-fieldname             =  'EBELN'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-datatype              =  'CHAR'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-intlen                =  '10'.&lt;/P&gt;&lt;P&gt;    APPEND wa_fieldcat TO t_fieldcat.&lt;/P&gt;&lt;P&gt;    CLEAR : wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_fieldcat-tabname               =  'EKPO'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-fieldname             =  'MATNR'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-datatype              =  'CHAR'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-intlen                =  '18'.&lt;/P&gt;&lt;P&gt;    APPEND wa_fieldcat TO t_fieldcat.&lt;/P&gt;&lt;P&gt;    CLEAR : wa_fieldcat. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Building 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 = t_fieldcat&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ep_table        = dy_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ASSIGN dy_table-&amp;gt;* TO &amp;lt;t_paymord&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Creating work area for dynamic internal table&lt;/P&gt;&lt;P&gt;    CREATE DATA:    dy_line  LIKE LINE OF &amp;lt;t_paymord&amp;gt;.&lt;/P&gt;&lt;P&gt;                     &lt;/P&gt;&lt;P&gt;    ASSIGN:         dy_line-&amp;gt;*  TO &amp;lt;w_paymord&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;t_paymord&amp;gt; INTO &amp;lt;w_paymord&amp;gt;.&lt;/P&gt;&lt;P&gt;&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;Regards,&lt;/P&gt;&lt;P&gt;Vigneswaran S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jun 2008 16:09:21 GMT</pubDate>
    <dc:creator>former_member491305</dc:creator>
    <dc:date>2008-06-03T16:09:21Z</dc:date>
    <item>
      <title>Dynamically create columns in internal table and populate it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927977#M940677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi fellow abapers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create an internal table (dynamically) as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;begin of itab,&lt;/P&gt;&lt;P&gt;material&lt;/P&gt;&lt;P&gt;material description&lt;/P&gt;&lt;P&gt;operation1&lt;/P&gt;&lt;P&gt;machine1&lt;/P&gt;&lt;P&gt;operation2&lt;/P&gt;&lt;P&gt;machine2&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;operation&amp;lt;n&amp;gt;&lt;/P&gt;&lt;P&gt;machine&amp;lt;n&amp;gt;&lt;/P&gt;&lt;P&gt;end of itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this,no. of occurancesof  the fields - OPERATION &amp;amp; MACHINE will vary depending on the material (some may have 5 ,  some have 10 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to create the internal table, populate the values in it and display  in alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; plz help, its urgent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabumanoharan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jun 2008 15:44:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927977#M940677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-03T15:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically create columns in internal table and populate it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927978#M940678</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;chk the sample code here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/dynamic%2binternal%2btable" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/dynamic%2binternal%2btable&lt;/A&gt;&lt;/P&gt;&lt;P&gt;/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jun 2008 15:47:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927978#M940678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-03T15:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically create columns in internal table and populate it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927979#M940679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabhu,&lt;/P&gt;&lt;P&gt;     Here it is..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step1.Build an field catelog which should consist of all the fields which u want in internal table.&lt;/P&gt;&lt;P&gt;step2.Call the method &lt;/P&gt;&lt;P&gt;step3.Create work area..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;data: t_fieldcat    TYPE   lvc_t_fcat,&lt;/P&gt;&lt;P&gt;             wa_fieldcat   TYPE   lvc_s_fcat.&lt;/P&gt;&lt;P&gt;wa_fieldcat-tabname               =  'EKKO'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-fieldname             =  'EBELN'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-datatype              =  'CHAR'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-intlen                =  '10'.&lt;/P&gt;&lt;P&gt;    APPEND wa_fieldcat TO t_fieldcat.&lt;/P&gt;&lt;P&gt;    CLEAR : wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_fieldcat-tabname               =  'EKPO'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-fieldname             =  'MATNR'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-datatype              =  'CHAR'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-intlen                =  '18'.&lt;/P&gt;&lt;P&gt;    APPEND wa_fieldcat TO t_fieldcat.&lt;/P&gt;&lt;P&gt;    CLEAR : wa_fieldcat. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Building 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 = t_fieldcat&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ep_table        = dy_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ASSIGN dy_table-&amp;gt;* TO &amp;lt;t_paymord&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Creating work area for dynamic internal table&lt;/P&gt;&lt;P&gt;    CREATE DATA:    dy_line  LIKE LINE OF &amp;lt;t_paymord&amp;gt;.&lt;/P&gt;&lt;P&gt;                     &lt;/P&gt;&lt;P&gt;    ASSIGN:         dy_line-&amp;gt;*  TO &amp;lt;w_paymord&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;t_paymord&amp;gt; INTO &amp;lt;w_paymord&amp;gt;.&lt;/P&gt;&lt;P&gt;&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;Regards,&lt;/P&gt;&lt;P&gt;Vigneswaran S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jun 2008 16:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927979#M940679</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2008-06-03T16:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically create columns in internal table and populate it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927980#M940680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;closing the thread&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 07:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-create-columns-in-internal-table-and-populate-it/m-p/3927980#M940680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T07:30:54Z</dc:date>
    </item>
  </channel>
</rss>

