<?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 Upload excel to internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919929#M1484097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to upload excel data into internal table, well the excel file layout will be different on each run of the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel file will have 60 columns and 500 record limit. I can upload the excel data using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'KCD_EXCEL_OLE_TO_INT_CONVERT' but the output table is generates 60 lines for each record i.e.., 60 * 500 = 30,000 which could cause performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try with the FM 'TEXT_CONVERT_XLS_TO_SAP', but this will only work if the file structure is static. It didn't work for dynamic file layout. Even GUI_UPLOAD doesn't work to upload excel file, it will work if I convert the file to Tab delimited file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise if you know any alternate procedure to upload excel data into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 May 2010 21:43:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-01T21:43:55Z</dc:date>
    <item>
      <title>Upload excel to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919929#M1484097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to upload excel data into internal table, well the excel file layout will be different on each run of the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel file will have 60 columns and 500 record limit. I can upload the excel data using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'KCD_EXCEL_OLE_TO_INT_CONVERT' but the output table is generates 60 lines for each record i.e.., 60 * 500 = 30,000 which could cause performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try with the FM 'TEXT_CONVERT_XLS_TO_SAP', but this will only work if the file structure is static. It didn't work for dynamic file layout. Even GUI_UPLOAD doesn't work to upload excel file, it will work if I convert the file to Tab delimited file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise if you know any alternate procedure to upload excel data into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 May 2010 21:43:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919929#M1484097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-01T21:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919930#M1484098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can achieve the same with FM :  ALSM_EXCEL_TO_INTERNAL_TABLE .&lt;/P&gt;&lt;P&gt;Pass table/structure  name in the first column and the use this to build the structure in runtime.&lt;/P&gt;&lt;P&gt;By using this you can control the no. of columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 May 2010 06:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919930#M1484098</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2010-05-02T06:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919931#M1484099</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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
   EXPORTING
     FILENAME  = 'C:\Documents and Settings\book1.xls'
     I_BEGIN_COL                   = 1 " Just check by keeping variable here for dynamic purpose
     I_BEGIN_ROW                   = 1
     I_END_COL                     = 3
     I_END_ROW                     = 2
   TABLES
     INTERN                        = t_kna1
  EXCEPTIONS
    INCONSISTENT_PARAMETERS       = 1
    UPLOAD_OLE                    = 2
    OTHERS                        = 3
           .
 IF SY-SUBRC &amp;lt;&amp;gt; 0.
 message 'not open' type 'S'.
 ENDIF.


 loop at t_kna1 into fs_kna1. " Here you have to loop and case it for loading into internal table
 write:/ fs_kna1-row,
         fS_kna1-col,
        fs_kna1-value.
 case w_count.
 when 1.
 fs_cust-kunnr = fs_kna1-value.
 when 2.
 fs_cust-land1 = fs_kna1-value.
 when 3.
 fs_cust-name1 = fs_kna1-value.
 append fs_cust to t_cust.
 w_count = 0.
 endcase.
 w_count = w_count + 1.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and Best wishes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 May 2010 06:43:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919931#M1484099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-02T06:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919932#M1484100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran,&lt;/P&gt;&lt;P&gt;I don't know no. of records in the excel file, but as per requirement if the excel file &amp;gt; 500 then I will raise error in Dynamic ALV report.&lt;/P&gt;&lt;P&gt;When I call the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE', i make it to Begin col = Begin row = 1, and End col = 60 End row = 500.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM loads into internal table in different way, for each column of every row it will append in the internal table. For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will have to  validate 60 columns or less in my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EBELN   EBELP  MENGE MEINS&lt;/P&gt;&lt;P&gt;1000     0010     90         PC&lt;/P&gt;&lt;P&gt;2000     0020     20         PC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output table:           row        col      value&lt;/P&gt;&lt;P&gt;                               1             1         EBELN&lt;/P&gt;&lt;P&gt;                               1             2         EBELP&lt;/P&gt;&lt;P&gt;                               1             3         MENGE&lt;/P&gt;&lt;P&gt;                               1             4         MEINS&lt;/P&gt;&lt;P&gt;                               2             1         1000&lt;/P&gt;&lt;P&gt;                               2             2         10&lt;/P&gt;&lt;P&gt;                               2             3         90&lt;/P&gt;&lt;P&gt;                               2             4         pc&lt;/P&gt;&lt;P&gt;                               3             1         2000&lt;/P&gt;&lt;P&gt;                               3             2         20&lt;/P&gt;&lt;P&gt;                               3             3         20&lt;/P&gt;&lt;P&gt;                               3             4         pc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we need to Loop for 12 times for validating 2 records, i'm looking if any FM can upload as below into internalt table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EBELN   EBELP  MENGE MEINS&lt;/P&gt;&lt;P&gt;1000     0010     90         PC&lt;/P&gt;&lt;P&gt;2000     0020     20         PC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Venu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 May 2010 07:24:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919932#M1484100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-02T07:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Upload excel to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919933#M1484101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI venu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am afraid to say there is no function module, i searched it for the same requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get result like&lt;/P&gt;&lt;P&gt;EBELN EBELP MENGE MEINS&lt;/P&gt;&lt;P&gt;1000 0010 90 PC&lt;/P&gt;&lt;P&gt;2000 0020 20 PC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As mentioned above loop and case should do it. &lt;/P&gt;&lt;P&gt;Append the internal table at 'meins' as it is the last field.&lt;/P&gt;&lt;P&gt;I think we have no option but to  case to get each and every row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is some discussion here check.&lt;/P&gt;&lt;P&gt;Link[Check this|http://sap.ittoolbox.com/groups/technical-functional/sap-abap/how-to-upload-excel-in-to-internal-table-by-using-function-module-alsm_excel_to_internal_table-if-we-dont-know-the-no-of-rows-2322713]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and Best wishes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 May 2010 08:11:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-excel-to-internal-table/m-p/6919933#M1484101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-02T08:11:40Z</dc:date>
    </item>
  </channel>
</rss>

