<?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: Problem reading .xls file from App Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193066#M1201746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Youins &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also faceing the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please put some light on this as u say  u resolved the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now i am doing the from application server to presention server . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then Presention Server to Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want do in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2011 05:25:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-20T05:25:14Z</dc:date>
    <item>
      <title>Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193056#M1201736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this might be a common problem but i searched for similar problem......i did'nt find the solution my problem is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to download .xls(excel file data into an internal table using OPEN DATASET FOR INPUT IN TEXT MODE ENCODING DEFUALT and read dataset for reading it).But in the read dataset syntax all stange values like **$#@&amp;amp;&amp;amp;&amp;amp; are getting uploaded???? I dont now why......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it happing because i'm trying to upload .XLS file ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My coding is as follows...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-batch IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        MESSAGE i001(zz) WITH 'Error opening file for upload'.&lt;/P&gt;&lt;P&gt;        EXIT.&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;        MESSAGE s001(zz) WITH 'Error opening file for upload'.&lt;/P&gt;&lt;P&gt;        EXIT.&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;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*First Uploading the data into structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ DATASET p_file INTO l_wa_tab.   "My internal table work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        APPEND l_wa_tab TO  l_tab.&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;        EXIT.&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;      ADD 1 TO count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any solution for above problem.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 14:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193056#M1201736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-13T14:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193057#M1201737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Is it happing because i'm trying to upload .XLS file ???&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are trying read XLS in text mode , not possible to read xls from app server in text mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to convert the xls file as csv or space tab delimited file then try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 14:39:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193057#M1201737</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-02-13T14:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193058#M1201738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just try to download the data using transaction &lt;STRONG&gt;CG3Y&lt;/STRONG&gt; and see if u r getting the data in excel. If not there is something wrong with file download to application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manually upload excel to app server using tcode &lt;STRONG&gt;CG3Z&lt;/STRONG&gt; and then run ur program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 14:42:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193058#M1201738</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2009-02-13T14:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193059#M1201739</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 whether path ur providing to the open data set stmt is correct or not in debugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* File upload to internal table from UNIX Directory

    IF NOT p_i1file IS INITIAL AND NOT p_path IS INITIAL.

      CONCATENATE p_path p_i1file INTO v_file.
      CONDENSE v_file.

      OPEN DATASET v_file FOR INPUT IN TEXT MODE MESSAGE v_msg.

      IF sy-subrc EQ 0.
        WRITE:  / 'INPUT FILE CONTAINS NO RECORD :'(010), v_file.
        DO.
          CLEAR tbl_input.

          READ DATASET v_file INTO tbl_input.

          IF sy-subrc NE 0.
            EXIT.
          ELSE.

            APPEND tbl_input.

          ENDIF.
        ENDDO.

* Close Input File
        CLOSE DATASET v_file.
      ELSE.
        WRITE:/'Error uploading file: '(008),v_file.
        STOP.
      ENDIF.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should work.check the sy-subrc value and file value in debug mode.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Parvathi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 14:42:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193059#M1201739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-13T14:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193060#M1201740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Younus , &lt;/P&gt;&lt;P&gt;I too have the same code except one change in IF condition ..&lt;/P&gt;&lt;P&gt;but it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OPEN DATASET i_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        DO.&lt;/P&gt;&lt;P&gt;          READ DATASET i_filename INTO gw_record_input-rec.&lt;/P&gt;&lt;P&gt;          IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;            APPEND gw_record_input TO gi_record_input.&lt;/P&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;            EXIT.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;        ENDDO.&lt;/P&gt;&lt;P&gt;        CLOSE DATASET i_filename.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if the above code works in yopur case.&lt;/P&gt;&lt;P&gt;And also change the above file to extension .csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sumit Mittal on Feb 13, 2009 3:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 14:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193060#M1201740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-13T14:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193061#M1201741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple use following T-codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Download/upload file between application server and presentation server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CG3Y - Downloads file - Download file from Application server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CG3Z - Uploads file - Upload file to Application server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope might be useful&lt;/P&gt;&lt;P&gt;Thnks....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 14:47:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193061#M1201741</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2009-02-13T14:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193062#M1201742</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;Thx for the quick response......Do we have any syntax which can does this in SAP like in my case getting the data from .xls file from application server.........without downloading the file from application server to presentation server..........or converting the file into .txt or CVS formatt............Because the end users are kind of lazy guys and want SAP to every thing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 17:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193062#M1201742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-13T17:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193063#M1201743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tried using ALSM_EXCEL_TO_INTERNAL_TABLE? You don´t need to format the .xls file and as far as I know, it works in the application server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yo uare only getting the wird characters because excel files are not just plain text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 17:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193063#M1201743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-13T17:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193064#M1201744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i resolved it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 16:05:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193064#M1201744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T16:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193065#M1201745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Younus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I know how you read the excel file from application server to internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 09:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193065#M1201745</guid>
      <dc:creator>arunkumar_vr</dc:creator>
      <dc:date>2010-08-03T09:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193066#M1201746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Youins &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also faceing the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please put some light on this as u say  u resolved the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now i am doing the from application server to presention server . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then Presention Server to Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want do in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 05:25:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193066#M1201746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T05:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading .xls file from App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193067#M1201747</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;Do the following to read an Excel file into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

TYPE-POOLS: truxs.

DATA: v_file_name       TYPE rlgrap-filename,
            it_type               TYPE truxs_t_text_data.

    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
        i_tab_raw_data       = it_type
        i_filename                = v_file_name
      TABLES
        i_tab_converted_data = itab
      EXCEPTIONS
        conversion_failed    = 1
        OTHERS                   = 2.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table ITAB contains your uploaded data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Danish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 06:18:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-xls-file-from-app-server/m-p/5193067#M1201747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T06:18:09Z</dc:date>
    </item>
  </channel>
</rss>

