<?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: Getting excel file data from different server. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126855#M986793</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;Saving file on application server as CSV and fetchin that file from application server is thr FTP only..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if you are facing problem using  statements you hav used then try the way as i told u..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 07:34:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-30T07:34:38Z</dc:date>
    <item>
      <title>Getting excel file data from different server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126853#M986791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;             I have done one interface program.In that i am getting one text file data by using FTP connections successfully.&lt;/P&gt;&lt;P&gt;FTP_CONNECT&lt;/P&gt;&lt;P&gt;FTP_COMMAND&lt;/P&gt;&lt;P&gt;FTP_CLIENT_TO_R3&lt;/P&gt;&lt;P&gt;FTP_R3_TO_CLIENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my requirement has been changed to get excel file data instead of text file data from the non  sap server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried in same way as getting text file data.but it is going to dump and some times getting some #$## like this in my internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So pls guide me what is the procedure to get excel file data from other server by using FTP connections only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:02:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126853#M986791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T06:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting excel file data from different server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126854#M986792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lokseh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTP is about copying file, opening excel file is another process.&lt;/P&gt;&lt;P&gt;I suggest you to put it into 2 separate process:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, copy file from remote server into local server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, open excel file using ABAP OLE automation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:25:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126854#M986792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting excel file data from different server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126855#M986793</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;Saving file on application server as CSV and fetchin that file from application server is thr FTP only..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if you are facing problem using  statements you hav used then try the way as i told u..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:34:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126855#M986793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting excel file data from different server.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126856#M986794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lokesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe, ABAP did not recognized Excel format, so to make an excel file readable, ABAP must use OLE as an interpreter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the definition in wikipedia for OLE Automation:&lt;/P&gt;&lt;P&gt;&lt;A href="http://en.wikipedia.org/wiki/OLE_Automation" target="test_blank"&gt;http://en.wikipedia.org/wiki/OLE_Automation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is the sample of accessing excel from ABAP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZZBGS700 MESSAGE-ID Z1.
*----------------------------------------------------------------------*
* Topic:       Example: Calling up Microsoft Excel.                    *
*                                                                      *
* Description: Example program that is calling up EXCEL, transfer      *
*              an internal table and returning to R/3.                 *
*                                                                      *
* Implementing The program uses OLE.                                   *
* In R/3 release 3.0x, the command set of ABAP/4 ontepreter has been   *
* increased with keywords that allow access to external objects through*
* OLE2. In SAP the new keywords for OLE2 are:                          *
*                                                                      *
* 1. Create Object                                                     *
* 2. Set Property                                                      *
* 3. Get Property                                                      *
* 4. Call Method                                                       *
* 5. Free Object                                                       *
*                                                                      *
*                                                                      *
* Authoriz.    None.                                                   *
*                                                                      *
* Submitting:  Run by SA38, SE38.                                      *
*                                                                      *
* Parametre:   Excel file path and filename.                           *
*                                                                      *
* Output:      Excel file with data.                                   *
*                                                                      *
* Customizing: Check that EXCEL is registered in R/3 via transaction   *
*              SOLE.                                                   *
*                                                                      *
* Change of    You only need to do the syntax check at releasechange.  *
* release:                                                             *
*                                                                      *
* R/3 Release: Developed and tested in R/3 Release:                    *
*              3.0C                                                    *
*                                                                      *
* Programmer:  Benny G. Soerensen                                      *
* Date:        July 1997.                                              *
*                                                                      *
*------------------------------ Questions -----------------------------*
* Version  1
*-------------------------------Corrections----------------------------*
* Date        Userid     Correction     Text                           *
* ::.::.::::  ::::::::   :::::::::::::: :::::::::::::::::::::::::::::  *
*----------------------------------------------------------------------*
PARAMETERS: XLSFILE(64) TYPE C DEFAULT
            'C:\BGS\SAP\MODUL-BC\OLE\ZZBGS700.XLS'.
TABLES USR03.
DATA: USERS LIKE USR03 OCCURS 100 WITH HEADER LINE
     ,ITEMS TYPE I.

CONSTANTS: OK TYPE I VALUE 0.
INCLUDE OLE2INCL.
DATA: EXCEL     TYPE OLE2_OBJECT,
      WORKBOOK  TYPE OLE2_OBJECT,
      SHEET     TYPE OLE2_OBJECT,
      CELL      TYPE OLE2_OBJECT,
      ROW       TYPE OLE2_OBJECT.

*----------------------------------------------------------------------*
* You find SAP OLE programs under development Class 'SOLE'             *
*                                                                      *
*  MSTAPPL  Table Maintenance APPL                                     *
*  RSOLEDOC Document list                                              *
*  RSOLEIN0 OLE Load Type Information                                  *
*  RSOLEINT Type Info Loaded                                           *
*  RSOLETI0 OLE Object Browser                                         *
*  RSOLETI1 OLE Object Browser                                         *
*  RSOLETI2 OLE Object Browser                                         *
*  RSOLETI3 F4 Help For OLE Objects                                    *
*  RSOLETT1 OLE 2.0 Automation Demo Program                            *
*                                                                      *
* Transactions:                                                        *
* SOLE                                                                 *
* SOLO  - List of OLE applcations with loaded type info                *
*                                                                      *
*                                                                      *
* You will find the decription of possible objects and methods in the  *
* windows help file for excel.                                         *
*----------------------------------------------------------------------*
*  Create an Excel object and start Excel.
   CREATE OBJECT EXCEL 'EXCEL.APPLICATION'.
   IF SY-SUBRC NE OK.
     MESSAGE I000 WITH SY-MSGLI.
   ENDIF.

*  Create an Excel workbook Object.
   CALL METHOD  OF EXCEL 'WORKBOOKS' = WORKBOOK .
*  Put Excel in background
   SET PROPERTY OF EXCEL 'VISIBLE' = 0 .

*  Collect the data to the transfer.
   SELECT * FROM USR03 INTO TABLE USERS.
   DESCRIBE TABLE USERS LINES ITEMS.
   CHECK ITEMS &amp;gt; 0.

*  Put Excel in front.
   SET PROPERTY OF EXCEL 'VISIBLE' = 1 .

*  Transfer the header line to Excel.
   CALL METHOD  OF WORKBOOK  'OPEN'         EXPORTING #1 = XLSFILE.
   CALL METHOD  OF EXCEL     'RANGE' = CELL EXPORTING #1 = 'A1'.
   SET PROPERTY OF CELL      'VALUE' = 'BNAME' .
   CALL METHOD  OF EXCEL     'RANGE' = CELL EXPORTING #1 = 'B1'.
   SET PROPERTY OF CELL      'VALUE' = 'NAME1' .

* Transfer the internal table values to Excel
   LOOP AT USERS.
     CALL METHOD OF EXCEL 'ROWS' = ROW  EXPORTING #1 = '2' .
     CALL METHOD OF ROW 'INSERT' NO FLUSH.
     CALL METHOD OF EXCEL 'RANGE' = CELL NO FLUSH EXPORTING #1 = 'A2' .
     SET PROPERTY OF CELL 'VALUE' = USERS-BNAME NO FLUSH.
     CALL METHOD OF EXCEL 'RANGE' = CELL NO FLUSH EXPORTING #1 = 'B2' .
     SET PROPERTY OF CELL 'VALUE' = USERS-NAME1 NO FLUSH.
   ENDLOOP.
*  release and exit Excel.
   CALL METHOD OF EXCEL 'SAVE'.
   CALL METHOD OF EXCEL 'QUIT'.

*  Free all objects
   FREE OBJECT CELL.
   FREE OBJECT WORKBOOK.
   FREE OBJECT EXCEL.
   EXCEL-HANDLE = -1.
   FREE OBJECT ROW.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it might prove helpful.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Indu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 09:27:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-excel-file-data-from-different-server/m-p/4126856#M986794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T09:27:07Z</dc:date>
    </item>
  </channel>
</rss>

