FTP Connection through R/3

Hi Friends,
  I need to handle file transfer between non SAP system & R/3 application server, in both way. This is to be handled through R/3. and it should be automatic i.e. we need this transferring pgm as scheduled one.
  1. Is there any STD pgm to handle File transfer?
  2. will FTP_Connect, FTP_Command, FTP_disconnect functions work? Becoz i hv tried out with these functions but i was not able to connect to remote     system. Could anybody help me out in this?
  3. & i m not sure about scheduling of these functions?
Thanks in advance.
Seema

HI Seema
u can write small shell script program ,and store
these in application server(AL11 Tcode) ,these shell script program should be able to connect to remote server
and copy file from remote server to your application
server,
shell script program:
Connecting to ftp server to get the file on the current server
SOURCE_FILE_NAME=TSPAR_`date +%Y%m%d`.txt
#ur application server path
TARGET_FILE_NAME="/interf/torrance/TCW/FI/TS_PAR/TSPAR_`date +%Y%m%d`.txt
BACKUP_FILE="/interf/torrance/TCW/FI/backup/TS_PAR/TSPAR_`date +%Y%m%d`.txt" 
#ur remote server path
cd /interf/torrance/TCW/FI/TS_PAR
ftp -nv << EOF
open 131.123.233.134
user e3ty capihg
get $SOURCE_FILE_NAME
put $TARGET_FILE_NAME
get $SOURCE_FILE_NAME $BACKUP_FILE
EOF
use function module SXPG_COMMAND_EXECUTE to trigger
these script and file is there in ur application server.
pls let me know if you need further input regarding this

Similar Messages

  • How do I get SQL Agent to perform an FTP connection through a SSIS package?

    I have created a number of SSIS packages that I am running through SQL Agent in various jobs.  I have set up a Credential / Proxy for the job steps and for the most part everything runs no problem.  The issue I have is with the step where I make
    a connection to a FTP server and download files.  In BIDS the step works fine but in SQL Agent the step times out.  I presume that it has to do with the account that it is being run under but that is what I thought the Credential / Proxy was supposed
    to handle (as it does for all the other steps).  I am running on SQL Server 2008 R2.  I have created a test job that has only one step which is to connect to the FTP server and download some text files.  I have tried utilizing package configuration
    files and have tried various ProtectionLevels to no avail.
    Anyone have any thoughts or direction for me to take?  Will continue to research and will post if I resolve this.
    Thanks, Andrew

    On the dev environment the ProtectionLevel is set to EncryptSensitiveWithUserKey and that is what I tried first on the prod server.  Subsequently I also tried utilizing a package config file (with ProtectionLevel then of DontSaveSensitive) and have
    also tried working with the ServerStorage.
    For deployment I copied the relevant dtsx files to a solution on the prod server.  I verified that the packages all had tested connections in the Connection Manager.  I have run all the packages in the BIDS on the prod server and they all worked. 
    I have created a test package from scratch on the prod server to test the ftp connection.  This test package runs from BIDS fine.  I have set the SQL Agent file to access through the file system (no luck) and have saved the package to the SSIS Packages
    and had the job step access from there (no luck either).

  • Background scheduling of FTP Connection through R/3

    Hello Friends,
      I have done FTP connection by using Z-pgm which uses function FTP_CONNECT. This is working fine in Foreground mode. 
    But in background scheduling of the z-pgm, i am getting the <b>error as 'RFC to program SAPFTP failed'.</b>
    I checked RFC destination SAPFTP in SM59. There Activation type is 'Start on Front End Work Station'. I tested the connection also. Its alright.
    How to do FTP processing in Background?
    Cheers,
    Seema

    Hello,
    you could try to use RFC destination 'SAPFTPA' - it's ftp on the application server. Since SAPFTP is  'Start on Front End Work Station' and in background there is no front end work station, it can't work.
    Regards Wolfgang

  • FTP connections through Finder not reporting correct file size

    Hi,
    I have a NAS that running as an FTP server. When I connect to it through Finder it reports the incorrect file size of 2.7GB (the real file size is 61GB)
    Its an DMG image file so it obviously fails when I try to image a new IMAC.
    FTP through windows reports the correct file size so rules out any problem on the NAS.
    Any ideas anybody?
    Many thanks.

    Hi,
    I have a NAS that running as an FTP server. When I connect to it through Finder it reports the incorrect file size of 2.7GB (the real file size is 61GB)
    Its an DMG image file so it obviously fails when I try to image a new IMAC.
    FTP through windows reports the correct file size so rules out any problem on the NAS.
    Any ideas anybody?
    Many thanks.

  • Unix command in FTP connection through File Adapter

    Hi All,
    I have a scenario IDOC to file in which the user requested for pushing file to FTP server as below
    put localfilename %localfilename%CITISECUFLATNA%CITIGPASSIN%%B
    Here my file name is test.txt.
    so I tried giving in communial channel as
    File Access Parameters
    Target Directoy      : put test.txt %test.txt%CITISECUFLATNA%CITIGPASSIN%%B
    File Name Scheme: text.txt
    But I go the error in Communication channel as
    An error occurred while connecting to the FTP server 'ftp-gw.dx.deere.com:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 501 Syntax errors in parameter.     usage: %[recipient id]%[APRF]       where either [recipient] or [APRF] can be omitted.            (to change your current default SEND relationship).            %% (places you in your 'HOME' TR).   &['s'|'single'] ('get' command gets single file).   &['m'|'multiple'] ('get' command gets multiple files). '. For details, contact your FTP server vendor
    Please let me know how we can specify in our FTP parameter in Communication chanel.
    Regards,
    Dhill.

    Hi Satish,
      Thank you very much for your help and your time.  But I tried as you told
    Target Directory as : \
    File name scheme : test.txtCITISECUFLATNA%CITIGPASSIN%%B
    and also tried as
    Target Directory as : \
    File name scheme : test.txt<b>%</b>CITISECUFLATNA%CITIGPASSIN%%B
    still i got the same eror....  I am getting success only when I specify like
    Target Directory as : %%
    File name scheme : test.txt
    but the vendor is saying he is not able to see the file anywhere in ftp.
    Regards,
    Dhill

  • FTP Connection Through JAVA

    I am writing a java code to transfer a file from local machine to a server on another machine.
    While uploading i am encountering with an exception which is showing as
    java.net.ConnectException: Connection refused: connect
    The file is getting transferred sucessfully if i am transferring it through command prompt instead of java code.
    Please help me out.

    Duplicated here
    http://forum.java.sun.com/thread.jspa?threadID=700335&messageID=4063726#4063726
    and here
    http://forum.java.sun.com/thread.jspa?threadID=700257&messageID=4063471#4063471

  • File has to pass through FTPS connection.. Connection parameters?

    Hi,
    I want to transfer the file through FTPS connection. Partner side provided the following details as connection parameters.
    - IP : 129.32.169.140 
    - POrt: 990
    User name
    Password
    PASV mode
    SSL Direct, OpenSSL,SSL Listing, SSL Transfers.
    Kindly let me know what are all the parameters I need to pass in Receiver file adapter.
    FTP Connection Parameters:
    Server
    Port
    Data connection: Passive
    Connection Security:  FTPS for control connection or FTPS for control and Data connection.???
    Command Order :  ?????
    Please let me know what are the security and command order parameters I need to use in Receiver file adapter.
    They didn't provide any certificates.
    Thanks
    Deepthi.

    Hi Rajesh,
    The message is not even failing.. It is in the status of "Delivering". The below are the logs from adapter and Messaging system.
    File Adapter Log:
    Success   Message successfully received by messaging system. Profile: XI URL: http://xi-dev.intranet.XI.com.au:50200/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
    Success  Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    Success  Message successfully put into the queue.
    Success  The message was successfully retrieved from the receive queue.
    messaging system log:
    Message ID  44b756da-d9bd-42e2-3136-e34d75adfe03 
    Message Type  Asynchronously Received Message (RECEIVE) 
    From Service   Name:  BS_1  
    To Service   Name:  BS2  
    Action   Namespace  http://XI.com/SAP_PI/ControlData Name:  BYPASS  
    Connection Name   File_http://sap.com/xi/XI/System 
    Status   Delivering 
    Error Category    
    Error Code    
    Profile   XI 
    Transport   HTTP 
    Delivery Semantics   Exactly Once 
    Times Failed   0 
    Number of Retries   3 
    Sent / Received  09/09/2009 11:22:52 
    Transmitted / Delivered  09/09/2009 11:22:53 
    Next Delivery  09/09/2009 11:22:53 
    Persist Until  10/09/2009 11:22:52 
    Valid Until  01/01/1970 10:00:00 
    Retry Interval   5 Minutes 
    Address   http://xi-dev.intranet.XI.com.au:50200/MessagingSystem/receive/AFW/XI 
    Transport Headers   authorization=Basic UElJU1VTRVI6dDFhbTRyaWE= Content-Length=3010 accept-encoding=gzip sap-xi-messageid=44B756DAD9BD42E23136E34D75ADFE03 content-length=3024 host=xi-dev.intranet.XI.com.au:50200 user-agent=SAP Web Application Server (1.0;700) content-type=multipart/related;boundary=SAP_4AA4E14330050131E10080000A722149_END;type="text/xml";start="" HTTP=POST soapaction="http://sap.com/xi/XI/Message/30" 
    Principal Propagation

  • Connect to FTP site with Apache commons net FTP client through Proxy

    Hello,
    I am trying to run this simple code to connect to FTP site through a proxy.
    import org.apache.commons.net.ftp.FTP;
    import org.apache.commons.net.ftp.FTPClient;
    public class MyTest {
    public static void main(String[] args) {
    String ftpHostName = "ftp.xxx.com";
    int ftpPort = 21;
    String ftpUserName = "myUserName";
    String ftpPassword = "myPassword";
    System.setProperty("socksProxyHost" ,"10.148.0.131");
    System.setProperty("socksProxyPort", "1080");
    FTPClient ftpClient = new FTPClient();
    try {
    System.out.println("connecting");
    ftpClient.connect(ftpHostName, ftpPort);
    System.out.println("connected");
    System.out.println("loging in");
    boolean successLogin = ftpClient.login(ftpUserName, ftpPassword);
    if(successLogin)
    System.out.println("success login");
    else
    System.out.println("fail login");
    catch (Exception e) {
    e.printStackTrace();
    finally {
    try {
    System.out.println("loging out");
    ftpClient.logout();
    System.out.println("disconecting");
    ftpClient.disconnect();
    catch (Exception e) {
    e.printStackTrace();
    I am getting the following error:
    C:\temp\ftp\test>java.exe -cp ./commons-net-ftp-2.0.jar;. MyTest connecting
    java.net.SocketException: Malformed reply from SOCKS server
    at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:87)
    at java.net.SocksSocketImpl.connectV4(SocksSocketImpl.java:265)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:437)
    at java.net.Socket.connect(Socket.java:519)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:176)
    at MyTest.main(MyTest.java:23)
    loging out
    java.lang.NullPointerException
    at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:471<ftp://FTP.java:471>)
    at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534<ftp://FTP.java:534>)
    at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:583<ftp://FTP.java:583>)
    at org.apache.commons.net.ftp.FTP.quit(FTP.java:794<ftp://FTP.java:794>)
    at org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:697)
    at MyTest.main(MyTest.java:39)
    I am able to do this using a different FTP client library, ftp4j-1.5.1<ftp://ftp4j-1.5.1> using the following code:
    import it.sauronsoftware.ftp4j.FTPClient;
    import it.sauronsoftware.ftp4j.connectors.SOCKS4Connector;
    public class MyTestFtp4J {
    public static void main(String[] args) {
    String ftpHostName = "ftp.xxx.com";
    int ftpPort = 21;
    String ftpUserName = "myUserName";
    String ftpPassword = "myPassword";
    FTPClient ftpClient = new FTPClient();
    ftpClient.setConnector(new SOCKS4Connector("10.148.0.131", 1080));
    try {
    System.out.println("connecting");
    ftpClient.connect(ftpHostName, ftpPort);
    System.out.println("connected");
    System.out.println("loging in");
    ftpClient.login(ftpUserName, ftpPassword);
    System.out.println("success login");
    catch (Exception e) {
    e.printStackTrace();
    finally {
    try {
    System.out.println("disconecting");
    ftpClient.disconnect(true);
    catch (Exception e) {
    e.printStackTrace();
    So I know the proxy settings are correct.
    The java version I used to compile and run my apps is 1.6.0_06 Does anyone can help figure out what is wrong when I use the Apache commons net FTP client?
    Thank you
    Jon

    Is the old AirPort Extreme base station (AEBS)
    configured so that the option to distribute IP
    addresses is DISABLED? If so, configure the new AEBS
    to act as a bridge.
    Are you suggesting I use a set-up with TWO AEBSs? Set up a bridge (not sure how) and then use the old AEBS to connect to the DSL modem and broadcast to the new Extreme which will then be the router to the other computers on the network?
    Do you have any port mapping or default host enabled
    on the old AEBS?
    I do not understand, not do I see these options in the Base Station utitlity; perhaps they are in the FTP options--but that, I'm sorry to say, is not obvious to my inspection.
    Duane, can you give me a few more basic instructions? Thanks
    iMac 17    

  • How can I find out the server port for a secured FTP site and creating a FTP Connection Manager

    I have to create a FTP Task to go out and get the files that our 3rd party vendor will be dropping on a secured FTP site. I have all the credentials to access that Secured FTP Site and have successfully done so through FileZilla.
    Now I need to set-up a FTP Task to go out and get their files and in so doing create a FTP Connection Manager. Is there any way I can determine the
    Server Port number from the Secured FTP site? I let it default to 21 and tried the Test Connect and it failed.
    Thanks for your review and am hopeful for a reply.

    Hi ITBobbyP,
    SSIS has a built in FTP task, while this only works for the FTP protocol, it doesn’t support SFTP. But there are some free clients like WinSCP and
    SSIS SFTP Task Control Flow Component
    available in the CodePlex which can invoked from SSIS.
    References:
    SSIS SFTP Task Control Flow Component approach
    WinSCP approach
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Sender File Adapter - FTP Connection Error 530

    Need help!!!
    I am getting the following error in XI when I try to connect to an ftp server.
    "An error occured while connecting to server xxx.xx.x.xx:xx. The FTP server returned the following error message:'com.sap.aii.adapter.file.FTPEx: 530 Can't open passive connection---(4013)'. For details, contact FTP server vendor"
    When I try the FTP connection on the OS level I am able to log in, but through XI I am unable to.
    Has anyone seen this error before?

    I have seen Error Code 530 earlier, it is typically related to login related issues.
    Check if the user mentioned in the Comm Channel has the correct password and read as well as write rights on the Server.
    The most likely problem is with the User Credentials or Authorizations

  • FTP connection in webdypro

    Hi ,
       I m trying to access external file server from my WAS server through webdynpro environment. I ahve added external jars commons.net  for FTP connection
    I have created a java class for getting connection to file server.In webdynpro action button I m calling that java class through an object of that class.
    When i m running that java class standalone on jre i m getting the connection ,But the same java class when i m calling from webdynpro It is restarting the server please solve the issue.
    thanks

    hi,
    If you have added the jars directly by going into project properties then it is advisable to add it using a library project.
    Create a library project by copying those jars if you havent done it already and try again.
    regards,
    abhijeet

  • How to set FTP parameters through Module Processor?

    Hi
    We read parameters set in the communication channel of an adapter through method getSupplementalData("module.parameters") of com.sap.aii.af.mp.module.ModuleData.
    I have following question regarding reading/writing configuration data, set in communication channel for a File adapter:
    1) How can I read the FTP Connection Parameters in a module of a module processor?
    2) Is it possible to update FTP parameters at Module Processor level for Receiver Adapter?
    3) If update of parameters through Module Processor is not possible, then is there some other way I can set the FTP parameters?
    Regards
    Vijendra

    HI Vijendra,
    Check out this -
    https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202
    https://media.sdn.sap.com/SDNTV/main.asp?mediaId=130
    <i>2) Is it possible to update FTP parameters at Module Processor level for Receiver Adapter?</i>
    You can not dynamically determine the FTP server etc. In the Receiver Adapter, Module is called first, then control is given XI Adapter to output the file into FileSystems. You can modify the Payload.
    For more~
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/frameset.htm
    Hope this helps,
    Regards,
    Morothy

  • FTP CONNECTION PARAMETER, SERVER & PORT

    HI m new to xi,
    i m working with file to file scenario. while creating the sender communication channel for file adapter for the FTP connection parameters, what to give for the server.
    i dont know my server ip address. m having my own system.
    i installed guideFTPD to my OS (windows server). i dont know the ip adress, can any one tell me how to know the server IP address.
    i searched in SDN but i didnt find.
    points rewards
    thanks in advance
    munna

    Hi,
    If you are just doing it for testing then you can also go for NFS mode in your File Adapter which will allow you to pick and drop the file on your XI servier directory. The directory can be seen by using the tcode AL11.
    But if you have any specific reason to use FTP adapter then you can go ahead and as suggested above you can find the ip address.
    Probably if you go through this link before configuring your adapter then it will help you a lot..
    http://help.sap.com/saphelp_nw04/Helpdata/EN/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Regards,
    Sarvesh

  • Ftp connection using java

    Hi All,
    I need to upload a file through ftp connection uisng java calss. any one know please reply me
    Thanks
    K.Kalikumar

    Hi Kali,
    I have worked on similar issues sending you the code.. hope it should work. I had written a TelnetInterface class where I did all operation inside the constructor.
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.InputStream;
    import java.io.PrintStream;
    import org.apache.commons.net.telnet.TelnetClient;
    public class TelnetInterface {
         private TelnetClient telnet = new TelnetClient();
         private InputStream in;
         private PrintStream out;
         private String prompt = ">";
         private boolean isConnected ;
    public TelnetInterface(){
         public TelnetInterface(HttpServletRequest request) {
                   HttpSession session = request.getSession();
                   PropertyReader propReader = (PropertyReader)session.getAttribute("propReader");
                   String host=null,user=null,password=null,port=null;
                   int unixPort= 0;
    //                Get Unix credentials
                   if(propReader != null){
                        host=(String)propReader.getProperty("UNIX_HOST");
                        user=(String)propReader.getProperty("UNIX_UNAME");
                        password=(String)propReader.getProperty("UNIX_PWD");
                        port=(String)propReader.getProperty("UNIX_PORT");
                        unixPort = Integer.parseInt(port) ;
    //                    Connect to the specified server
                   System.out.println("Inside telnet Interface");
                   try{
                        telnet.connect(host, unixPort);
                        isConnected = true;
                        in = telnet.getInputStream();
                        out = new PrintStream(telnet.getOutputStream());
    //                    Log the user on
                        readUntil("login: ");
                        write(user);
                        System.out.println("user:"+ user);
                        readUntil("Password: ");
                        write(password);
                        System.out.println("password:"+ password);
                        sendCommand("su - loginuser");
                        su(" password");
                   }catch (IOException e) {
                        e.printStackTrace();
                        isConnected = false;     
                   }catch (Exception e){
                        e.printStackTrace();
         }

  • FTP connection failed in background

    Hi Folks,
        I'm connecting from SAP system to a FTP server using the FTP program. When I'm connecting to the FTP server through the RFC destination SAPFTP its working fine i can connect to the server however I have to run the program in the background mode so I cannot use the SAPFTP rfc destination as it can run only on the foreground so in my case I'm using the RFC destination SAPFTPA as this is the RFC destination which can be used in the background mode.
    The problem arises here when I'm using SAPFTPA in place of SAPFTP as I have to run the program in background. When I'm using the RFC dest SAPFTPA I'm getting an error saying "Attemp To Set Up Connection To 179.65.23.203 Failed" however the connection is successful when the RFC dest SAPFTP is used.
    Please provide your valuable inputs.
    Regards,
    Santosh

    You may need to write a small utility and runs in background and check
    report zaRs message-id 04 line-size 132.
    tables: rfcdoc.
    data: rfc_mess(132),
    call function 'RFC_PING' destination 'SAPFTPA'
      exceptions
        system_failure        = 1  message rfc_mess
        communication_failure = 2  message rfc_mess.
    if sy-subrc ne 0.
      write: / 'Errors', rfc_mess.
    endif.

Maybe you are looking for

  • IWeb HTML snippet doesn't work hosted outside MobileMe

    Hi I created a site with iWeb and used to HTML snippets. When I publish the site on MobileMe all works fine When I publish the site with my Dutch Web hosting company, those HTML components won't work. The vistor to the page finds a error message inst

  • Lens correction doesn't work in CS5 Bridge

    Lens Correction in Bridge isn't working properly for me. I ran the Lens Correction tool in Bridge and selected "Match best profile" from the profile section. The script ran and saved the new files in the proper folder, but didn't produce any lens cor

  • Urgent : Character set problem

    We have one test server in India and another one in Europe. The character setconfigured in Indian server is US7ASCII and in Europe it is configured as WE8ISO8859P1. We have a routine that encrypts the password using 'crypt' command of HP-UX 10.20. In

  • ERROR:Receiver Partner record in the control record  is default

    Hi, When I am trying with WS t Idoc scenario the followinw error is getting "Receiver Partner record in the control record  is default" when I am checking in we05 Please clarify. Thanks, Srinivas

  • How do I connect an HP printer via Linksys printserver to a wireless network

    Hi: I have an HP laptop running Windows Vista 32-bit Home Premium. It is connected wirelessly to the Internet via a Motorola SBG6580 cable Gateway. I have an HP C6280 All-In-One printer/copier/scanner: wireless is  not  built-in. A Linksys WPSM54G Pr