Problem while reading the file from FTP server

Hi Friends,
I have a problem while fetching files from FTP server.
I used FTP_Connect, FTP_COMMAND function modules. I can able to put the files into FTP server.
but I cant able to pick the files from FTP server.
anyone have faced similar issues kindly let me know.
Thanks
Gowrishankar

Hi,
try this way..
for reading the file using FTP you need to use different unix command ..
Prabhuda

Similar Messages

  • Problem  while reading XML file from Aplication server(Al11)

    Hi Experts
    I am facing a problem while  reading XML file from Aplication server  using open data set.
    OPEN DATASET v_dsn IN BINARY MODE FOR INPUT.
    IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      READ DATASET v_dsn INTO v_rec.
    WHILE sy-subrc <> 0.
      ENDWHILE.
      CLOSE DATASET v_dsn.
    The XML file contains the details from an IDOC number  ,  the expected output  is XML file giving  all the segments details in a single page and send the user in lotus note as an attachment, But in the  present  output  after opening the attachment  i am getting a single XML file  which contains most of the segments ,but in the bottom part it is giving  the below error .
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/SHPORD_0080005842.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    for all the xml  its giving the error in bottom part ,  but once we open the source code and  if we saved  in system without changing anything the file giving the xml file without any error in that .
    could any one can help to solve this issue .

    Hi Oliver
    Thanx for your reply.
    see the latest output
    - <E1EDT13 SEGMENT="1">
      <QUALF>003</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/~1922011.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    E1EDT13 with QUALF>003 and  <E1EDT13 SEGMENT="1">
    with   <QUALF>001 having almost same segment data . but  E1EDT13 with QUALF>003  is populating all segment data
    properly ,but E1EDT13 with QUALF>001  is giving in between.

  • Problem while dowloading the file from Application Server

    Dear Experts,
                 I am facing the Problem while downloading the file from Application server.
    We done the automatic function while saving the invoice, this will create an idoc, and this idoc is written in the Application Server.
    I am running the Transaction AL11 and select the record, and from menu --> List, i am downloading into TXT format.
    But for some segments, the length is long, and so the last 3 to 4 fields values are not appearing in the File. Even though i am unable to view the values in the file before downloading. But i can view in IDOC.
    Please help me to solve this issue.
    Thanks & Regards,
    Srini

    but our user will use the Txn. AL11 and they will download from there
    Educate the user On a serious note, tell him this is not how data from app server should be downloaded. You can ask him to talk to the basis team to provide him access to the app server folder where the file is being stored.
    I can set the Variant and put this in background, But always the file name will be change, Like we use Time stamp in the File name.
    You can't automate this process by scheduling in BG mode. This is because the in BG mode you can't dwld the file to presentation server.
    Hope i'm clear.
    BR,
    Suhas

  • Not recognizing # while reading the file from application server

    Hi
    I am reading a file from application server. While reading into internal table with read statement the last field in each record is filling with hash symbol in the last digit. If I write any if condition with HASH symbol its not going inside the if condition, means its not recognizing as hash may be its internally treating as some other. I need to remove the hash from that field. How I can do that.
    Thanks,
    kishore

    I faced exact situation. Yes, internally its treated as some other special character. What i did was, becuase hash symbol was always coming at the end...i created a dummy field in my internal table so that it will not interfere with my actual data. When i see the data in my internal table, the hash always falls in the last field (dummy) which i will ignore. I could not get solution to remove this hash so i adopted this approach and it worked!!
    Hope it helps,
    SKJ

  • How to read the file from ftp server

    Hi
    I need to read a file from a ftp server . Iam using apache lib common-net .jar .
    FTPClient ftp = new FTPClient();
    ftp.connect(server);
    ftp.login(username,password);
    FTPFile[] files = ftp.listFiles();
    for(int i=0 ;i<files.length;i++){
    System.out.println(" File : "+ i + " - " + files);     
    InputStream ip = ftp.retrieveFileStream(path);
    I got the inputstream from the ftp server. but iam not able to read the contents of the file ....
    help me plzzzzz

    Hi
    I have one more problem . first i try to read the file and write the file in local directory . then i try to read the data in the remote file .. iam getting the datas as null.
    InputStream ip = ftp.retrieveFileStream(path);                    
    File f = new File("D:\\ftp.txt");                    
    FileOutputStream fo = new FileOutputStream(f);
    byte[] buf = new byte[1024];
    while ((len = ip.read(buf)) > 0) {                         
    fo.write(buf,0,len);               
    fo.close();
    BufferedReader br = new BufferedReader(new InputStreamReader(ip));
    String line;
    do {
    line = br.readLine();
    System.out.println(" data " +line);
    }while (line != null);

  • 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

  • Error while uploading the file from Allpcation server in LSMW-7th step

    Hi Experts,
    what should be the specific CODE PAGE should be maintained while uploading the file from application server in LSMW-7th Step
    Thanks in advance,
    KSR

    Hi
    I mean that there is any seperate CODE PAGE which comes at the bottom of screen while uploading the file from the application server in 7th step.
    Is there any specific CODE PAGE to be maintained...
    Thanks in advance
    Oarsk

  • Regarding Reading the file from Application Server

    Hi,
    I am trying to read data from Application Server but due to special characters it is getting dumped out.
    US24,Q,Acero (Carbon),AA,0010,0001,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),AA,0010,0002,01,Area rectificada sin da#os ra
    US24,Q,Acero (Carbon),AA,0010,0003,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),CD,0010,0001,01,ITPE Soken para verificacion
    US24,Q,Acero (Carbon),CD,0010,0010,01,No se permite desprendimiento
    US24,Q,Acero (Carbon),CD,0010,0002,01,"Vernier, cinta metrica"#
    In the last line it is going into dump due to special character ".
    Please suggest.
    Thanks
    Priyanka.

    Hi,
    You can check the mode in which you are reading the file
    from application server that is
    Open Dataset in Binary or Text Mode.
    Hope it helps
    Regards
    Mansi

  • 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.

  • System exception while deleting the file from app server in background job

    Hi All,
    I have a issue while the deleting the file from application server.
    I am using the statement DELETE DATASET in my program to delete the file from app server.
    I am able to delete the file from the app server when i run the program from app server.
    When i run the same report from background job i am getting the message called System exception.
    Is there any secuirity which i need to get the issue.
    Thank You,
    Taragini

    Hi All,
    I get all the authorization sto delete the file from application serever.
    Thing is i am able to run the program sucessfully in foreground but not in the background .
    It i snot giving any short dump also just JOB is cancelled with the exception 'Job cancelled after system exception ERROR_MESSAGE'.
    Can anybody please give me suggestion
    Thanks,
    Taragini

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • Error in Reading the file from Application Server

    Hi,
    This Error is regarding one of my interface, the issue is that , the interface reads data from file in bunch suppose 100 records at a time , then processes those records and once finished go for next 100 records .
    Noe the error is that , the process takes place till 500 records correctly but when it went to fetch for next 100 i.e fom 501 to 600 it selects only 501 to 583 .
    this records has been processed successfully but the job finished there only
    but the file contains 788 records
    When the same file has been run in other server it ran successfully without such error .
    Can you please suggest how to resolve the issue

    Hi,
    Try to manually download the file from application server using standard transactions, and than check how many records are you able to download from app. server.
    I guess there might be something wrong with the format of 583rd record, which makes sap assume that the file has come to an end.
    Hope this will help you.
    Regards,
    Vinit...

  • 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

  • Error while downloading PDF file from FTP Server

    Hi Friends,
    I have sent a PDF file with data to FTP , Then i want to check that uploaded pdf file , whether that is correct or not?
    for that , i have downloaded that file from FTP and i am trying to open the file . but it is giving this problem .
    "There was an error opening the document . The file is damaged and could not be repaired."
    will you suggest me regarding this.
    thanks in advance.
    balaji.T.

    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
              EXPORTING
           SRC_SPOOLID                    = spoolno
                src_spoolid                    = wa_file-rqident
                no_dialog                      = ' '
          DST_DEVICE                     =
          PDF_DESTINATION                =
              IMPORTING
                pdf_bytecount                  = numbytes
                pdf_spoolid                    = pdfspoolid
          OTF_PAGECOUNT                  =
                btc_jobname                    = jobname
                btc_jobcount                   = jobcount
              TABLES
                pdf                            = pdf
              EXCEPTIONS
                err_no_otf_spooljob            = 1
                err_no_spooljob                = 2
                err_no_permission              = 3
                err_conv_not_possible          = 4
                err_bad_dstdevice              = 5
                user_cancelled                 = 6
                err_spoolerror                 = 7
                err_temseerror                 = 8
                err_btcjob_open_failed         = 9
                err_btcjob_submit_failed       = 10
                err_btcjob_close_failed        = 11.
    because of this one PDF internal table is obtained.
           OPEN DATASET L_FILENAME  FOR OUTPUT in text mode  MESSAGE MSG.
      LOOP AT pdf.
        CONCATENATE pdf-tdformat       "Material group
                     pdf-TDLINE       "Basic Material
               INTO ITEXT-TLINE ..
        APPEND ITEXT.
        TRANSFER ITEXT TO L_FILENAME.
      ENDLOOP.

  • Pick the  file from FTP Server and place it on the App. Server of R/3

    Hi Guys,
      I had a requirement where i need to pick the file from the FTP Server and place it on the Application Server in R/3. If anybody has an Idea on acheiving this or if anybody has the piece of Code Snippet to acheive the same, Help me out.
    Regards,
    Kittu Chowdary.

    hi kittu,
    chk the demo programs RSFTP00* if they can help u

Maybe you are looking for