How to send CSV files to external server

Hi All,
How to send CSV files to external server (not to application server).
I know how to download files to application server.
Please give me the steps to send CSV files to external server.
Is it posiible with RFCs? If yes, then plz provide me the steps. Do we need to create RFC destination for this.
Appriciate your help with rewarding points.
Please help as this is an urgent requirement

hi,
you can send via xi.
chk this blog
a) content conversion (sender)
/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
b)content conversion (receiver)
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
<b>
reward points if this helps you.</b>
Siva
Message was edited by:
        SivaKumar

Similar Messages

  • How to save CSV file in application server while making infospoke

    How to save CSV file in application server to be used as destination while making infospoke.
    Please give the steps.........

    Hi
    If you want to load your flatfile from Application server,then you need to trasfer your file from your desktop(Computer) to Application server by using FTP.
    Try using ARCHIVFILE_CLIENT_TO_SERVER Function module.
    You Just need to give thesource path and the target path
    goto SE37 t-code , which is Function module screen, give the function name ARCHIVFILE_CLIENT_TO_SERVER, on click F8 Execute button.
    for path variable give the file path where it resides like C:\users\xxx\desktop\test.csv
    for target path give the directory path on Application server: /data/bi_data
    remember the directory in Server starts with /.
    U have to where to place the file.
    Otherwise use 3rd party tools to connect to ur appl server like : Core FTP and Absolute FTP in google.
    Otherwise...
    Goto the T.code AL11. From there, you can find the directories available in the Application Server.
    For example, if you wanna save the file in the directory "DIR_HOME", then you can find the path of the directories in the nearby column. With the help of this, you can specify the target path. Specify the target path with directory name followed by the filename with .CSV extension.
    Hope this helps
    regards
    gaurav

  • How to send .CSV file via email in Oracle10g/11g PL/SQL

    Hi Guys,
    Can any one let me know or suggest me how to send .csv file via email attachment using Oracle PL/SQL.
    Thanks in advance!
    Regards,
    LRK

    A FAQ. Use UTL_MAIL (if attachment is 32KB less). Else use UTL_SMTP. Search this forum. Search using google.

  • How to upload .CSV file from Application Server

    Hi Experts,
        How to upload .CSV file separated by ',' from Application server to an internal table.
    Invoice No,Cust No,Item Type,Invoice Date,days,Discount Amount,Gross Amount,Sales Amount,Customer Order No.,Group,Pay Terms
    546162,3233,1,9/4/2007,11,26.79,5358.75,5358.75,11264,HRS,11
    546163,2645,1,9/4/2007,11,3.07,305.25,305.25,10781,C,11
    Actually I read some already answered posts. But still I have some doubts.
    Can anybody please send me the code.
    Thanks in Advance.

    Hi Priya,
    Check this code
    Yhe logic used here is as follows,
    Get all the data into an internal table in the simple format ie: a row with one field contains an entire line
    After getting the data, we split each line of the table on every occurrence of the delimiter (comma in your case)
    Here, I have named the fields as field01, field02 etc, you could use your own names according to your requirement
    parameters: p_file(512).
      DATA : BEGIN OF ITAB OCCURS 0,
              COL1(1024) TYPE C,
             END OF ITAB,
             WA_ITAB LIKE LINE OF ITAB.
      DATA: BEGIN OF ITAB_2 OCCURS 0,
        FIELD01(256),
        FIELD02(256),
        FIELD03(256),
        FIELD04(256),
        FIELD05(256),
        FIELD06(256),
        FIELD07(256),
        FIELD08(256),
        FIELD09(256),
        FIELD10(256),
        FIELD11(256),
        FIELD12(256),
        FIELD13(256),
        FIELD14(256),
        FIELD15(256),
        FIELD16(256),
       END OF ITAB_2.
      DATA: WA_2 LIKE LINE OF ITAB_2.
        OPEN DATASET p_FILE FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
        IF SY-SUBRC = 8.
          WRITE:/ 'File' , p_FILE , 'cannot be opened'.
          LV_LEAVEPGM = 'X'.
          EXIT.
        ENDIF.
        WHILE SY-SUBRC <> 4.
          READ DATASET p_FILE INTO WA_ITAB.
          APPEND WA_ITAB TO ITAB.
        ENDWHILE.
        CLOSE DATASET p_FILE.
      LOOP AT ITAB INTO WA_ITAB.
        SPLIT WA_ITAB-COL1 AT ','    " where comma is ur demiliter
         INTO WA_2-FIELD01 WA_2-FIELD02 WA_2-FIELD03 WA_2-FIELD04
         WA_2-FIELD05 WA_2-FIELD06 WA_2-FIELD07 WA_2-FIELD08 WA_2-FIELD09
         WA_2-FIELD10 WA_2-FIELD11 WA_2-FIELD12 WA_2-FIELD13 WA_2-FIELD14
         WA_2-FIELD15 WA_2-FIELD16.
        APPEND WA_2 TO ITAB_2.
        CLEAR WA_2.
      ENDLOOP.
    Message was edited by:
            Kris Donald

  • How to send the file in *application server* as an email?

    Hi,
    I have a file in application server and I want to send that file as an email from application server.
    Please let me know how to do it.

    Hi Suman,
    look here:
    Re: How to send an email from Application server?
    Regards, Dieter

  • HELP!!! - How to send a file to a server?

    How to send a file(as it is) to the server i'm connected to, if i have access to the output-stream?

    Ummm read the APIs of anything you don't understand. Documentation is your friend, I hope you are not being lazy. But I'm in a good mood so here:
    // Make sure you try to catch any IOExceptions
    // Code expanded for clarity;
    OutputStream yourOutputStream = getYourOutputStream; // You said you can get the outputstream to the server/socket. I assume you made a connection.
    BufferedOutputStream bos = new BufferedOutputStream(
    yourOutputStream ); // Always a good idea to use buffers
    // Your object is your file
    File yourObject = new File("blabla.jpg");
    FileInputStream fis = new FileInputStream(yourObject);
    byte[] b = new byte[1024]; // A good size read
    while( fis.read(b) != -1){// read 1024 bytes into array at a time, returns -1 at end of file
       bos.write(); //write to the server
    fis.close(); // close the inputstream
    yourObject = null; // help the gc
    bos.flush(); // flush the buffer, close does this, but it is good form
    bos.close(); // close the output to the server--Thunder
    PS - The Duketer is in!

  • How to send XML file to https server using POST

    Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
    The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
    Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
    Thanks,

    Can anybody give me the solution

  • How to send csv file as an attachment

    Hi,
    I am able to create a csv file in this directory as "test.scv" using utl_file and some select statements.
    Now I need to send this csv file as an attachment in email.
    we have smtp installed on our server.
    Please help me on this .
    Thanks
    Kind Regards

    The first link takes in a filename (this would be the csv file you have already created) so nothing should be hard coded; it's just the parameters you pass in.
    Doing a little more research (from the asktom article I posted previously) links to this [http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html] which the real gold is at [http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt]:
    with examples how to use it at [http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/mailexample_sql.txt].
    To get the attachments working from a PL/sql application you will require one of the packages or a large amount of code.
    here's the coded example for attaching files from the packages listed in maildemo_sql.txt from Oracle's website
    REM Send an email with 2 attachments.
    DECLARE
      conn      utl_smtp.connection;
      req       utl_http.req; 
      resp      utl_http.resp;
      data      RAW(200);
    BEGIN
      conn := demo_mail.begin_mail(
        sender     => 'Me <[email protected]>',
        recipients => 'Someone <[email protected]>',
        subject    => 'Attachment Test',
        mime_type  => demo_mail.MULTIPART_MIME_TYPE);
      demo_mail.attach_text(
        conn      => conn,
        data      => '<h1>Hi! This is a test.</h1>',
        mime_type => 'text/html');
      demo_mail.begin_attachment(
        conn         => conn,
        mime_type    => 'image/gif',
        inline       => TRUE,
        filename     => 'image.gif',
        transfer_enc => 'base64');
      -- In writing Base-64 encoded text following the MIME format below,
      -- the MIME format requires that a long piece of data must be splitted
      -- into multiple lines and each line of encoded data cannot exceed
      -- 80 characters, including the new-line characters. Also, when
      -- splitting the original data into pieces, the length of each chunk
      -- of data before encoding must be a multiple of 3, except for the
      -- last chunk. The constant demo_mail.MAX_BASE64_LINE_WIDTH
      -- (76 / 4 * 3 = 57) is the maximum length (in bytes) of each chunk
      -- of data before encoding.
      req := utl_http.begin_request('http://www.some-company.com/image.gif');
      resp := utl_http.get_response(req);
      BEGIN
        LOOP
          utl_http.read_raw(resp, data, demo_mail.MAX_BASE64_LINE_WIDTH);
          demo_mail.write_raw(
            conn    => conn,
            message => utl_encode.base64_encode(data));
        END LOOP;
      EXCEPTION
        WHEN utl_http.end_of_body THEN
          utl_http.end_response(resp);
      END;
      demo_mail.end_attachment( conn => conn );
      demo_mail.attach_text(
        conn      => conn,
        data      => '<h1>This is a HTML report.</h1>',
        mime_type => 'text/html',
        inline    => FALSE,
        filename  => 'report.htm',
        last      => TRUE);
      demo_mail.end_mail( conn => conn );
    END;
    /Edited by: tanging on Dec 18, 2009 10:58 AM

  • How to send a file from FTP to external server

    My requirement is to send a file from FTP to D3(External) server.
    Now I am able to store the file in Appln server.
    I want to send the file created by the program thru FTP to D3 server.
    I know the username,Password,HostID,RFC destination details.
    How to send the file from FTP to D3.
    If u have any program,Plz send it...
    I dont want the function modules name...I want the example code ....
    Thanks in advance.

    Hi Sumi,
    You could do it so that you create a .bat or .cmd script to your server which does your ftp transfer.
    To do this you must use sm69 to create a external operating system command which you can call from FM SXPG_COMMAND_EXECUTE. To SXPG_COMMAND_EXECUTE you the file you need to transfer as a parameter.
    What happens is that your abap program passes the file to windows batch script (.bat .cmd) which will then do the transfer for you.
    Here's a sample of ftp-script for windows:
    echo open IP_ADDRESS_TO_YOUR_SERVER > c:zftp_transfer.ftp
    echo USERNAME>> c:zftp_transfer.ftp
    echo PASSWORD>> c:zftp_transfer.ftp
    echo put YOUR_FILE>> c:zftp_transfer.ftp
    echo quit>> c:zftp_transfer.ftp
    ftp -s:c:zftp_transfer.ftp
    also take a look here for more details:
    http://support.microsoft.com/?kbid=96269
    Ok, this might be a bit trivial but if your server is unix/aix etc.. Instead of using batch script you must do a shell script.
    Regards,
    Ville

  • How to send the file contents in the application server to ftp server

    Hi,
    how to send the file contents in the application server to ftp server.
    regards,
    sree

    Test SAP FTP functions
    DATA: BEGIN OF MTAB_DATA OCCURS 0,
    LINE(132) TYPE C,
    END OF MTAB_DATA.
    DATA: MC_PASSWORD(20) TYPE C,
    MI_KEY TYPE I VALUE 26101957,
    MI_PWD_LEN TYPE I,
    MI_HANDLE TYPE I.
    START-OF-SELECTION.
    MC_PASSWORD = 'password'.
    DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
    *-- FTP_CONNECT requires an encrypted password to work
    CALL 'AB_RFC_X_SCRAMBLE_STRING'
         ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
         ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
         ID 'DSTLEN' FIELD MI_PWD_LEN.
    CALL FUNCTION 'FTP_CONNECT'
         EXPORTING
           USER            = 'userid'
           PASSWORD        = MC_PASSWORD
           HOST            = 'servername'
           RFC_DESTINATION = 'SAPFTP'
         IMPORTING
           HANDLE          = MI_HANDLE
         EXCEPTIONS
           NOT_CONNECTED   = 1
           OTHERS          = 2.
    CHECK SY-SUBRC = 0.
    CALL FUNCTION 'FTP_COMMAND'
         EXPORTING
           HANDLE = MI_HANDLE
           COMMAND = 'dir'
         TABLES
           DATA = MTAB_DATA
         EXCEPTIONS
           TCPIP_ERROR = 1
           COMMAND_ERROR = 2
           DATA_ERROR = 3
           OTHERS = 4.
    IF SY-SUBRC = 0.
      LOOP AT MTAB_DATA.
        WRITE: / MTAB_DATA.
      ENDLOOP.
    ELSE.
    do some error checking.
    ENDIF.
    CALL FUNCTION 'FTP_DISCONNECT'
         EXPORTING
           HANDLE = MI_HANDLE
         EXCEPTIONS
           OTHERS = 1.
    Execute external commands (FTP Scripts)
    The following code shows the syntax of the FM 'SXPG_COMMAND_EXECUTE'. You pass it the external command created within transaction SM69 and it will execute it.
    DATA: ld_comline 
    LIKE sxpgcolist-name,
            ld_param    LIKE sxpgcolist-parameters,
            ld_status   LIKE extcmdexex-status,
            ld_output   LIKE btcxpm OCCURS 0 WITH HEADER LINE,
            ld_subrc    LIKE sy-subrc.
      REFRESH ld_output.
      MOVE 'FTP_DATA_IN' to ld_comline.         "Maintained using trans SM69
    Execute external command, contained in 'ld_comline'
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
           EXPORTING
                commandname                   = ld_comline
              additional_parameters   = ld_param  "Params passed to script
              operatingsystem              
    = 'UNIX'
           IMPORTING
                status                        = ld_status
           TABLES
                exec_protocol                 = ld_output
           EXCEPTIONS
                no_permission
                     = 1
                command_not_found
                 = 2
                parameters_too_long          
    = 3
                security_risk                
    = 4
                wrong_check_call_interface    = 5
                program_start_error           = 6
                program_termination_error     = 7
                x_error                       = 8
                parameter_expected            = 9
                too_many_parameters           = 10
                illegal_command               = 11
                wrong_asynchronous_parameters = 12
                cant_enq_tbtco_entry
              = 13
                jobcount_generation_error
         = 14
                OTHERS                       
    = 15.
      IF sy-subrc NE 0.
      ENDIF.

  • How to extract files from external server

    Dear Friends,
    I need to connect to an external non SAP server, from which i need to extract invoice files.
    Invoice files are of two types:
    1. .dat format files which contain invoice data
    2. .PDF or .JPEG documents, which are supporting documents for those invoice.
    My question are
    1. How do i connect to the external server?
    2. Do i have to do a FTP from SAP to that file server?
    3. Do i have to fetch the .dat file using dataset statments?
    4. What are the basis and network related activities involved to get connected to that external server?
    Any inputs and help on this is highly appreciated and rewarded.
    Thanks,
    Simha

    Hi Simha,
    1. How do i connect to the external server?
    Using  FTP or RFC, BAPI are also possible to get the data from Non SAP server.
    2. Do i have to do a FTP from SAP to that file server?
    based on your company policy use FTP to transfer the data.
    3. Do i have to fetch the .dat file using dataset statments?
        yes. if u using ECC6.0 try this method
    CL_RSAN_UT_APPSERV_FILE_READER=>APPSERVER_FILE_READ
    Reward if found helpful.

  • How to configure IPS 4240 - K9 to send log file to syslog server

    I am looking for the commands in how to configure IPS 4240-k9 to send log file to SYSLOG server. If anybody has or came across similer issue please advice.
    Thanks in advanced.

    Ali -
    I am sorry to tell you, but the Cisco IPS Sensors do not send Syslog messages. Your only options for sending signature event information are:
    SDEE (an TLS Encrypted XML formatted message) the sensor is the SDEE Host and your event receiver (MARS, IME, Intelitactics, etc) is the client.
    SNMP Traps - You need to set the "Action" on each signature you want the sensor to send a trap.
    - Bob

  • Can we send .csv file from sap srm system to sap pi?

    Hi Experts,
    we have 3 options send the data from sap systems to sap pi.i. e.proxy,idoc and rfc only
    How can we send .csv file from sap srm to sap pi?
    Regards,
    Anjan

    Anjan
    As you know SAP SRM and SAP PI are different boxes.
    *_Option 1:_*
    we need a shared AL11 directory in between SAP SRM and SAP PI (Ask basis to setup shared folder). Place / Populate the file in the folder from SAP SRM and then it can be picked through sender file communication channel.
    In this case you (Basis team) will share one folder which is visible from the AL11 transaction of both the systems (SRM and PI). You will drop .csv file using some report or program from SRM at this location and from PI you can read that file using File communication channel (NFS mode).
    Option 2:
    Setup a FTP at SRM environment and expose some folder which can be accessible from PI. Use sender file communication channel at PI end to pick the file.
    You can use this option incase sharing of folder is not possible (due to network / other constrains). Here FTP server is required to expose any folder as FTP so as it can be accessible from internet (remote location). You need to expose some folder at SRM machine.  You will drop .csv file using some report or program from SRM at this location. Now PI can fetch the file from that location using  sender file communication channel (FTP Mode) providing user credentials.
    Hope it clears now.
    Regards
    Raj

  • In adf,how to delete a file generated on server,when the webpage is closed

    Hi,
    I have an application consisting of 2 pages. in the 1st page i will give some input details and when i click on submit, some java code is getting executed in the back. That java code generates a csv file in the server location. after succesful execution of java code, i was redirected to 2nd page. In 2nd page, i am giving option to download and when the user clicked on download button and after the file is downloaded -- in the backend i am deleting the file from the server. Till this point everything is fine. But if the user didnt click on the Download button and instead if he closes the browser, the csv file gets remained on the server itself. This is the issue i am facing .. I am not able to get an idea in ADF Framework, how to delete a file when the browser is closed. Please help me out in this.
    Thanks in advance !!!

    ADF has nothing to do with tracking browser close buttons. What you can do is call a JS function and call the method which deletes the file from within the JS function. ADF has a component for calling java code from JS call.

  • Loading a CSV file to Sql Server

    Hi,
    How can i load a csv file, which is in a shared location itn osql using bods.
    Where can i create the data source pointing to csv file

    Hi,
    Use fileformat to load CSV file into SQL server, below the details
    A file format defines a connection to a file. Therefore, you use a file format to connect to source or target data when the data is stored in a file rather than a database table. The object library stores file format templates that you use to define specific file formats as sources and targets in data flows.
    To work with file formats, perform the following tasks:
    • Create a file format template that defines the structure for a file.
    • Create a specific source or target file format in a data flow. The source or target file format is based on a template and specifies connection information such as the file name.
    File format objects can describe files of the following types:
    • Delimited: Characters such as commas or tabs separate each field.
    • Fixed width: You specify the column width.
    • SAP transport: Use to define data transport objects in SAP application data flows.
    • Unstructured text: Use to read one or more files of unstructured text from a directory.
    • Unstructured binary: Use to read one or more binary documents from a directory.
    More details, refer the designer guide
    http://help.sap.com/businessobject/product_guides/sbods42/en/ds_42_designer_en.pdf

Maybe you are looking for

  • Possible max no. of events in alv

    Hi is there any maximum no of events possible in ALV reporting. i.e. what is the maximum no of events of alv possible in one program.

  • Send a mail with attachment in 9i

    Hi, would you please confirm : in 9i we have UTL_SMTP utility to send a mail . With UTL_SMTP we can not send attached file. If we can , is it possible to have un example code ? Many thanks.

  • Can't open some IDN domain

    Firefox 22 , Windows 7 (64bit) and windows 8 (64 bit) Can't open some IDN domain. Example I can open all of this domain with firefox [http://ไฮดรอลิกไฮโดรลิก.com] , [http://วอลเปเปอร์-ติดผนัง.net] , [http://ลังพลาสติกลังทึบ.com] But I can't open all

  • How do I add a folder to my unsorted bookmarks list into wich I can enter bookmarks?

    I do add bookmarks to the unsorted folder but I would like to place some of them into them into new folders.

  • Background Transparency of a W3D

    OK, I have a program where I need the background of my W3D to be transparent. When I set the DTS to false to make it transparent, it lags enough to worry me. So, I thought since my W3D object contains absolutely no animation, I could just use a bitma