<?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: Excel Upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462307#M1251344</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;For the Excel file upload you can do like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Type-pools Truxs.

DATA: it_raw TYPE truxs_t_text_data.
*      internal table declared to be passed in the
*      function module used to convert data from xls to sap

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;Function module called to upload xls data into an internal table
*&amp;amp;---------------------------------------------------------------------*
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
      i_field_seperator    = 'X'
      i_line_header        = 'X'
      i_tab_raw_data       = it_raw
      i_filename           = p_file
    TABLES
      i_tab_converted_data = it_upload[]   "internal table into which data
                                                           "will get uploaded having the same 
                                                           "structure of the required fields
    EXCEPTIONS
      conversion_failed    = 1
      OTHERS               = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&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;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2009 11:22:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-15T11:22:38Z</dc:date>
    <item>
      <title>Excel Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462303#M1251340</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;I want to upload an excel from Presentation Server to an internal table for processing the entries.&lt;/P&gt;&lt;P&gt;The file is obtained from a Third Party system and has some entry in the first Row, followed by Column names in the 2nd Row. And the actual column entries starting from the third row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Square D Remittance Discount Check 02/10/09					&lt;/P&gt;&lt;P&gt;Invoice No	                InvAmt	DiscAmt	Amt Paid	CheckNo	Reason code&lt;/P&gt;&lt;P&gt;2504714306	397500	3975	393525	604659	&lt;/P&gt;&lt;P&gt;2567229501	26367	264	26103	604659	DD&lt;/P&gt;&lt;P&gt;2567229502	77160	772	76388	604659	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While uploading the file using CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload,&lt;/P&gt;&lt;P&gt;I am getting the BAD DATA FORMAT exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to handle such an Excel Format in the gui_upload call?&lt;/P&gt;&lt;P&gt;Please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Binu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462303#M1251340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T11:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462304#M1251341</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 using FM  'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462304#M1251341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T11:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462305#M1251342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Binu,.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

use FM 'TEXT_CONVERT_XLS_TO_SAP'

OR

'ALSM_EXCEL_TO_INTERNAL_TABLE'


the above two funcion modules are used to convert excel data into intrernal tables directly..

you can mention the number of rows to ignore.. in the the function module..
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462305#M1251342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T11:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462306#M1251343</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;use FM   ''ALSM_EXCEL_TO_INTERNAL_TABLE"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:17:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462306#M1251343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T11:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462307#M1251344</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;For the Excel file upload you can do like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Type-pools Truxs.

DATA: it_raw TYPE truxs_t_text_data.
*      internal table declared to be passed in the
*      function module used to convert data from xls to sap

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;Function module called to upload xls data into an internal table
*&amp;amp;---------------------------------------------------------------------*
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
      i_field_seperator    = 'X'
      i_line_header        = 'X'
      i_tab_raw_data       = it_raw
      i_filename           = p_file
    TABLES
      i_tab_converted_data = it_upload[]   "internal table into which data
                                                           "will get uploaded having the same 
                                                           "structure of the required fields
    EXCEPTIONS
      conversion_failed    = 1
      OTHERS               = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&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;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462307#M1251344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T11:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462308#M1251345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Please follow the link below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1300417"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:25:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/5462308#M1251345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T11:25:28Z</dc:date>
    </item>
  </channel>
</rss>

