FTP_R3_TO_CLIENT

Hello
I use the FM FTP_R3_TO_CLIENT to send data to a server.
It works fine - except:
in the output-file is after each line a emtpy line.
What I can do to avoid this?
Thanks for any help
Daniel

Hi Jack
Thanks for your answer.
Yes, the dataline is defined as TEXT. (C LENGTH 3000)
What do you mean with "remove the carriage return from input file"'
I fill the internal table LT_TEXT with APPEND
and then I call the FM.
Where this carriage return comes from?
Thanks for you help
Daniel

Similar Messages

  • How to use FM 'FTP_R3_TO_CLIENT'?

    hi everybody.
        I wanna transfer document of R3 to FTP Server via  FM 'FTP_R3_TO_CLIENT' and the document is '.txt' which include many lines.But done with transfer ,i open the docu. in FTP Server and find only one line in it  and it is show of focus much lines on one line.I expect to show as originally form.
    pls do let me know if you have solution to it.
    Thanks.

    Hi,
       Thank you for your help.This problem has resolved.
       CALL FUNCTION 'FTP_R3_TO_CLIENT'
                EXPORTING
                  fname           = filename
                  rfc_destination = dest
                  character_mode  = 'X'
                TABLES
                  text            = data.

  • Data to be fetched from legacy system to SAP and doc needs to bee posted

    Hi Experts,
    I have a requirement where my client is using some application in Legacy system(Fuel Software) which receives fuel(Petrol, Deasel, CNG) in system and issue the same to company owned vehicles and wants that sap should be integrated and document also needs to be posted in sap for all the receivings and isssuences against their vehicles.
    Process Designed is:
    1. Required Data file will be picked from legacy system with some date stamp and will be placed in sap directory.
    2. There will be batch job which will check for new file based on date stamp.
    3. Will pick record n will pass to Goods_mvt_create bapi and then will post the document.
    4. We have created Vehicles as Internal orders in sap and whenever any issue will be there internal order no will be captured.
    5. By this way we are receiving and issuing in sap.
    Now my problem is i am stuck in designing step 1 and rest 2,3,4,5 steps have already been designed and working fine. Need your help in step 1. Else you may suggest some better way-out but again want to mention rest steps are already mapped
    Thanks in advance..

    Hi Ashutosh,
    You can use functions:
    FTP_CLIENT_TO_R3
    FTP_COMMAND
    FTP_COMMAND_LIST
    FTP_CONNECT
    FTP_COPY
    FTP_DISCONNECT
    FTP_R3_TO_CLIENT
    FTP_R3_TO_SERVER
    FTP_SERVER_TO_R3
    FTP_START_REG_SERVER
    FTP_START_SAPFTP
    FTP_STOP_REG_SERVER
    FTP_VERSION
    which allow you to connect from SAP ERP to any FTP server (if the legacy has it). You can validate the sample program RSFTP007.
    Regards,
    Juan

  • Uploading a text file to FTP Loc

    Hi,
    Please guide me in the following query:
    While uploading a text file to FTP Loc by using FM 'FTP_R3_TO_CLIENT', all the data is coming in one line. Please guide me how can i insert the new line character after the end of each line.
    Please guide.
    Thanks and Regards

    Hi,
    When i make the character_mode = 'X', then no data is getting uploaded to FTP Loc, only a blank file is being created. Please guide.
    Thanks and Regards
    Edited by: MP Vashishth on Jan 12, 2010 10:34 AM

  • Problem with transferring of data to non sap

    Hi all,
             I am doing program of creating excise invoice details and those are transfering to non sap.and I am successfully passing text file to that non sap by using FTP connection.
    like FTP_CONNECT
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    FTP_DISCONNECT
    But text file details are coming like this
    means even line items are all displaying in one row.means continously all line items are coming just like this.
    0001000264,070914,,,1000,Steel (pune) Plant,
    Retail Outlet 1,0001000265,070914,,,1000,Steel (hyderabad) Plant,Retail Outlet 1
    Actually here problem is text file data is continously coming with ','
    means actually those values has to come as
             0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
            0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
    How to split those records when sending the text file.
    This is very big issue.I am unable to complete this issue.
    Please if any one knows the solution please guide me.
    please help me.
    Thanks & Regards,
    J.Goud

    Hi all,
                My problem was solved.But I have used GUI_DOWNLOAD.
        But i want to place the file name with increasing order number.
    Just like suppose 1st i am placing file name as  PO000051.txt
    next time the file name has to be placed with increasing order like PO000052.txt
    I am generating the number in my program actually i am using like this.If i keep file name as
    190.0.18.65\qdls\ITGSAP_P\PO000052.txt means only it will place only that file how to increment that number. i am not getting.
    If i am keeping
    190.0.18.65\qdls\ITGSAP_P\g_file   like this means file is not placing.
    pls help me if any one knows solution.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
              BIN_FILESIZE        = ' '
              CODEPAGE            = ' '
                FILENAME            = '
    190.0.18.65\qdls\ITGSAP_P\g_file'
              FILETYPE            = ' '
              MODE                = ' '
              WK1_N_FORMAT        = ' '
              WK1_N_SIZE          = ' '
              WK1_T_FORMAT        = ' '
              WK1_T_SIZE          = ' '
              COL_SELECT          = ' '
              COL_SELECTMASK      = ' '
          importing
               filelength          =
           TABLES
                DATA_TAB            = ist_file
              FIELDNAMES          =
           EXCEPTIONS
                FILE_OPEN_ERROR     = 1
                FILE_WRITE_ERROR    = 2
                INVALID_FILESIZE    = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                OTHERS              = 8.
    regards,
    J.Goud

  • Re: Problem with transferring of data to non sap by using FTP funtion modul

    Hi all,
             I am doing program of creating excise invoice details and those are transfering to non sap.and I am successfully passing text file to that non sap by using FTP connection.
    like FTP_CONNECT
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    FTP_DISCONNECT
    But text file details are coming like this
    means even line items are all displaying in one row.means continously all line items are coming just like this.
    0001000264,070914,,,1000,Steel (pune) Plant,
    Retail Outlet 1,0001000265,070914,,,1000,Steel (hyderabad) Plant,Retail Outlet 1
    Actually here problem is text file data is continously coming with ','
    means actually those values has to come as
             0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
            0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
    How to split those records when sending the text file.
    This is very big issue.I am unable to complete this issue.
    Please if any one knows the solution please guide me.
    please help me.
    Thanks & Regards,
    J.Goud

    Hi all,
             I am doing program of creating excise invoice details and those are transfering to non sap.and I am successfully passing text file to that non sap by using FTP connection.
    like FTP_CONNECT
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    FTP_DISCONNECT
    But text file details are coming like this
    means even line items are all displaying in one row.means continously all line items are coming just like this.
    0001000264,070914,,,1000,Steel (pune) Plant,
    Retail Outlet 1,0001000265,070914,,,1000,Steel (hyderabad) Plant,Retail Outlet 1
    Actually here problem is text file data is continously coming with ','
    means actually those values has to come as
             0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
            0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
    How to split those records when sending the text file.
    This is very big issue.I am unable to complete this issue.
    Please if any one knows the solution please guide me.
    please help me.
    Thanks & Regards,
    J.Goud

  • Problem with transferring of data to non sap by using FTP funtion modul

    Hi all,
             I am doing program of creating excise invoice details and those are transfering to non sap.and I am successfully passing text file to that non sap by using FTP connection.
    like FTP_CONNECT
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    FTP_DISCONNECT
    But text file details are coming like this
    means even line items are all displaying in one row.means continously all line items are coming just like this.
    0001000264,070914,,,1000,Steel (pune) Plant,
    Retail Outlet 1,0001000265,070914,,,1000,Steel (hyderabad) Plant,Retail Outlet 1
    Actually here problem is text file data is continously coming with ','
    means actually those values has to come as
             0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
            0001000264,070914,,,1000,ESSAR Steel (Hazira) Plant,Retail Outlet 1
    How to split those records when sending the text file.
    This is very big issue.I am unable to complete this issue.
    Please if any one knows the solution please guide me.
    please help me.
    Thanks & Regards,
    J.Goud

    Hi,
         Thanks for reply.
    Hi all,
                My problem was solved.But I have used GUI_DOWNLOAD.
        But i want to place the file name with increasing order number.
    Just like suppose 1st i am placing file name as  PO000051.txt
    next time the file name has to be placed with increasing order like PO000052.txt
    I am generating the number in my program actually i am using like this.If i keep file name as
    190.0.18.65\qdls\ITGSAP_P\PO000052.txt means only it will place only that file how to increment that number. i am not getting.
    If i am keeping
    190.0.18.65\qdls\ITGSAP_P\g_file   like this means file is not placing.
    pls help me if any one knows solution.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
              BIN_FILESIZE        = ' '
              CODEPAGE            = ' '
                FILENAME            = '
    190.0.18.65\qdls\ITGSAP_P\g_file'
              FILETYPE            = ' '
              MODE                = ' '
              WK1_N_FORMAT        = ' '
              WK1_N_SIZE          = ' '
              WK1_T_FORMAT        = ' '
              WK1_T_SIZE          = ' '
              COL_SELECT          = ' '
              COL_SELECTMASK      = ' '
          importing
               filelength          =
           TABLES
                DATA_TAB            = ist_file
              FIELDNAMES          =
           EXCEPTIONS
                FILE_OPEN_ERROR     = 1
                FILE_WRITE_ERROR    = 2
                INVALID_FILESIZE    = 3
                INVALID_TABLE_WIDTH = 4
                INVALID_TYPE        = 5
                NO_BATCH            = 6
                UNKNOWN_ERROR       = 7
                OTHERS              = 8.
    Regards,
    j.Goud

  • FM????? Text file to Internal table in Background

    Hi,
    I need to execute my prog in background and as per my req i need to dwnload a file from prsentation server to internal table for processing. I'm not sure whch FM to use to dwnload from text file to internal table. I cannot use GUI_UPLOAD FM for background runs.....pls help
    Thanks in advance

    Chesat,
    You can not work for this requirement.You will have an idea on it.
    Introduction
    The use of FTP from ABAP seems to have been a hot topic on the ABAP Forums of late. I thought I might sit down and document whatever I could find on this subject and share it as a weblog.
    Over the years I have seen lots of different solutions for moving files on and off of a SAP system. I have seen external FTP scripts written in OS shell languages. I have seen full blown custom applications that are made to interface to the SAP system. However I think you will find that most of the technology you need to perform a simple FTP from ABAP is already contained in the standard system. All of my examples and screen shots will be coming from a 46C system.
    SAP's Solution
    If you have ever taken a look at the kernel directory of your SAP system, you might have noticed an interesting little executable: sapftp.exe (the name of the file on Windows SAP Kernels). It is this part of the Kernel that exposes FTP functionality to the ABAP Programming language.
    So you have a suspicion that there is FTP functionality in ABAP, but you’re not quite sure how to use it. Where do you start? I always turn to the Service Marketplace first. A quick search on SAPFTP reveals there is an entire component (BC-SRV-COM-FTP) on the subject. The most general note and our starting place is OSS Note 93042. This note starts off with a nice description of what SAPFTP is: A client RFC application that is accessed via RFC from ABAP. But we also find out that in addition to SAPFTP being part of the kernel, it is also part of the SAPGui. That means that we can perform FTP commands originating from our R/3 Server or from a Client Workstation.
    Well if this solution is accessed via RFC, then we must have to setup some RFC destinations. In fact we have two that we need; SAPFTP for Front-end FTP and SAPFTPA for access on the application server. Luckily we don't even have to mess with setting these RFC destinations up in SM59. SAP has supplied a program, RSFTP005, to generate the destinations for us.
    Now before we go off and start written code on our own to hit these FTP functions, why don't we make sure everything is setup and working. Once again SAP has helped us out by providing us with a test program, RSFTP002. (In case you are wondering the FTP functionality and many other test programs are all contained in SAP Development Class SFTP). When we run this test, we get a set input parameters for the server, username password, etc. We want to start out simple and just make sure we are getting a connection. Therefore we will just execute the pwd command (Print Working Directory).
    Your answer back should look something like this:
    If you are wanting to see a list of FTP commands, try using the command HELP in place of PWD:
    If something did go wrong during the test, I suggest that you active the trace option in SM59 for the FTP Destination. You can then use program RSFTP001 to display the current trace file.
    Programming the FTP
    Not only does the RSFTP002 program give us a test environment, but it also provides us with a programming example. We can see that the FTP functionality is really provided by a set of function modules all within the SFTP Function Group. We have the basic commands such as FTP_CONNECT, FTP_COMMAND, and FTP_DISCONNECT that can be strung together to create a complete file operation action. The FTP_COMMAND Function allows you to issue arbitrary FTP commands as long as the SAPFTP function, the Host, and the Destination server all support the command. Then you have the specialized functions such as FTP_R3_TO_SERVER, FTP_R3_TO_CLIENT, and FTP_CLIENT_TO_R3. This lets you take some data in memory and transfer it someplace else. This has the advantage of not having to write the data to the file system first and not to have to issue any FTP commands. However these functions are also limited to the scope described.
    If you are already familiar with FTP in general, working with these function modules should not seem to difficult. The Connect, Command, Disconnect actions would seem somewhat self explanatory. So instead of looking at the entire program in detail let's focus on two things that may be unfamiliar. First the program starts off with an ABAP Kernel System call to AB_RFC_X_SCRAMBLE_STRING. Well we don't want to pass a potentially sensitive password openly. Therefore the FTP_CONNECT function module requires that the password be encrypted before it receives it. It is this System call that performs that one-way encryption. Now I checked a 620 SP42 system and in this example, SAP has replace the AB_RFC_X_SCRAMBLE_STRING with a function call to HTTP_SCRAMBLE. Unfortunately HTTP_SCRAMBLE doesn't even exist in my 46C system. The only other thing that I wanted to point out about these function calls is the exporting parameter on the FTP_CONNECT. It passes back a parameter called handle. This handle then becomes an importing parameter to all subsequent calls: FTP_COMMAND and FTP_CLOSE. This handle is the pointer to the instance of FTP that we started with the FTP_CONNECT. This assures that we get reconnected to the same FTP session with each command we issue.
    FTP Development
    I thought I would share a few of the things that can be built using this FTP functionality. First off I didn't want a bunch of ABAP programs directly working with the SAP FTP Function modules. As you can see there is already a difference in the examples for encrypting the password between 46C and 620. Therefore I thought it would be best to encapsulate all the FTP function in one custom ABAP OO Class. Not only did I get the opportunity to hid the inner SAP functionality and make it easy to switch out during upgrades, but I also get consistent error handling as well. I accept the User Name, Password, Host, and RFC Destination in during the Constructor of the class. I then store these values away in Protected Attributes. Each function module is then implemented as a Instance Method. The Password encryption functionality is then all tucked away nicely in the class. Also the calling program doesn't have to worry about keeping track of the FTP handle either since it is an instance attribute as well.
    Next I got really carried away. I wanted a way to record entire FTP scripts that could be filled with values at runtime and ran as a step in a background job. My company used to have many interfaces that ran frequently sending files all over the place. We needed a mechanism to monitor and support these file moves. This was really the root of this tool, but it also gives you an idea of how powerful these functions can be.
    Closing
    I hope that anyone interested in FTP from ABAP will find this resource useful. If anyone has any other resources that should be included here, feel free to post them.
    Thomas Jung is an Application Developer for Kimball Electronics Group (www.kegroup.com) and a huge fan of ABAP.
    Comment on this weblog
    Showing messages 1 through 7 of 7.
    Titles Only
    Main Topics
    Oldest First
         New to SAP/ABAP-4
    2005-02-24 13:03:06 Thomas Godfrey Business Card [Reply]
    I've been in IT for over 30 years as a mainframe contract programmer/analyst. Recently a company hired me for my legacy knowledge of there business to become a developer on SAP for these same systems.
    My first task is to develop a generalized ftp application to send data to the mainframe and then on to financial institutions. I have created an ABAP/4 test program with literals for the dest/host etc. And it works fine. I need more detail/guidance in creating the Class/Method/Function you have described to make this parameter driven and callable by other programs. I know this is a lot to ask, any help in pointing me in the right direction would be greatly appreciated. When I mention class creation to the existing staff they all say "Oh, we don't use or know anything about that object oriented stuff, we just right programs."
    Thanks,
    Tom
         New to SAP/ABAP-4
    2005-02-24 13:13:33 Thomas Jung Business Card [Reply]
    "we don't use or know anything about that object oriented stuff" That's something I might have expected to hear 4 years ago. That's kind of like saying that you only want to use half of the programming lanuage (the old half at that).
    However it is true that you have to learn to walk before you run. There are some fundamentals to ABAP that are usefull to have down before you start in with ABAP OO. But I wouldn't let that hold you back for long.
    I'm afraid that I wouldn't be able to teach you everything you would need to know to create a function module or a class in this posting. There was a nice weblog that was just posted the other day that had the steps to create your first simple class. I suggest you start there.
    As far as my FTP class goes, I don't mind sending you the code for the class. My email address is already all over SDN (and spammers' lists) so just send me the address that you want the details sent to. My email is [email protected].
         New to SAP/ABAP-4
    2005-02-24 13:05:42 Thomas Godfrey Business Card [Reply]
    I just read what I typed, I meant "write programs" not "right programs" ... duh
         Good suggestions - now...
    2004-11-24 09:15:27 Jacques Claassen Business Card [Reply]
    ...any chance you've used FTP via an HTTP proxy?
    Any help using the HTTP* functions in the ZFTP function group will be greatly appreciated. Any one?
    Thx
         Good suggestions - now...
    2004-11-24 09:59:11 Thomas Jung Business Card [Reply]
    I'm afraid I haven't done either. However I have used the HTTP client functionality in the WebAS 620 (if_http_client) along with an HTTP proxy. I have an example of this in another weblog.
         Pretty insightful
    2004-11-15 19:27:26 Subramanian Venkateswaran Business Card [Reply]
    Thanks for this weblog, and I can be pretty sure there are some(many) more weblogs in the waiting.
    Regards,
    Subramanian V.
         I have been using a local include ...
    2004-11-15 16:29:39 Swapan Sarkar Business Card [Reply]
    On the other hand I have been using a local include of ZCL_FTP_BASE in my programs for some time. Here's the signature:
    <quote>
    *& Include ZHR9_FTP_CLASSES
    *& Utility class ZCL_FTP_BASE having all the
    functions to upload and download files from an
    FTP server.
    CLASS zcl_ftp_base DEFINITION.
    PUBLIC SECTION.
    Output file type
    TYPES: BEGIN OF t_scratch,
    data(1024) TYPE c,
    END OF t_scratch,
    t_str_tab TYPE STANDARD TABLE OF t_scratch.
    CONSTANTS: co_crlf(2) TYPE x VALUE '0D0A'.
    DATA: status TYPE c VALUE space.
    METHODS: constructor IMPORTING im_user TYPE string im_pwd TYPE string
    im_server TYPE string,
    send_table_data IMPORTING im_file TYPE string
    im_table TYPE t_str_tab,
    get_table_data IMPORTING im_file TYPE string
    EXPORTING ex_table TYPE t_str_tab,
    send_string_data IMPORTING im_file TYPE string
    im_string TYPE string,
    get_string_data IMPORTING im_file TYPE string
    EXPORTING ex_string TYPE string,
    disconnect.
    PRIVATE SECTION.
    DATA: v_user(64) TYPE c,
    v_pwd_clear(30) TYPE c,
    v_pwd(64) TYPE c,
    v_server(30) TYPE c,
    v_filename TYPE rlgrap-filename,
    v_handle TYPE i.
    METHODS: pwd_scramble IMPORTING im_pwd TYPE c.
    ENDCLASS. "ZCL_FTP_BASE DEFINITION
    </quote>
    Showing messages 1 through 7 of 7.
    Pls. mark if this doc. is useful

  • File is placing in Non-sap system problem

    Hi all,
    I am placing file in different IP address 150.150.120.123 successfully by using FMs
    HTTP_SCRAMBLE
    FTP_CONNECT
    FTP_COMMAND
    FTP_COMMAND
    FTP_R3_TO_CLIENT
    But i am getting problem of all are not coming line by line.
    the file is placing but records are all line items placing continuously continuation with ','. Actually i have to get file records like this
    0001000265,070914,,,1000,16.0000,67322.00,2.0000,1346.00,HRCF
    0001000267,070914,,,1000,16.0000,67322.00,2.0000,3446.00,HRSCF
    0001000278,070916,,,1000,16.0000,67322.00,2.0000,4546.00,HRPO
    But i am getting now file records as
    0001000265,070914,,,1000,16.0000,67322.00,2.0000,1346.00,HRCF,0001000267,070914,,,1000,16.0000,67322.00,2.0000,3446.00,HRSCF,0001000278,070916,,,1000,16.0000,67322.00,2.0000,4546.00,HRPO
    Just like coming records continuing with ','.
    DATA: v_aux(4) TYPE c, v_cr TYPE c.
    v_aux = cl_abap_char_utilities=>newline.
    v_cr  = v_aux+1(1).
    I am using this V_cr when concatenating those fields then also i am getting problem.
    I need to place all records items wise.
    But i am getting now as all items are continuing with ','
    Pls if any one knows solution how to get records item wise without continuation all records with ','.
    Pls help me
    Regards,
    J.Lokesh

    Try using CR_LF instead of NEWLINE. Also I think that "end of line" character may also be affected by the FTP settings (not related to SAP). I vaguely remember having somewhat similar issue with FTP and mainframe. The file looked fine when downloaded to PC but mainframe "saw" only one long line.
    Also take a look at the parameters in the FMs that you've mentioned, maybe there is something about the file type or end-of-line.

  • FTP_COMMAND in order to get files list at FTP address

    Hi all.
    I want to get a list of files exist at a specific FTP address.
    For that I'm using FTP_CONNECT (OK) and after I want to execute FTP_COMMAND with parameter command = 'ls' in order to recievce the files list in output table data[].
    I keep on getting an exception 3 (data_error).
    Anyone can help please ?
    Thanks,
    Rebeka

    Hello,
    I know by experience the ABAP programmers learn most based on examples.
    In every SAP system you have the following FTP example programs, analyze the source code and check how function modules like FTP_CONNECT and FTP_COMMAND work :
    RSFTP002                         Execute FTP Command
    RSFTP003                         FTP put / get Test
    RSFTP004                         FTP Copy
    RSFTP007                         Test FB:FTP_SERVER_TO_R3 / FTP_R3_TO_SERVER
    RSFTP008                         Test FB:FTP_CLIENT_TO_R3 / FTP_R3_TO_CLIENT
    RSFTP009                         Test FTP put with Verify
    RSFTP011                         FTP Copy
    Success.
    Wim

  • LKM SAP ERP to Oracle (SQLLDR) - ERROR!!!

    Hi ,
    I have error on the step Extract Data with this error
    oracle.odi.sdk.opentools.OpenToolExecutionException: Error occured in open tool execute methodError in executing ABAP programUnable to connect FTP. Check ABAP program
         at oracle.odi.sap.km._OdiSapAbapExecute.execute(_OdiSapAbapExecute.java:466)
         at com.sunopsis.dwg.function.SnpsOpenToolFunction.actionExecute(SnpsOpenToolFunction.java)
         at com.sunopsis.dwg.function.SnpsOpenToolFunction.execute(SnpsOpenToolFunction.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.j(e.java)
         at com.sunopsis.dwg.cmd.g.z(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:619)
    and the description of ABAB code is ( cut from the whole ABAB code to show you the part of FTP Coding on ABAB language)
    CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
    user = 'odiadmin'
    password = 'odiadmin'
    host = '10.8.61.200'
    rfc_destination = 'SAPFTPA'
    IMPORTING
    handle = lv_hdl
    EXCEPTIONS
    not_connected = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    clear et_file_return.
    et_file_return-TYPE = gc_error.
    et_file_return-message = 'Unable to connect FTP.'.
    Append et_file_return.
    ELSE.
    IF NOT lc_pasv IS INITIAL.
    REFRESH lt_result.
    lv_cmd = lc_cmd1.
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = lv_hdl
    command = lv_cmd
    TABLES
    data = lt_result
    EXCEPTIONS
    tcpip_error = 1
    command_error = 2
    data_error = 3.
    IF sy-subrc <> 0.
    clear et_file_return.
    et_file_return-TYPE = gc_error.
    et_file_return-message = 'Error in passing FTP .'.
    Append et_file_return.
    ENDIF.
    CALL FUNCTION 'FTP_R3_TO_CLIENT'
    EXPORTING
    fname = iv_filename
    rfc_destination = lc_dest
    character_mode = lc_pasv
    TABLES
    text = gt_result
    EXCEPTIONS
    command_error = 1
    data_error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    clear et_file_return.
    et_file_return-TYPE = gc_error.
    et_file_return-message = 'Error passing data to FTP .'.
    Append et_file_return.
    ENDIF.
    free : gt_result.
    CONCATENATE lc_cmd2 iv_filename
    INTO lv_cmd SEPARATED BY ' '.
    REFRESH lt_result.
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = lv_hdl
    command = lv_cmd
    TABLES
    data = lt_result
    EXCEPTIONS
    tcpip_error = 1
    command_error = 2
    data_error = 3.
    IF sy-subrc NE 0.
    clear et_file_return.
    et_file_return-TYPE = gc_error.
    et_file_return-message = 'Error in passing FTP .'.
    Append et_file_return.
    EXIT.
    ELSE.
    clear et_file_return.
    et_file_return-TYPE = gc_success.
    et_file_return-message = 'Data Transfer Successful'.
    Append et_file_return.
    ENDIF.
    ELSE.
    clear et_file_return.
    et_file_return-TYPE = gc_error.
    et_file_return-message = 'No data Available.'.
    Append et_file_return.
    CALL FUNCTION 'FTP_DISCONNECT'
    EXPORTING
    handle = lv_hdl.
    CALL FUNCTION 'RFC_CONNECTION_CLOSE'
    EXPORTING
    destination = lc_dest
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    clear et_file_return.
    et_file_return-TYPE = gc_error.
    et_file_return-message = 'Error in RFC connection.'.
    Append et_file_return.
    ENDIF.
    ENDIF.
    ENDIF.
    ELSE.
    clear et_file_return.
    et_file_return-TYPE = gc_error.
    et_file_return-message =
    'Installed ABAP program does not match interface definition'.
    Append et_file_return.
    ENDIF."
    it seem that the error stop on the first exception that will return the message "Unable to connect FTP Server"
    I don't know why ,
    This SAP is 4.6C
    Thanks
    Edited by: somchai on Sep 16, 2009 11:27 PM

    Hi Somchai,
    r U able to resolve ur issue ..........i'm also struck there at the same point.
    I am using shared folder for file transfer and my error message is
    java.lang.RuntimeException: Error occured in open tool execute method...Error in executing ABAP program...Error in executing ABAP program...Error occurred when creating dataset\\<hostname>\bi-interface$\ZODI_11001_12001_GLOBAL.txt
    Thanks.
    Edited by: Drona on Mar 26, 2012 7:25 AM

  • FTP server not connected from SAP

    Hi Expert,
    I want to access FTP server thru SAP.But when I try to check RFC Destination SAPFTP connection test. It's gives error 'Error Details     timeout during allocate / CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456 Timeout dur'
    What will be the reason.what setting I have missed to set.
    Can anybody give me some tips of setting for connection of SAP to FTP server.
    To complete these requirement what will be the prerequisite and what will be the steps to complete these task.
    Answer should be rewarded.
    Thanks in advance.

    Hi,
    SAPFTP runs on the client (local PC), and SAPFTPA runs on the application server.
    If you are connecting from your SAP application server to another remote host, then you use SAPFTPA.
    If you are connecting from your PC to the remote host, use SAPFTP.
    Please confirm about it.
    These are standared FTP programs which allows you to FTP from within SAP.
    The SAPFTP.EXE should be pre-installed in the users local harddisk before you can used this functions.
    Do a check first by executing program RSFTP005. It will tell you whether it can detect the SAPFTP.EXE program.
    RSFTP001 - SAPFTP version
    RSFTP002 - Execute FTP Command
    RSFTP003 - Test
    RSFTP004 - FTP copy
    RSFTP005 - SAPFTP check
    RSFTP006 - FTP command list
    RSFTP007 - Test FB:FTP_SERVER_TO_R3 / FTP_R3_TO_SERVER
    RSFTP008 - Test FB:FTP_CLIENT_TO_R3 / FTP_R3_TO_CLIENT
    Thanks
    Swarup

  • FTP transfer gives incorrect characters after unicode upgrade

    Hello all,
    We write a file on a FTP drive containing data from an internal table. We use FM FTP_R3_TO_CLIENT to write this file. The internal table contains characters like 'ü'. Before our unicode upgrade this process worked fine. After our unicode upgrade the FTP file contains instead of the 'ü' characters like 'ü'.
    The internal table passed to the FM is still ok in the unicode system, only the result seems not. We did set the unicode flag on the SAPFTP RFC destination but this made no difference.
    Any idea?
    Thanks and best regards,
    Boris

    Hello Anil,
    Below items we checked between MDMP 46B and Unicode ECC6 with production client table SKAT. some Spanish display not correct.
    Unicode ECC6.0     46B
    Short Text     Short Text
    Ant a prov - Gto imp     Ant a prov - Gto imp
    Regal¨ªas     Regalías
    Prov Herramentales     Prov Herramentales
    Provisi¨®n de SLA     Provisión de SLA
    Prov Fin Vida (EOL)     Prov Fin Vida (EOL)
    Gtos de imp     Gtos de imp
    Mat dañado o perdido     Mat dańado o perdido
    Papeleria e insumos     Papeleria e insumos
    Gastos Vtas-Diseño     Gastos Vtas-Diseńo
    Ganancia p fluc camb     Ganancia p fluc camb
    Aj anual p inf     Aj anual p inf
    Depreciaci¨®n fiscal     Depreciación fiscal
    Best Regards
    Key

  • Outbound Adapter without PI?

    Hello Experts,
    is there an overview which different possibilities exist for sending files from a SAP System (e.g. APO) to a target system or a target directory?
    I am searching for possibilities which don't use the PI file adapter.
    many thanks,
    Michael

    Hi Michael,
       If it is a SAP system and you do not want to use PI for the data exchange,
    you can consider ABAP interface programs which use the
    open dataset/transfer dataset/ close dataset statements to transfer the data.
    There are some function modules like FTP_R3_TO_CLIENT
    FTP_R3_TO_SERVER
    to directly send data to FTP
    Alternatively you can configure file ports for idocs which would dump the idoc data in xml format in the specified file location.
    Regards,
    Ravi
    Regards,
    Ravi Kanth Talagana

  • HOW TO PUT INTO FTP SERVER?

    Hello:
    i am  trying to put a file into a FTP server, my program consist in the following topics:
    select the information.
    save the information that was selected (into internal table).
    send that information to PC using the Gui_download. (after of that the file is now in the pc).
    now i connect to ftp server using the FTP_CONNECT.
    now i use the FTP_COMMAND to move into the specific folder(in this function i send the CD command and the folder name for example: cd /CSTDW/ ).
    so , in that folder i need to put a file that is in my pc now (this file was created by GUI_DONWLOAD).
    I am using the FTP_COMMAND (i send a parameter with the path and the names of my file, por example: put c:\namefile.txt ) but the function send me a tables result show the folloing info:
    put c:\costabc_HD071008.TXT  "this is the names of my file
    open c:\costabc_HD071008.TXT errno 22: Invalid argument  " this is the message.
    but i make a manual connection and i used the next statement
    put c:\costabc_HD071008.TXT and the file was put into the folder located, i am sure that i pass througth the FTP server becasuse finaly i finished using a FTP_COMMAND sending the parameter ls command and i can see all the files that the folder has, but my file was not inserted.
    does anybody knows why manually the file was inserted and why not using the program?
    thanks a lot for you help
    now

    Hi
    Check the fun modules
    CV120_FTP_CLOSE            
    CV120_FTP_EXEC_CMD_LIST    
    <b>CV120_FTP_OPEN </b>            
    CV120_FTP_START_REG_SERVER 
    CV120_FTP_STOP_REG_SERVER                              
    EPS_FTP_GET                
    EPS_FTP_LS                 
    EPS_FTP_MGET               
    EPS_FTP_MPUT               
    <b>EPS_FTP_PUT  </b>              
    EPS_GET_FTP_SYSTEM_INFO    
    FTP_CLIENT_TO_R3       
    FTP_COMMAND            
    FTP_COMMAND_LIST       
    <b>FTP_CONNECT            
    FTP_COPY </b>              
    FTP_DISCONNECT         
    FTP_R3_TO_CLIENT       
    FTP_R3_TO_SERVER       
    FTP_SERVER_TO_R3       
    FTP_START_REG_SERVER   
    FTP_START_SAPFTP       
    Regards
    Anji

Maybe you are looking for

  • Zlib compression and loading

    Hello. I'm working in a little 3D visualization engine, and I need to compress some data for Internet delivering. The exporter is being written in c++, and I want to use java only as Internet visualizer using JOGL. However, I know java can uncompress

  • Replacing non latin characters

    Hi experts, i have to check some fields of non latin characters. When the fields include some of non latin charcters I have to replace them with an "Y". Have somesone a code example for this case? Thanks for help! Alex

  • BAPI_PR_CREATE requires fix asset

    Hello Gurus, I wonder if someone can help me to solve this problema, I have this error from the BAPI I am doing this: wa_praccount-asset_no. = '006703934334' This is how I call the bapi. CALL FUNCTION 'BAPI_PR_CREATE'     EXPORTING       prheader    

  • Can i use apple tv without a hd tv

    can i use apple tv without a hd tv

  • How to use text based index

    Hi, I want to use a text based index. The problem statement was i have to delete all those records which have column 'ABC%' means data can be ABC1, ABC2, ABCl, ABCn so i thought i would do like delete from tab1 where col1 like 'ABC%'. There are milli