Reading Files from an FTP location based on Timestamp

Hi,
I have a requirement of reading files from an FTP location. The files should be read in the order they were saved in the folder. Can someone tell me how to solve this?
Thanks,
Ravi

Hi Arik,
Thanks for your reply. I tried doing what u said, but it isn't working. My requirement is to List the files in the folder using FTP adapter and get the file name with the least file stamp from the FTP adapter and pass the FileName dynamically to another FTP adapter which reads the file based on the FileName. When i tested after including the property (for listing the files) you mentioned, it is giving the following error (copied from flow trace):
<messages>
<input>
<Invoke_getFileListFTP_FileListing_InputVariable>
<part name="Empty" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<empty xmlns="http://xmlns.oracle.com/pcbpel/adapter/ftp/APP_SequentialFileTransfer/PRJ_SequentialFileTransfer/WS_GetFileList_FTP"/>
</part>
</Invoke_getFileListFTP_FileListing_InputVariable>
</input>
<fault>
<bpelFault>
<faultType>0</faultType>
<bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="summary">
<summary>Exception occured when binding was invoked. Exception occured
during invocation of JCA binding: "JCA Binding execute of
Reference operation 'FileListing' failed due to: Exception
occured when binding was invoked. Exception occured during
invocation of JCA binding: "Could not instantiate
InteractionSpec
oracle.tip.adapter.ftp.outbound.FTPListInteractionSpec due
to: Cannot set JCA WSDL Property. Error while setting JCA
WSDL Property. Property setListSorter is not defined for
oracle.tip.adapter.ftp.outbound.FTPListInteractionSpec Please
verify the spelling of the property. ". The invoked JCA
adapter raised a resource exception. Please examine the above
error message carefully to determine a resolution. ". The
invoked JCA adapter raised a resource exception. Please
examine the above error message carefully to determine a
resolution.</summary>
</part>
<part name="detail">
<detail>Cannot set JCA WSDL Property. Error while setting JCA WSDL
Property. Property setListSorter is not defined for
oracle.tip.adapter.ftp.outbound.FTPListInteractionSpec Please
verify the spelling of the property.</detail>
</part>
<part name="code">
<code>null</code>
</part>
</bindingFault>
</bpelFault>
</fault>
<faultType>
<message>0</message>
</faultType>
</messages>
Thanks,
Ravi
Edited by: Ravi Santosh on Apr 24, 2012 11:02 PM

Similar Messages

  • Read file from FTP server (passive mode)

    HI,
    I want to read a file from a ftp server. I can do it by OpenStream() and read the file contents as a stream. But the ftp account is set as "PASSIVE Mode", so how to set it to passive mode and access the file ? Any thoughts?
    Thanks,
    thb.

    Hi,
    Thanks for your speedy response. How to set the PASV parameter, with the InputStream reader. Currently I am reading a file that is active thru. flg. steps.
    InputStream is = new URL("url").openStream();
    BufferedReader in = new BufferedReader(new InputStreamReader(is));
    Then, I am writing the stream contents to a file. So how to set up the PASV parameter?
    Thanks.

  • Oracle read files from FTP Server

    Hi,
    Somebody knowns Oracle how to read files from FTP Server ? Which package I can use?

    Duplicate post
    Oracle read files from FTP Server

  • Delete file from an FTP folder

    Hi expert,
    I wanna know if it's possible delete with abap command a file from a FTP folder.
    I mean, there is a ftp folder periodically filled with excel files. An ABAP program read this folder and the files content must be moved in a SAP Table. Aftre this, I must delete excel files with an abap command write in the same abap program.
    Thanks a lot
    Michele Garofalo

    1) read directory with fm EPS_GET_DIRECTORY_LISTING
    2) process table dir_list
    and 3) finally delete files with
    abap command:  DELETE DATASET dsn.
    hope that helps
    Andreas

  • Extracting .xls file from an FTP site

    Hi there,
    I'm trying to run a DI solution that is extracting a file from a FTP site. DI can see the file but it gives me an error saying that:
    FTP could not transfer file <FTP site/myfile.xls> from host <IP Address>: <>. Please ensure that the FTP relative path for the SAP R/3 working directory is set correctly such that the data file is accessible to the FTP
    Can someone please help with this.
    Thank you.
    Gsecure

    Hi,
    thats SP1 for DS XI 3.2
    I think there is no delta from XI 3.2 to XO 3.2 SP1 what means you have to do a fresh install and upgrade repo.
    But you better doublecheck before but i think there is no delta.
    Regards
    -Seb.

  • Reading file from an external folder.

    Iam tring to read an external file from the C:\ drive. Given below is the code.
    DATA LV_XLS(100) TYPE C.
    DATA LV_CONTENT TYPE XSTRING.
    LV_XLS = 'C:\XML\Report.xls'
    READ DATASET LV_XLS INTO LV_CONTENT.
    But when i execute iam getting an error - FILE NOT FOUND. How do i read file from an external folder. My requirement is to strictly read from an external folder. Please help.
    If this is not possible please advice as to how the file could be moved to the SAP root directory. Iam not able to locate the root.

    hi,
    This is the code to read a excel file from the local system.
    Read data set you are using in your code corresponds to files on application server thats the reason its throwing an error.
    * Parameter variable declaration for browsing the file location       *
    PARAMETERS:
      p_file TYPE ibipparms-path OBLIGATORY.
    data:
    it_text TYPE truxs_t_text_data .
    AT SELECTION-SCREEN  ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
    *   DYNPRO_NUMBER       = SYST-DYNNR
         field_name          = ' '
       IMPORTING
         file_name           = p_file.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
    *   I_FIELD_SEPERATOR          =
    *   I_LINE_HEADER              =
          i_tab_raw_data             = it_text
          i_filename                 = p_file
        TABLES
          i_tab_converted_data       = t_cust
      EXCEPTIONS
        conversion_failed          = 1
        OTHERS                     = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    This is to read a text file from local system.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
        filename                      =  'D:\FILEINTERFACE\file.TXT'
    *    FILETYPE                      = 'ASC'
         has_field_separator           = 'X'
    *    HEADER_LENGTH                 = 0
    *    READ_BY_LINE                  = 'X'
    *    DAT_MODE                      = ' '
    *    CODEPAGE                      = ' '
    *    IGNORE_CERR                   = ABAP_TRUE
    *    REPLACEMENT                   = '#'
    *  IMPORTING
    *    FILELENGTH                    =
    *    HEADER                        =
        TABLES
          data_tab                      = t_kna1
    *  EXCEPTIONS
    *    FILE_OPEN_ERROR               = 1
    *    FILE_READ_ERROR               = 2
    *    NO_BATCH                      = 3
    *    GUI_REFUSE_FILETRANSFER       = 4
    *    INVALID_TYPE                  = 5
    *    NO_AUTHORITY                  = 6
    *    UNKNOWN_ERROR                 = 7
    *    BAD_DATA_FORMAT               = 8
    *    HEADER_NOT_ALLOWED            = 9
    *    SEPARATOR_NOT_ALLOWED         = 10
    *    HEADER_TOO_LONG               = 11
    *    UNKNOWN_DP_ERROR              = 12
    *    ACCESS_DENIED                 = 13
    *    DP_OUT_OF_MEMORY              = 14
    *    DISK_FULL                     = 15
    *    DP_TIMEOUT                    = 16
    *    OTHERS                        = 17
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    PS.  In both of the above mentioned function modules make sure that the file structure is similar to the internal tables used.
    Thanks
    Sharath

  • Why does the new operating system not delete the moved files from their original location - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it

    Why does the new operating system not delete the moved files from their original locations - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it - also, when transferring large amounts of files it becomes a very large problem remembering which files were transferred and which not.

    You're going to need to be more specific, as I'm not quite sure I understand what you're talking about.
    If you're referring to copying from an external hard drive or flash drive, and you want to actually move files rather than copy them, you can hold down the option key to force it to do a "move" rather than a "copy." This is not new behavior, though... the Mac OS has worked this way as long as I can recall (and I've been using it since 1984).
    If you're having a problem with trying to move files from one place to another on a single drive causing them to be copied instead, that is likely because of some permissions issue preventing you from actually being able to move them.

  • Reading files from a mapped drive

    Hello,
    I am trying to pull image files off of a network share in Oracle Forms.
    Everytime I do this, I get error FRM-47109 Cannot locate image file..... i
    have tried accessing this drive with 2 methods:
    1. Button trigger calls with READ_IMAGE_FILE(:datablock.imagelocation ||
    :datablock.filename || '.tif', 'ANY', BLOCK7.IMAGE_ITEM);
    2. Button trigger calls with READ_IMAGE_FILE('\\server\images\'
    ||:CRASH_IMAGES.folder || '\' || :crash_images.docno ||'.tif',
    'ANY', 'BLOCK7.IMAGE_ITEM');
    Both of these calls work on the development side where the T:\ drive is mapped.
    When the form is put on the production server with the same T:\ drive mapping,
    the image is unable to be located.
    I have also found Microsoft article Q122702, which explains how network shares
    are distributed to services. I have edited the registry key
    RestrictNullSessAccess to a value of 0, and remapped the drive using: NET USE
    T: \\server\images /user:Administrator password.
    None of this has worked for me so far, and I have been informed of possible
    issues with forms and mapped network drives. Has anyone seen this before or know of a fix?
    Thanks,
    Jordan

    I'm not too familiar with Windows user accounts.
    I'm having this problem of not being able to read files from a mapped drive.
    Using 10.1.2 Forms Service on a XP machine.
    How do i check to see which user is running the forms service and/or how do I change the settings a user has access to?
    Check in server-info and User/Group: #-1(1)/1, what the heck??
    Thanks.

  • PI sender communication channel not reading files from NFS directory

    Hello,
    I have a sender communication channel configured to read file from NFS directory which is on ECC server. A program in ECC generates the file and puts it on the ECC server in the output directory. PI sender communication channel is supposed to pickup this file and process it. If I give the NFS path as the source directory, I am getting error: Configured source directory '//Server/DIR/OUT' does not exist. I tried putting '
    Server\DIR\OUT' too but same error. Do I have to add the NFS path of ECC into PI as logical path?
    Any suggestions?
    Thanks,
    Sangita

    Hello Sangita,
    Your ECC server is an external system, therefore you need to activate FTP service in that system and use the transport protocol FTP:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    You can use NFS protocol when you have a local directory in XI server.
    Best Regards,
    .Luis Bernal.

  • Error -36 when attempting to copy files from an FTP

    I recently got a new macbook pro, but am having trouble retrieving files from an FTP server I used to use with my old iMac with no problems. Whenever I try to copy the files from the FTP to my computer, I get Error Code -36 about being unable to write the files. I know it's not a problem with the FTP server because I was able to retrieve the files with a computer running Windows. Any idea how to fix this problem? I have it when using CuteFTP as well as the standard Mac FTP access through Finder.

    Try the Unix forum under OS X Technologies. Additionally, use the built in ftp command.

  • HOW TO DELETE ADOBE READER FILE FROM ADOBE READER

    HOW TO DELETE ADOBE READER FILE FROM ADOBE READER@ !@

    Your question make no sense. What exactly are you trying to do?

  • Extract .xls file from an FTP site

    Hi everyone,
    Can anyone assist with this, I'm trying to extract an .xls file from a FTP site. The system I'm currently working on has no SAP application installed, we are using Microsoft SQL server as the target database and there is an FTP site which contains the .xls/.csv files and Data services as a ETL tool.  The error I'm getting is  'FTP could not transfer file </DI_TEST/DATA_TO_IMPORT_1.xls> from host <www.servername.com>: <T>. Please ensure that the FTP relative path for the SAP server working directory is set correctly such that the data file is accessible to the FTP program. Also, ensure that the target path, where the transferred file is written to, is correct.'
    Do I need to have SAP installed to use this functionality?
    Currently to make this work, I wrote a .CMD file to do the GET ftp code and I then call this with a DI script and it works perfectly. Isn't there a way I can do this independant of the .CMD?
    I'm sorry for bring this up again, I know I had a similar thread before. The reason why I closed it is that I did it using .CMD, I would prefer if I can do it with DI without using .CMD.
    Thank all for your help.
    Kind regards,
    Edited by: gsecure on Apr 19, 2010 10:26 AM
    Edited by: gsecure on Apr 21, 2010 11:08 AM

    Hi There,
    I've a similar issue. Can anyone assist with this, I'm trying to extract an .xml file from a FTP site. The system I'm currently working on has no SAP application installed, we are using Microsoft SQL server as the target database and there is an FTP site which contains the .xml files and SAP Data services as a ETL tool.
    Thank you
    Mohan

  • Reading file from a folder : File dir = new File(URL+aFile_to_add);

    Hi,
    Trying to read files from a dir on my site using a JSP and bean. I've tried nearly every option for the filepath I can think of and it doesn't seem to be finding the file...
    Here's the bit:
    String URL = "images\\wedding_photos\\";
    File dir = new File(URL+aFile_to_add);
    String[] files = dir.list();
    It's working locally, but I obviously had to change the path from c://... to the above.
    The full code is listed below in the addWedding Method
    The method removes the .jpg from the file name and then writes the new file name to a database
    Thanks for any insight.
    Regards
    Jim
    public String addWedding(String aFile_to_add)
    String feedback = "unset in scrubWedding";
    try
    String URL = "images\\wedding_photos\\";
    Class.forName("org.gjt.mm.mysql.Driver");
    java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:mysql://localhost/rhwedd2_shop?user=**********&password=*******");
    java.sql.Statement statement = connection.createStatement();
    File dir = new File(URL+aFile_to_add);
    String[] files = dir.list();
    if (files == null)
    feedback = "Sorry, couldn't find the file "+aFile_to_add+"...no files have been added.";
    else
    for (int i=0; i<files.length; i++)
    // Get filename of file or directory
    String filename = files;
    String no_extension;
    //convert string array element into a char array
    char [] charsfilename = filename.toCharArray();
    int newlength = charsfilename.length -4;
    no_extension = String.valueOf(charsfilename,0,newlength);
    filesAdded = filesAdded+", "+no_extension;
    // Show the new file names in stack trace without extension
    //System.out.println("String no_extension " + no_extension );
    statement.executeUpdate("INSERT INTO items VALUES ('"+no_extension+"',5,'"+aFile_to_add+"')");
    // write to table with item_id and weddingid
    feedback = "The following files have been added..."+filesAdded;
    if (statement != null )
    statement.close();
    if ( connection != null )
    connection.close();
    catch(Exception e)
    feedback = "Into the catch";
    e.printStackTrace(System.err) ;
    return feedback;
    }//end addWedding

    String URL = "images\\wedding_photos\\";
    File dir = new File(URL+aFile_to_add); ok, ok, I'll answer...
    1) What gives you the impression that the relative directory "images\\..." exists (or, in other words, what makes you think your current directory is the parent of "images"?

  • Open Data Set Error while trying to read file from non SAP server

    Hi all,
    is it possible to read data from non-SAP application Sever?
    I'm using OPEN DATASET p_filin FOR INPUT IN LEGACY TEXT MODE CODE PAGE '1504',
    Where p_filin is other Windows server.Our applicition server is under Unix.Is it a problem?
    I make test to read file from SAP application server and it was ok.So how to call other server?
    Thanks!

    Hi,
    Yes it is possible to read data from a non SAP server through the statement OPEN DATASET.
    The important thing to check is that the SAP Server got enough access to the non SAP server so it can perform a reading/writing process depending on your needs.
    You should contact your network administrator and BASIS to help you check the permissions. This can be pretty tricky, specially if the servers are in different domains.
    Regards,
    Gilberto Li

  • [Urgent] How to read files from different directories?

    I am new to Java Programming, I would like to know how to read files from directories other than the current one? (example as follows)
    ProjectDirectory
    |--MainDirectory
    |--MainProgram.java
    |--SupplementDirectory
    |--SupplementProgram.java
    |--Pictures
    |--Image.gif
    What should I write in the MainProgram.java so that I can use the supplementProgram.java from MainProgram and read the Image.gif file from the MainProgram.java?
    Thanks

    Run through the I/O tutorial here. It should get you up to speed on this sort of thing...

Maybe you are looking for

  • Please someone help me with this code..

    hi, i have a big problem trying to figure out how to do this, i get this code somewhere in the net, so it's not me who code this, that's why i got this problem. this is a MIDlet games, something like gallaga. i like to add some features like the UP a

  • Error in ABZU transaction

    Hello, I am trying to use ABZU transaction to enter a correction in the depreciation of an asset but when I enter transaction type 711 -"Write-up ordinary book depreciation" it appears the following error: You cannot post write-ups Message no. AA402

  • Some problems with new macbook air

    Hi=) we bought new macbook air today, its nice, however few problems and if someone can help with any of them thanks a lot=) 1, magic mouse first was not scrolling, swiping and only moved/click but now after restarting macbook it doesnt work at all 2

  • AppleTV and Intel My WiFi Technology + Airplay Issues

    I am using a Samsung laptop and iPhone 4S and iPad Generation 3 with my Home Sharing.  All home sharing is turned on and I have WEP 2 Personal security. How to get AppleTV to work with Intel My Wifi Technology? Does bluetooth has any part of the mirr

  • How to instantiate a database control in a session bean (Weblogic 8.1)

    Is it possible to instantiate a database control in a session bean? in a jsp i invoke "WlwProxy.create" method with an HttpServletRequest Object, ther's another "WlwProxy.create" which take an URL object instead of an HttpServletRequest one, i've tri