<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941200#M63194</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;Check this link.May be it can help you.&lt;/P&gt;&lt;P&gt;/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jul 2005 08:58:53 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2005-07-29T08:58:53Z</dc:date>
    <item>
      <title>Dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941199#M63193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;everyone,&lt;/P&gt;&lt;P&gt;I am trying to upload a excel file into internal table, but i can not excpct the max no of columns in excel file ,so i need a dynamic internal table ,as by varying no of columns i could upload file into internal table, there should not be limit of no of colums to be uploaded ,if any one could suggest something i will be greatful.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;san&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2005 08:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941199#M63193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-29T08:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941200#M63194</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;Check this link.May be it can help you.&lt;/P&gt;&lt;P&gt;/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2005 08:58:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941200#M63194</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-07-29T08:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941201#M63195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, the way to create dynamic table, you can reference these link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think, if the structure of target internal table is unclear, you need a dynamic table.&lt;/P&gt;&lt;P&gt;If only the source file column is not clear, and the target internal table defination is fixed, you don't need it.&lt;/P&gt;&lt;P&gt;just read the file into a long char table like this:&lt;/P&gt;&lt;P&gt;TYPES: begin of typ_tmp,&lt;/P&gt;&lt;P&gt;       data(1000)  type c,&lt;/P&gt;&lt;P&gt;       end of typ_tmp.&lt;/P&gt;&lt;P&gt;DATA:  itab_tmp type standard table of typ_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the file read into it, you can do a split or other action to parse it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2005 09:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941201#M63195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-29T09:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941202#M63196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sanjeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this weblog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ravikiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2005 09:05:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941202#M63196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-29T09:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941203#M63197</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 that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) gui_upload csv-file with delimiter ';' into&lt;/P&gt;&lt;P&gt;   internal table (type string)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) cr dynamic structure (rel. 4.6) or itab (4.7)&lt;/P&gt;&lt;P&gt;  CREATE DATA dwa TYPE  (name).&lt;/P&gt;&lt;P&gt;  ASSIGN dwa-&amp;gt;* TO &amp;lt;rec&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) split data :&lt;/P&gt;&lt;P&gt;   SPLIT wa AT trenn INTO TABLE sptab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) loop sptab and fill your structure :&lt;/P&gt;&lt;P&gt;   ASSIGN COMPONENT idx OF STRUCTURE &amp;lt;rec&amp;gt; TO &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2005 09:50:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941203#M63197</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-07-29T09:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941204#M63198</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;here is a sample code to create a dynamic internal table.&lt;/P&gt;&lt;P&gt;hope it gives you some pointers....(plz don't mind the lack of indentation)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: mara, makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_fcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fcat LIKE LINE OF it_fcat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_layout TYPE slis_layout_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_fieldcat TYPE lvc_t_fcat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fieldcat LIKE LINE OF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: new_table TYPE REF TO data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;new_line TYPE REF TO data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ob_cont_alv TYPE REF TO cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ob_alv TYPE REF TO cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vg_campos(255) TYPE c,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_campos LIKE TABLE OF vg_campos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vg_campo(30) TYPE c,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vg_tables(60) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: e_params LIKE zutsvga_alv_01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;l_table&amp;gt; TYPE table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;l_line&amp;gt; TYPE ANY,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;l_field&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_max(2) TYPE n DEFAULT '20' OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fcat-fieldname = 'COL01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fcat-ref_fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fcat-ref_tabname = 'MARA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND is_fcat TO it_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fcat-fieldname = 'COL02'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fcat-ref_fieldname = 'MAKTX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fcat-ref_tabname = 'MAKT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND is_fcat TO it_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_fcat INTO is_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fieldcat-fieldname = is_fcat-fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fieldcat-ref_field = is_fcat-ref_fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is_fieldcat-ref_table = is_fcat-ref_tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND is_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE is_fieldcat-ref_table is_fieldcat-ref_field INTO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vg_campos SEPARATED BY '~'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND vg_campos TO i_campos.&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;*... Create the dynamic internal table&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;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_fieldcatalog = it_fieldcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ep_table = new_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*... Create a new line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN new_table-&amp;gt;* TO &amp;lt;l_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA new_line LIKE LINE OF &amp;lt;l_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN new_line-&amp;gt;* TO &amp;lt;l_line&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT (i_campos) FROM mara INNER JOIN makt ON mara&lt;SUB&gt;matnr = makt&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UP TO P_MAX ROWS INTO TABLE &amp;lt;l_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table &amp;lt;l_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; sy-tfill.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;l_table&amp;gt; INTO &amp;lt;l_line&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_fcat INTO is_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT is_fcat-fieldname OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-tabix = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: /2 &amp;lt;l_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: &amp;lt;l_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&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;ENDLOOP.&lt;/P&gt;&lt;P&gt;&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;PJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2005 09:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table/m-p/941204#M63198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-29T09:55:26Z</dc:date>
    </item>
  </channel>
</rss>

