Loading and exporting files to FTP server

Hi gurus,
I need to import and then export my files to the FTP location. I have my files kept at application server level.
But when I try to import or export any file through BPC Excel, It gives me the path of my desktop only.
So my question is ,
1. Do I need to specify the directory of FTP location somewhere?
2. How to use the package - Import files from FTP. And what should be the URL of file kept at FTP location.
Thanks .
Sanjay

Hi.  In data manager, you should be able to just type or enter the URL for the FTP site manually, for example  ftp://host/documents/   As for aplpliation server, you should be able to simply enter the file path manually, for example 
<appserver>\usr\sap\documents\
Data mananger does not currectly support browsing to the application server, but it will accept the location in the prompt.
Also, keep in mind that the FTP server must be inside your corporate network. This is a limitation of the functions used at the NetWeaver level.
Regards,
Rich Heilman

Similar Messages

  • Downloading and uploading files from ftp server

    Hi everyone,
    I'm developping an web application. I would like to be able to download a file on a ftp server, edit and save it, and then upload it on the same server. How can I program that in JAVA?
    Thx

    Jayt1,
    HOW MANY TIMES ARE YOU GOING TO ASK THIS QUESTION?
    I just answered this question for someone lese yesterday. Someone replied to you before ans duggested you search through the postings before you actually post something. Good advice!
    Matt

  • [HELP] Download file from FTP server

    hi,
    I want to write a java program that can download and upload files from ftp server. Currently I only manage to upload a file to ftp server but i cant download file from ftp server. Here is the source code that only allow user to upload file. Anyone can give me some guidelines so that my program can download and also upload file? thx.
    import java.io.*;
    import java.net.*;
    public class FTPUpload {
    private static final int CTRLPORT = 21;
    private static Socket ctrlSocket;
    private static PrintWriter ctrlOutput;
    private static BufferedReader ctrlInput;
    private static byte[] localHostAddress;
    public final static String DIR = "C:\\zip\\";
    public static void main(String[] args) {
    try {
    String host = "192.168.1.1";
    String loginName = "testuser";
    String password = "password";
    String dirName = "/home/testuser";
    String fileName = "hello.zip";
    ctrlSocket = new Socket(host, CTRLPORT);
    localHostAddress = ctrlSocket.getLocalAddress().getAddress();
    ctrlOutput = new PrintWriter(ctrlSocket.getOutputStream());
    ctrlInput = new BufferedReader(new InputStreamReader(ctrlSocket.getInputStream()));
    ctrlOutput.println("USER " + loginName);
    ctrlOutput.flush();
    ctrlOutput.println("PASS " + password);
    ctrlOutput.flush();
    ctrlOutput.println("CWD " + dirName);
    ctrlOutput.flush();
    ctrlOutput.println("TYPE I");
    ctrlOutput.flush();
    FileInputStream fis = new FileInputStream(DIR + fileName);
    Socket dataSocket = dataConnection("STOR " + fileName);
    OutputStream outstr = dataSocket.getOutputStream();
    int n;
    byte[] buff = new byte[1024];
    while ((n = fis.read(buff)) > 0) {
    outstr.write(buff,0,n);
    dataSocket.close();
    fis.close();
    ctrlOutput.close();
    ctrlInput.close();
    ctrlSocket.close();
    }catch (Exception e) {
    e.printStackTrace();
    private static Socket dataConnection(String ctrlcmd)
    throws IOException,UnknownHostException {
    String cmd = "PORT ";
    ServerSocket serverDataSocket = new ServerSocket(0,1);
    for (int i=0;i<4;i++) {
    cmd = cmd + (localHostAddress[i] & 0xff) + ",";
    cmd = cmd + (((serverDataSocket.getLocalPort())/256) & 0xff)
    + ","
    + (serverDataSocket.getLocalPort() & 0xff);
    ctrlOutput.println(cmd);
    ctrlOutput.flush();
    ctrlOutput.println(ctrlcmd);
    ctrlOutput.flush();
    Socket dataSocket = serverDataSocket.accept();
    serverDataSocket.close();
    return dataSocket;
    }

    Or just use a java.net.URL("ftp://...) ..., get its input stream, and away you go ...

  • Settings and usage of external FTP Server in ECC 6.0

    Dear all,
    I work in ECC 6.0, and I want to configure and use an external FTP Server for upload, download and delete file from FTP Server.
    My questions are:
    1) Which are steps for configure an FTP connection?
    2) How can I read, delete and send a flat file to the FTP Server? Can you send a sample code?
    Thanks in advance for your help.
    Best Regards,
    Giulio

    Please check program RSFTP002  is a good example given by SAP .

  • Need to copy .txt file from FTP server and downloaded on local server directory.

    I need to figure out a way to copy .txt file from ftp server in local server directory using sql jobs.

    Below links will help achieving it:
    https://www.virtualobjectives.com.au/sqlserver/ftp_scripts.htm
    http://www.mssqltips.com/sqlservertip/2884/sql-server-integration-services-ssis-ftp-task-for-data-exchange/

  • No Data in PDF file in FTP server

    Hi All,
    I am trying to place a PDF file in FTP server.
    Used
    CONVERT_OTFSPOOLJOB_2_PDF to convert spool to PDF
    SCMS_TEXT_TO_XSTRING
    FTP_R3_TO_SERVER to transfer data to FTP.
    I am able to see PDF file in FTP and no of pages matches with that of R/3 but there is no data in PDF file.

    To get pdf file , you need to set the itcpo-tdgetotf = 'X' and need to pass in the exporting parameter (options in open_form  function module ).Then in close_form function module take all the data of otfdata table into an internal table . Then use SX_OBJECT_CONVERT_OTF_PDF function module to convert it to pdf.
    I will show with an  example.
    tables itcpo.
    DATA: ch_otf  TYPE  STANDARD  TABLE OF  itcoo.
    DATA: w_otf TYPE itcoo.
    DATA: w_pdf TYPE solisti1. "For PDF
    DATA: i_content_txt TYPE soli_tab.   
    DATA: temp1 TYPE sx_format VALUE 'OTF',
            temp2 TYPE sx_format VALUE 'PDF'.
      DATA: c_printer TYPE sx_devtype VALUE 'PRINTER'.
      DATA: w_transfer_bin TYPE sx_boolean. "Content
      DATA: i_content_bin TYPE solix_tab, "Content
            wa_content_bin TYPE solix,
            i_objhead TYPE soli_tab.
    itcpo-tdnoprint  = 'X'.
      itcpo-tdpreview = 'X'.
      itcpo-tdgetotf = 'X'.
    These three parameters need to be passed along with other required parameters
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING form = xformular
                     language = ekko-spras
                     OPTIONS = itcpo
                     archive_index  = toa_dara
                     archive_params = arc_params
                     device = xdevice
                     dialog = xdialog
                     mail_sender        = sender
                     mail_recipient     = recipient
           EXCEPTIONS canceled = 01.
      CALL FUNCTION 'CLOSE_FORM'
        IMPORTING
          RESULT  = RESULT
        tables
          otfdata = ch_otf.
    LOOP AT ch_otf INTO w_otf.
        CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
        INTO w_pdf.
        APPEND w_pdf TO i_content_txt.
      ENDLOOP.
    converting otf file to pdf file
      CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
        EXPORTING
          format_src      = temp1        "'OTF'
          format_dst      = temp2        "'PDF'
          devtype         = c_printer
        CHANGING
          transfer_bin    = w_transfer_bin
          content_txt     = i_content_txt
          content_bin     = i_content_bin
          objhead         = i_objhead
          len             = v_len_in
        EXCEPTIONS
          err_conv_failed = 1
          OTHERS          = 2.
    Then open dataset and transfer to ftp of the content of table content_bin(i_content_bin) as shown in above example.
    I think this will be helpful for you

  • How to read .xls file from FTP server t oInternal table

    Hi
    am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
    but the data i get in LT_TEXT is special characters.
    CALL FUNCTION 'FTP_SERVER_TO_R3'
    EXPORTING
    handle = hdl
    fname = f_name "ProdDataFromCRM.xls.
    * CHARACTER_MODE = 'X'
    * IMPORTING
    * BLOB_LENGTH =
    TABLES
    BLOB = lt_text
    * TEXT = lt_text
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4
    can any one help me out to get the exact data..
    Really appreciate your quick response..
    Thank You

    Hi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
    CALL METHOD document->open_document_from_table
    of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
    Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
    But, who knows, perhaps you want "And Now For Something Completely Different".
    Regards
    Clemens

  • How to read XL file from FTP server

    Hi all,
    I have a requirement like to read file from FTP server using path
    ftp:
    10.212......\DTR\DTR_ Accounted_Out
    and again save  other file in same location ,
    to doing this RFC connection is required?
    give a  procedure or program to do this requirement ..
    To create rfc for FTP which connection type can i use ?
    Give complete settings to create rfc destination

    Hi Rakhi,
    Use the below code to check if you have received the proper data.
    call function 'FTP_SERVER_TO_R3' "Get data as character instead of BLOB
        exporting
          handle         = hdl
          fname          = docid
          character_mode = 'X'
        tables
          text           = chardata.
    If the data is incorrect, it is possible that you are in the wrong directory.
    Use
    call function 'FTP_COMMAND'
        exporting
          handle        = hdl
          command       = 'cd mydir\mysubdir' "cd <space> your path
        tables
          data          = result
        exceptions
          tcpip_error   = 1
          command_error = 2
          data_error    = 3.
    Regards,
    Jovito.

  • Copy file from FTP server to sap application server

    Hi,
    I am able to copy a particular file from FTP server to sap application server using FTP_CONNECT, FTP_COMMAND and FTP_DISCONNECT. But here my problem is, it copies into default application server path(DIR_HIOME). I want to copy into specified folder in the application server. How can I specify the required destination path.
    Can you please suggest how to achieve this.
    Thanks,
    Shiva Kankanala

    try something like this:
    data: user(30) type c value 'ftpuser', "ftp username
                  pwd(30) type c value 'ftppass', "ftp password
                  host(64) type c value '255.255.255.255', "ftp server IP
                  cmd1(80) type c value 'lcd /dump', "location on app server where you want to copy the file
                  cmd2(80) type c value 'get', "specifies you are going to get the file from ftp server
                  dest like rfcdes-rfcdest value 'SAPFTPA',
                  file(15) type c value 'file.txt'. "specifies file that you want to get from ftp server
    data: hdl type i,
            key type i value 26101957,
            slen type i.
    slen = strlen( pwd ).
    call function 'HTTP_SCRAMBLE'
        EXPORTING
          source      = pwd
          sourcelen   = slen
          key         = key
        IMPORTING
          destination = pwd.
    call function 'FTP_CONNECT'
        EXPORTING
          user            = user
          password        = pwd
          host            = host
          rfc_destination = dest
        IMPORTING
          handle          = hdl.
    call function 'FTP_COMMAND'
        EXPORTING
          handle        = hdl
          command       = cmd1
        TABLES
          data          = result
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      loop at result.
        write at / result-line.
      endloop.
    CONCATENATE cmd2 file INTO cmd2 SEPARATED BY SPACE.
    call function 'FTP_COMMAND'
          EXPORTING
            handle        = hdl
            command       = cmd2
          TABLES
            data          = result
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
        loop at result.
          write at / result-line.
        endloop.
        refresh result.

  • Downloading file from ftp server

    hii
    how do i download the file from ftp server. plz suggest wat are the function modules for tht.. and plz do give the values of the parameters used in the fn modules
    points guranteed:-)

    <i><b>*--> Scramble the password.</b></i>
      CALL FUNCTION 'SCRAMBLE_STRING'
           EXPORTING
                source = password
                key    = 26101957
           IMPORTING
                target = password.
    <i><b>*--> Connect to the FTP server.</b></i>
    <i>*  user is the logon user for the FTP server.
    password is the password you have just scrambled.
    host is the ip address of the FTP server.
    rfc_destination is 'SAPFTPA'.</i>
      CALL FUNCTION 'FTP_CONNECT'
           EXPORTING
                user                = user
                password        = password
                host                = host
                rfc_destination = rfc_destination
           IMPORTING
                handle          = wa_handle
           EXCEPTIONS
                not_connected   = 1
                OTHERS          = 2.
    <i><b>*--> Carry out the command on the FTP server</b></i>
    <i>*  wa_command is the command you wish to carry out on the FTP server (e.g.   
    wa_command = 'ascii' will specify ascii mode).  Result_itab will contain the
    result of your commands.</i>
      CALL FUNCTION 'FTP_COMMAND'
           EXPORTING
                handle           = wa_handle
                command       = wa_command
           TABLES
                data          = result_itab
           EXCEPTIONS
                tcpip_error   = 1
                command_error = 2
                data_error    = 3
                OTHERS        = 4.
    <b>*--> Disconnect from the target host.</b>
      CHECK NOT wa_handle IS INITIAL.
      CALL FUNCTION 'FTP_DISCONNECT'
           EXPORTING
                handle = wa_handle
           EXCEPTIONS
                OTHERS = 1.
    <u><i><b>Hope this helps :)</b></i></u>

  • Convert file format into UTF-8 while generating text file on FTP server

    Hi Expert,
    I have the requirement to generate text file store it in FTP server and file format should be in UTF-8.
    ABAP Development is completed but text file format generate in ANSI which not acceptable by client.For generating text file and store it on FTP server by using standard function module FTP_R3_TO_SERVER ,but in this function module there is no any parameter option like CODEPAGE for file format conversion. Is there any method or any function module to convert file format to UTF-8 and directly transfer or store it on FTP server.
    <<removed_by_moderator>>
    Thanks ,
    Edited by: Vijay Babu Dudla on Jan 28, 2009 12:48 AM

    I have come across the same issue.  Try calling the FTP_COMMAND function module to make it go into ASCII mode before your FTP the file, like this:
    data: result type table of text with header line.
    call function 'FTP_COMMAND'
        exporting
          handle        = hdl
          command       = 'ascii'
        tables
          data          = result
        exceptions
          tcpip_error   = 1
          command_error = 2
          data_error    = 3.
      call function 'FTP_R3_TO_SERVER'
        exporting
          handle         = hdl
          fname          = docid
          character_mode = 'X'
        tables
          text           = gt_your_table .

  • Upload files from FTP server

    Hi Friends,
    We are loading some files from FTP server into the BW (Datasource)
    In the infopackage we have given the setting as 'Load from application server' and have given the file path as it is in application server. No routine has been created.
    Files are successfully loading from FTP server to the BW datasource.
    My question is:
    In the infopackage we have only maintained that it should be loaded from application server and the file path.
    But how the system(infopackage) gets to know that  from which server(FTP) it should pick. Is there any table to maintain these entries. i.e when infopackage is scheduled it only pings the required server and picks the file with the help of given file path.But how does it know which server it should ping.
    Pls help.
    Thanks & Regards,
    Niku

    Hello Niku,
    It seems in your case you have only one FTP, and the system is pointing by default to that FTP and picking the required files fro your Info Package.
    Normally a Standard ABAP Program  RSFTP002 is used to communicate to the FTP Server with the help of RFC . In the Same program you can maintain the credentials ( USerName and password) along with the Source and Destination related properties .
    Back to your query , you can check the same in above program ( RSFTP002 ) through SE38 and cross verify your FTP .
    Hope this helps !
    Regards
    YN

  • Zip files from FTP server using BODS 4.1

    HI Friends,
    My requirement: Move zip files from FTP server to Target server using Data services.
    The zip files( variable) are loaded daily into a directory in an FTP server, I need to establish a connection to the FTP server and get the zip files into BODS Environment. Can anyone please list out the steps to get the connection from FTP to BODS?
    My Environment : BODS 4.1 SP1
    Thanks and Regards
    Anil

    Hi Anil,
    We have done similar kind of requirement
    1. Connect FTP server
    2. call Exec command
    3. write simple script move file to whatever your location
    Please let me know
    FYI.. Let me check if get same ATL for you.
    Regards,
    Manoj.

  • Problem in download file from FTP server

    Hi
    I want to download a file from FTP server for that i am using the apache FTP module but i am not getting how to download a file with that api i can dispaly the list of files and folders but not able to download the file or folder can any one help me in this
    Thanks
    Ninad

    Hi
    I think you miss understood something I am writing a program to download the file in Java where i have used the jakarta.apache api for that and getting problem in that bellow is the code where I have written to print the directory & file names but I don't know how to download the file
    FTPClient ftpConnection = new FTPClient();
    ftpConnection.connect(host);
    ftpConnection.login(FTPConnection.userName,FTPConnection.password);
    FTPFile fileList[] = ftpConnection.listFiles();
    for(int i=0;i<fileList.length;i++)
         System.out.println(fileList.getName());
    thanks
    Ninad

  • Reading a file from ftp server

    Hi
    I am able to put file on ftp server using ftp adapter.But same settings are not working while polling file on ftp.
    Do i need to do some settings for get operation??

    Hi,
    Check the file permissions and for testing give all read/write/execute permissions to the file to be read from FTP. Also check the file modification date of the file.
    Check for the logs at 2 places for any error messages:
    - SOA server diagnostics logs
    - FTP server logs
    You can also enable the FINEST level of Adapter logs for adapters and see for the detailed errors in the diagnostic logs.
    FMW Console > right click soa-infra > Logs > Log Configuration > expand oracle.soa > set Trace32 : FINEST for oracle.soa.adapter
    Regards,
    Neeraj Sehgal

Maybe you are looking for