<?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 Uploading data from .csv file with dynamic structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705153#M308929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My problem is to upload from a .csv file whose structure is unknown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the clue here is the first row of the file would be of the technical fields names..&lt;/P&gt;&lt;P&gt;I mean &lt;/P&gt;&lt;P&gt;USR01-BNAME,USR01-LANGU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could be the best approach??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read the first row and splitted it and stored in an I_tab...is that of any use?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Nov 2006 13:22:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-17T13:22:00Z</dc:date>
    <item>
      <title>Uploading data from .csv file with dynamic structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705153#M308929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My problem is to upload from a .csv file whose structure is unknown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the clue here is the first row of the file would be of the technical fields names..&lt;/P&gt;&lt;P&gt;I mean &lt;/P&gt;&lt;P&gt;USR01-BNAME,USR01-LANGU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could be the best approach??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read the first row and splitted it and stored in an I_tab...is that of any use?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 13:22:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705153#M308929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T13:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading data from .csv file with dynamic structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705154#M308930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe, that you may use the column names to create some kind of dynamic table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At first, generate a fieldcatalog for your future table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, try to do something like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* 

DATA: new_line TYPE REF TO data.

  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      it_fieldcatalog           = p_it_fieldcatalog
    IMPORTING
      ep_table                  = lt_data
    EXCEPTIONS
      generate_subpool_dir_full = 1
      OTHERS                    = 2.

  IF sy-subrc &amp;lt;&amp;gt; 0.
********
  ENDIF.
 

  ASSIGN lt_data-&amp;gt;* TO &amp;lt;fs_table&amp;gt;.

  IF sy-subrc &amp;lt;&amp;gt; 0.
*****
  ENDIF.




  CREATE DATA new_line LIKE LINE OF &amp;lt;fs_table&amp;gt;.
*****
  ASSIGN new_line-&amp;gt;* TO &amp;lt;fs2&amp;gt;.

  IF sy-subrc &amp;lt;&amp;gt; 0.
***
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 13:34:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705154#M308930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T13:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading data from .csv file with dynamic structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705155#M308931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try ALSM_EXCEL_TO_INTERNAL_TABLE function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this FM will read all the columns n rows of your excel sheet to a internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this internal table contains data in form of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row no   col no   data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now as you mentioned first row contains field names, using these you can create a dynamic table. then populate the data acoordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  award Forum points to useful answers&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 13:49:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705155#M308931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T13:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading data from .csv file with dynamic structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705156#M308932</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;Welcome to SDN first of all !!!&lt;/P&gt;&lt;P&gt;Please do go through the Craig's post in the ABAP General Forum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that your requirement has been discussed before&lt;/P&gt;&lt;P&gt;Please check this thread &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=93720&amp;amp;messageID=1364406" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=93720&amp;amp;messageID=1364406&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do award points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 14:13:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/uploading-data-from-csv-file-with-dynamic-structure/m-p/1705156#M308932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T14:13:43Z</dc:date>
    </item>
  </channel>
</rss>

