Send ITAB contents to FTP Server in background

Hi All
  I am sending the contents of an internal table to FTP server using Function modules HTTP_SCRAMBLE, FTP_CONNECT, FTP_R3_TO_SERVER, FTP_DISCONNECT, RFC_CONNECTION_CLOSE in that sequence. The operation is successful when run in foreground, but is failing when run in background. Can anybody resolve this soon. This is urgent.

Hi Sharath,
do you run it with same user in background? Otherwise it may be authorization problem.
Or do you perform any uplad/download operations in background. This can't work because there is no frontend available.
Otherwise paste some more code.
Regards,
Clemens

Similar Messages

  • Transfer of Internal table contents to ftp server

    Hi,
    I have data in one internal table, which needs to transferred to file on ftp server,
    please tell me how to create file on ftp server, how should i transfer contents of this internal table to file on ftp server.
    please help me.

    Hi,
    Please refer following code, which create a log file in Ftp server,
    Step 1 Connect to Ftp server.
    SET EXTENDED CHECK OFF.
        g_slen = STRLEN( p_pwd ).
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = p_pwd
          sourcelen   = g_slen
          key         = g_key
        IMPORTING
          destination = p_pwd.
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = p_user        <----- Pass User ID
          password        = p_pwd  <---- Pass Password
          host            = p_host        <---- Pass IP Address
          rfc_destination = p_dest  <----- RFC destination SAPFTP
        IMPORTING
          handle          = g_hdl
        EXCEPTIONS
          not_connected   = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        sy-msgty = 'E'.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    *   MESSAGE SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 TYPE 'I'.
      ENDIF.
    Step 2  Reading file from FTP
    CALL FUNCTION 'FTP_SERVER_TO_R3'
      EXPORTING
        handle               = g_hdl
        fname                = p_fname   <---- File path
    *   CHARACTER_MODE       =
    IMPORTING
       BLOB_LENGTH          = l_xml_table_size
    TABLES
       BLOB                 = l_xml_table
    *   TEXT                 =
    EXCEPTIONS
       TCPIP_ERROR          = 1
       COMMAND_ERROR        = 2
       DATA_ERROR           = 3
       OTHERS               = 4
    Step 3 Write a file
    g_docid = l_filename.
    * **Transferring the data from internal table to FTP Server.
      DESCRIBE TABLE gt_log LINES l_count.
      g_slen = l_count * 275.
    CALL FUNCTION 'FTP_R3_TO_SERVER'
      EXPORTING
        handle               = g_hdl
        fname                = g_docid     <---File name
       BLOB_LENGTH          = g_slen   <---- Length
       CHARACTER_MODE       = 'X'
    TABLES
    *   BLOB                 =
       TEXT                 = gt_log
    EXCEPTIONS
       TCPIP_ERROR          = 1
       COMMAND_ERROR        = 2
       DATA_ERROR           = 3
       OTHERS               = 4

  • Sender File Adapter - remote FTP server program execution

    Hi all,
    I have a scenario
    X12 -> XI -> File
    where sender File adapter is used. The input file is X12 txt document which needs to be converted into X12 xml format. I have created astylus studio XSLT mapping which uses Convertor to convert this txt file to X12 XML.
    I don't know how to configure sender file adpater to run this mapping on the source file before picking it up. have created a windows batch file on the FTP server which runs tis XSLT mapping on the txt file and replaces it with X12 format xml. This batch file uses command line parameters of stylus studio to run XSLT mapping on input txt file and generates an xml.
    I am not sure how to run this mapping on the input file before processing starts in PI file adapater.
    I tried running command line parameters of Sender file adapter but that didn't worked.
    Please help.
    Thanks
    -Kulwant

    Hi, Kulwant:
    Looks like you would like to execute your mapping program before file adapter pick it up.
    Right ? for one interface, it seems out of the XI scope, however if this is your requirement, you can separate into two interfaces:
    The first interface is file to file scenario, it is used to execute your mapping program:
    The file sender just pick up the txt file, send to integration engine.
    Your Message Mapping program need to specify your XSLT mapping, after the mapping, the message is XML format,
    then you will use file receiver to send it to certain directory.
    Now the XML format file is your input of your second interface.
    Regards.
    Liang

  • How to download  n  files  to FTP server in background using single report?

    Hi all,
    I have one requriement where i have to download 7 different text ( *.txt ) files to FTP server weekly using single program in background mode.
    I have populated all the 7 internal tables with their corresponding data.  But i dont know how to proceed further.
    Please help me out .....
    Thanks in advance..

    hi,
    U can store the Internal table name and File name in an internal table.
    Then loop at that table and call function called 'GUI_DOWNLOAD' inside that loop.
    Rgds,
    Sanjeet

  • How configure sending CDR reporting via ftp server

    hi
    i want to send the CDR reporting automaticly to FTP billing server each 1H.
    i have add the billing server
    i don  t know how or when can i configure the automatique sending CDR report to this server
    Thanks for your help

    You'll need a SFTP server instead of FTP.
    For instructions, please see here:
    http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/service/7_1_2/admin/sacdrm.html
    Thanks!
    Michael
    http://htluo.blogspot.com

  • Send PDF form to FTP server folder

    I am not sure if this is possible, but one of my clients wants it, so I'm checking. They have a PDF form set up that currently sends the attachment via the user's email program. My client doesn't like that. So they want it to when a user fills out the PDF and submits it, the filled out PDF is sent to an FTP folder they can access. Is it possible to send a PDF to a specified FTP folder? If so, what all would be needed?
    Thanks

    Not possible. You can submit to a web server, which can then save the file somewhere, but this would involve some programming.

  • I published my website to an FTP server and it comes up correctly at the index page, but if I navigate to a different page then back to "index" it sends me to my FTP server's home page.

    I contacted the techs at my server and they said the "i" in index was not capitalized in the hyperlink but was capitalized in the file.  iWeb makes it's own hyperlink - how do I fix it?
    Many thanks to anyone that can help.  The website is www.beeskneesbodyworks.com  if you want to see for yourself.
    Trish

    You have named your Home page "Index" which you cannot do.
    Change it Home or something else, republish your site and all will be well.

  • TS2621 sending message content to the server failed - on my iPhone and iPad?

    How do I fix this. Thank you very much

    Does the mail account work on other devices?
    Have deleted the account from the devices and recreated it?

  • Unable to send file in binary mode to ftp server using AIR application

    Hi,  Can any one help me. i am trying to send local files to ftp server  in binary mode from AIR application using sockets.
    I cant use PASV mode for this FTP server because security restrictions. when i am trying to send Binary command i am always getting
    error code 500 which is unrecognized command. I googled for solutions but i cant find any one using Binary mode to send data every example is using PASV mode to send
    file.
    code example:
    private function upload():void{
    sendCommand("binary ");
    private function sendCommand(arg:String):void {
                                            arg +="\n";
                                            s.writeUTFBytes(arg);
                                            s.flush();
    in response i am getting unrecognized command.

    I'm successfully using an ftp example from http://http://projects.maliboo.pl/FlexFTP/
    that I converted to spark and uses a popup progress window.
    If you don't need to use sockets I can post a sample project.
    I believe I still connect with PASV, but have no problems sending Binary files.
    I don't think they're commands that are dependent on each other

  • PI 7.1 using FTPS as File Sender Adapter: Problem connecting to Server!

    Hi
    We are using SAP PI 7.1 and I am trying to connect to an FTPS Server, but always get the following Error in the log: "Channel FileReceiver: Error connecting to ftp server 'hostname': com.sap.aii.adapter.file.ftp.FTPEx: The control connection to the FTP server hostname timed out while reading the server reply."
    I checked all the parameters and they seem to be ok! When I am using the same parameters with a WS_FTP Client Tool on the same server, I can establish the connection! Hostname, Port, User, Pass, etc must be ok ... I also imported the CA Certificate into the "TrustedCAs" KeyStore ...
    We also checked if on FTPS Server side we can see anything in the logfiles, but it seems that PI (Fiel Adapter) does not send anything to the FTPS Server. On OS Level we see that a TCP Connection is established tho the Server on the correct Port and we also used a tool to analize if data is sent over the established connection, but there was no data :-o
    Can anybody help me?
    Thanks
    Christoph

    Hi Pavan
    Access rights are ok ... how do I check if my PI Sysem supports FTPS? We have installed the crypto extensions and I also can select the FTPS Option on the file adapter. Is there anything else that must be enabled or configured?
    Regards
    Christoph

  • Java code to create a new .txt file in FTP server  --- Help

    Hi,
    I wrote a standalone java app which creates a .txt file in my local machine and transfers it to FTP server. But my requirement now is to create a new .txt file with the same content in FTP server itself instead of creating locally with basic java code.
    I'm aware of transfering file from local machine to the FTP server using STOR command of FTP. But i never tried creating a new file & writing content into that in FTP server.
    So, if any one did this before please help me out with source code or any idea ???
    Thank you.
    Vj.

    simply_vijay wrote:
    thanks for your reply. yes i've seen the Apache Commons NET API , but there is no method or class to create a new file in FTP server. I'm really worried how to solve this problem ???Sure there is.
    There's a method where you can write data to a file on the server using an OutputStream, right? Well, instead of writing to a FileOutputStream, write to that OutputStream instead. Remember to close the OutputStream and call the method which says you're finished with the command (I forget what it's called).

  • How to archive files in another ftp server?

    Hi,gurus:
       My scenario is file to file and my sender adapter is ftp adapter.
       Now I want to archive the send file in another ftp server,how can I  implement it?
       There is a parameter "Archive files on FTP server" when I choose the processing mode "archive".What's  it's use?Thanks in advance.

    Hi,Santhosh:
      Thanks for your reply.
      I have checked your blog before,and it is very useful for me.
      I still have a problem about command line.
      In an sap note,I found the principle of the execution of the command line is like below code:
    import java.util.*;
    import java.io.*;
    public class test {
    public static void main(String args[]) {
    try {
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("C:/data/test.bat <param1> <param2>");
    } catch (Exception e) {
    e.printStackTrace();
    But you know this method has restriction.If my bat file has many commands,it only execute a part of commands(sometimes 8,sometimes 9 ).
    My bat file is like below:
    echo open 192.168.67.149 >c:
    data
    copyResult.txt
    echo <username> >>c:
    data
    copyResult.txt
    echo <password> >>c:
    data
    copyResult.txt
    echo cd /receive>>c:
    data
    copyResult.txt
    echo get %2>>c:
    data
    copyResult.txt
    echo cd /ok>>c:
    data
    copyResult.txt
    echo put %2>>c:
    data
    copyResult.txt
    echo cd /archive>>c:
    data
    copyResult.txt
    echo delete send.txt>>c:
    data
    copyResult.txt
    echo quit >>c:
    data
    copyResult.txt
    ftp -s:c:
    data
    copyResult.txt
    del %2
    I wanna merge all the "echo" in one command,so it may execute successfully,but I don't know the method.Any ideas?

  • Contorlling FTP Server

    I want to Run a ftp server on my machine. My FTP Client will send the data to FTP Server (not a file but byte data). The FTP Server should listen to the data, store it in a file on the local hard disk. How can I wrote a code in JAVA to configure the server to receive data from client and store it in the file

    gunjannigam wrote:
    By writing the code at server side I meant a code which will run on the machine on which my server is runningSo you want to write an FTP server! That is the code you will have to write on your Server - an FTP server!
    Configuring the data I meant that i need to capture that data bytes and I need to save them into file,That is the job of an FTP server taking bytes from your client using the FTP protocol.
    i.e. if I am getting 5000 bytes on server I need to save those 5000 bytes into a file on the server. Which is exactly what an FTP server does.
    The data will be not be coming packed in file. I have to write them into the fileFTP data is sent as a stream that can come from any source which may or may not be a file. Jakarta Common Net FTP client allows this.
    I have written a cut down FTP server in Java. It is not very good and it took me a long time. Whether you are doing this for a College/University or for a company they surely cannot expect you to write an FTP server! It is only cost effective if it is for your own benefit. Just install one of the free FTP servers on your Server.

  • Some files never getting transferred to our FTP Server

    We are moving configuration changes from one instance to another using 'Manage Implementation Projects' functionality. This PeopleTools functionality creates DM scripts to transfer functionality like Billing, Contracts, etc to another instance when you click 'Export'
    It is supposed to send the scripts to 'FTP Server > psdata > PSFILEDIR' on a Windows system in Financials 9.1 using PT 8.53.04. We constantly get a 'Permission Denied' from this process when trying to do this.
    This problem happens in all DEV instances, yet the process works fine  in the Prod instance. I have examined the permissions in the PSFILEDIR and compared them in DEV and PROD and find no differences

    I guess you didn't like my last answer.  So I'll try again.  First off, forget FTP.  We don't even care about FTP and adding it to the Title of the question just confuses things and maybe gets you less responses.  In production, does this open a Dialog box/Save window when the  export finishes?
    My assumption is that you have the variable PS_FILEDIR set to \\s-wpstbftp1\s$\psdata\PSFILEDIR for the app server.  Is that true?
    You are failing on line 10 which is
    &PROJECT_FILE = GetFile(&FILENAME, "W", %FilePath_Relative);
    The PSAPPSRV process is trying to open a file in write mode.  It's using Relative Path which appends &FILENAME to the path which is determined by either PS_FILEDIR or PS_SERVDIR.  This part of the code is not even the part where the file is supposed to be placed at a final destination.  This is very initial step in creating the file, nothing is being written yet.  The PSAPPSRV process at this point knows nothing about FTP or other network transfer protocols, it simply knows that it should use \\s-wpstbftp1\s$\psdata\PSFILEDIR as the path. To the PSAPPSRV process this is a path that is locally available on the server,wWhen the system call comes through to the OS to attempt to open this file, the operating system is what allows this to seamlessly connect to a network resource.
    There are two potential points where for this and they both relate to the user running the PSAPPSRV process.
    You are using the Admin share for the S: drive on s-wpstbftp1.  This means any connection to this PATH must be made as a user that is an Administrator on server s-wpstbftp1.
    The PSAPPSRV processes must be running as a user that is an Administrator on the other server.  This requires configuring the Oracle ProcMGR Windows service to run as a user that has access to the resources in question.
    So to fix this you need to look at the ProcMGR service and set it to run as an Administrator user from s-wpstbftp1.  This may require additional tasks such as setting up that user on the PeopleSoft server.  Use task manager to look at what user is running the PSAPPSRV processes and make sure it's the user you need it to be.
    In my humble opinion though, this is bad configuration:
    You shouldn't be using Admin shares
    I don't like relying on remote server paths that aren't redundant storage devices (NAS or SAN).  What if this server is down and other processes need to use this path?
    You appear to be expecting this file at a location where it is created for further processing by the code, not the final destination.  The file is intended to be downloaded by the user.  I don't know why the developer decided to leave the file on the file system, but they may decide to clean up after themselves or change how this works in the future.  The file is created, inserted into the database, then read from the database, sent to the user, and deleted from the database.  The code calls DetachAttachment which the PeopleCode Language Reference book says:
    Use the DetachAttachment function to download a file from its source storage location and save it locally on the end-user machine. The file is sent to the browser with appropriate HTTP headers to cause the browser to display a save dialog box to the user.

  • One business system and two FTP server locations

    Hi,
    We have one business system and two FTP server locations related to it. We have to send two different messages to this business system.
    It has to be send to both the ftp server locations.
    How do we configure the receiver determination and receiver agreements ?
    Do we need two receiver Business systems for this?
    How do we configure the receiver agreements especially?
    Urgent
    Regards,
    John

    hi
    1) you must create 2 CC, each one to one FTP server.
    2) how you send diferent message to each FTP yo only have to define 2 Reveiver determination, and two Interface Determination.
    3)one sender Agreement
    4)2 receiver agreement.
    take in mind you only have 1 BS you must create 2 receiver determination, else if have 2 one receiver would be enouhgt
    Thanks
    Rodrigo

Maybe you are looking for

  • Appalled by the lack of customer service - NEW PHONE is DEFECTIVE

    I was leaving for California at the end of July and needed a battery for my Galaxy Note 2. There were none to be found. Verizon agreed to allow me early upgrade to the Galaxy Note 3. After daily phone conversations with customer service, I finally go

  • Changing one character in a string...how hard can it be...???

    Hey guys, I posted something the other day about changing a binary string to one complement. Well, now I want to change that again to the two's complement of the same number. The (messy) code I got so far is as follows: import java.util.*; class twos

  • How to launch a non bsp url through transaction launcher

    Hi All, i am not able to launch a non bsp url from transaction launcher. i have followed all the steps needed. Defined URL as non bsp url and defined the logical system and assigned it to rfc destination. when i test this out, i am getting a blank pa

  • GTC Connectors migration in OIM11gR2

    Hi We had exported entire GTC resource object and when we tried to import in another env, we see dependency errors on GTC Schedulers even though the schedulers exists in the xml. What are the steps to migrate GTC Connectors(Flatfile and DBAPP) from o

  • IPhoto on iPhone never completes Updating Photo Library

    Tried about 10 times. After opening iPhoto, it attempts to Update Photo Library. It gets about 3/4 way done and then quits. (I do have a LOT of photos, probably about 20,000 on my phone) iPhone 4S 64GB, IOS 5.1