Upload pdf file from frontend to unix server

Hi all,
I want to upload a file from frontend to unix server.
The following coding transfers the file to the unix server. But the file is corrupted.
Any ideas whats wrong?
TYPES: BEGIN OF t_data_tab,
         line TYPE x LENGTH 256,
       END OF t_data_tab.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL METHOD cl_gui_frontend_services=>file_open_dialog
    CHANGING
      file_table = lt_filetable
      rc         = lv_rc.
  READ TABLE lt_filetable INTO p_file INDEX 1.
  lv_filename = p_file.
  CALL METHOD cl_gui_frontend_services=>gui_upload
    EXPORTING
      filename = lv_filename
      filetype = 'BIN'
    CHANGING
      data_tab = lt_data_tab
    EXCEPTIONS
      OTHERS   = 4.
  OPEN DATASET p_unix FOR OUTPUT IN BINARY MODE.
  IF sy-subrc NE 0.
    EXIT.
  ELSE.
    LOOP AT lt_data_tab INTO ls_data_tab.
      TRANSFER ls_data_tab TO p_unix.
      IF sy-subrc NE 0.
        CONTINUE.
      ENDIF.
    ENDLOOP.
    CLOSE DATASET p_unix.
  ENDIF.
regards

Found solution by myself.
Upload
REPORT  z_upload_to_unix.
TYPES: ESP1_BOOLEAN LIKE BAPISTDTYP-BOOLEAN.
DATA: i_ftfront TYPE string,
      i_ftappl LIKE  rcgfiletr-ftappl,
      i_flg_overwrite TYPE  esp1_boolean,
      l_flg_open_error TYPE  esp1_boolean,
      l_os_message TYPE  c.
i_ftfront = '<frontendpath>\test.pdf'.
i_ftappl = '<unixpath>/test.pdf'.
CALL FUNCTION 'C13Z_FILE_UPLOAD_BINARY'
  EXPORTING
    i_file_front_end   = i_ftfront
    i_file_appl        = i_ftappl
    i_file_overwrite   = i_flg_overwrite
  IMPORTING
    e_flg_open_error   = l_flg_open_error
    e_os_message       = l_os_message
  EXCEPTIONS
    fe_file_not_exists = 1
    fe_file_read_error = 2
    ap_no_authority    = 3
    ap_file_open_error = 4
    ap_file_exists     = 5
    OTHERS             = 6.
DOWNLOAD:
REPORT  z_download_from_unix.
TYPES: ESP1_BOOLEAN LIKE BAPISTDTYP-BOOLEAN.
DATA: front TYPE string,
      i_file_appl LIKE rcgfiletr-ftappl,
      i_file_overwrite TYPE  esp1_boolean,
      e_flg_open_error TYPE  esp1_boolean,
      e_os_message TYPE  c.
i_file_appl = '<unixpath>/test.pdf'.
front = '<frontendpath>\test.pdf'.
CALL FUNCTION 'C13Z_FILE_DOWNLOAD_BINARY'
  EXPORTING
    i_file_front_end    = front
    i_file_appl         = i_file_appl
    i_file_overwrite    = i_file_overwrite
  IMPORTING
    e_flg_open_error    = e_flg_open_error
    e_os_message        = e_os_message
  EXCEPTIONS
    fe_file_open_error  = 1
    fe_file_exists      = 2
    fe_file_write_error = 3
    ap_no_authority     = 4
    ap_file_open_error  = 5
    ap_file_empty       = 6
    OTHERS              = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Similar Messages

  • How to upload pdf file from windows cell phone?

    How to upload pdf file from windows cell phone?

    You can do this in steps.. First use the built in method for uploading a file into the flows files object, Next you would copy the file out to an Oracle built directory on your UNIX box using utl_file.put_raw..
    Here is a link to show you how to upload files in an APEX application [http://download.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm]
    And here is a link to show you how to use utl_file.put_raw.. [http://psoug.org/reference/utl_file.html], item is towards the bottom of the screen..
    Thank you,
    Tony Miller
    Webster, TX

  • Hello, How do I tell sql+ to spool output file from windows to Unix server?

    Hello, How do I tell sql+ to spool output file from windows to Unix server?
    I am new to SQL+ and just learned how to spool the file. But file is saved in my local windows enviroment and since it's 2GB in size...I want to spool it directly to another remote unix server.
    Pls answer in detail... I have been to most of the thread and didn't see relevant answer to above question.
    Am I suppose to develope some script which FTP the spool file directly to the server I want to
    or
    i Have to use UTL_FILE Package ?
    Thanks for reply

    You may not be able to...
    SQL*Plus can only spool to the local machine. If you have mapped a directory on the Unix server from your Windows machine, you can specify that directory in your SPOOL command.
    You could telnet to the Unix server, run SQL*Plus there, and spool the file to a local (Unix) directory.
    If the Unix server is also the Oracle database server, you could use the UTL_FILE package rather than using SQL*Plus to spool a file.
    If the Unix server is also an FTP server, you could also FTP the file from your local machine to the server.
    Of course, I would tend to re-examine a requirement to regularly generate a 2 GB text file. It seems likely that there is a better way...
    Justin

  • How to move PDF file from Spool to Application Server?

    How to move PDF file from Spool to Application Server?
    Cannot use RSTXPDFT4 because that converts OTF to PDF and the file is already PDF.
    RSTXPDFT5 doesn't work. It picks the file up and assigns it a 'text' type and outputs a 1 line txt (1kb in size) on the server with the spool number in it!
    The program which outputs the file to the spool, in the first place, uses adobe forms and outputs to a printer of type PDF.

    Hi Gemini ,
    Please refer the below links.
    [http://sap.ittoolbox.com/groups/technical-functional/sap-hr/convert-a-spool-to-pdf-and-save-on-application-server-in-background-720959]
    [http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15]
    Edited by: Prasath Arivazhagan on Apr 13, 2010 4:48 PM

  • Firefox 7.0 - Can not upload the file from local machine to server...gives "error 404 : file not found"

    firefox 7.0 - Can not upload the file from local machine to server...gives "error 404 : file not found"

    you have not understood my point
    how does this code will run on servlet when I want to upload a file from client's
    machine to server machine
    what I am doing is I am giving an option to the user that he/she can browse the file and then select any file and finally it's action is post in the jsp form for which I have sent the code
    All the computers are connected in LAN
    So how to upload a file from client's machine to server's machine
    Plz give me a solution

  • Uploading PDF-file from unix to SAP internal table

    Hi,
    i have to write an abap that sends a pdf-file from a unix (SAP server) by mail to some people.
    The mailing part is done, but for creating the attachment. I'm reading the pdf-file into an internal table (in a binary way). Then i'm using this int.table to send the mail.
    The email is sent with an attachment, but i cannot open the pdf-file because of an error ( file damaged ). So before sending it by mail, i'm downloading the pdf file to my pc by using WS_DOWNLOAD with the same internal table. The download file gives the same error.
    If i look at the size :
    - originally pdf file 71743 bytes
    - resulting pdf file 71665 bytes (281 lines x 255)
    The creation of the internal table is as follows :
    open dataset g_file for input in binary mode.
      check sy-subrc eq 0.
      do.
    *    read dataset g_file MAXIMUM LENGTH 255 into wa_pdf.
        read dataset g_file into wa_pdf.
        if sy-subrc ne 0. exit. endif.
        append wa_pdf_hex to i_pdf.
      enddo.
      close dataset g_file.
    where:
    types:  tt_pdf  type table of soli,   "raw 255 long
    data: i_pdf type tt_pdf,
             wa_pdf like line of i_pdf
    Is there a better way to read in the pdf-file ? Any suggestions ?
    regards,
    Hans
    [email protected]

    Hello Hans,
    this is a little example from a program to send mail with picture. The problem is the same
    form p_create_mail tables itab_html.
      data : object_hd_change like sood1 occurs 0 with header line,
             objpara          like selc  occurs 0 with header line,
             receivers        like soos1 occurs 0 with header line,
             packing_list     like soxpl occurs 0 with header line,
             fic_attach       like soli  occurs 0 with header line,
             struct_user_adress like usaddress ,
             v_file(80) type c ,
             v_buff(255) type c ,
             v_num(9) type n,
             v_length type i ,
             v_total_length type i,
             v_len(9) type n.
      move : 'HTM'  to object_hd_change-file_ext ,
             'PIOU' to object_hd_change-objdes.
      append object_hd_change.
    * Find email addr for the username.
      loop at s_bname.
        call function 'SUSR_USER_READ'
          exporting
            user_name                  = s_bname-low
          importing
            user_address               = struct_user_adress
          exceptions
            user_name_not_exists       = 1
            internal_error             = 2
            others                     = 3.
        select single smtp_addr
               into receivers-recextnam
               from adr6
               where addrnumber eq struct_user_adress-addrnumber
               and   persnumber eq struct_user_adress-persnumber.
        if sy-subrc eq space.
          move 'U' to receivers-recesc.
          append receivers.
        endif.
      endloop.
    * Get the picture.
      move '/sap_interfaces/D27/pzr_00/data/test/logopharma.gif'
           to v_file.
      open dataset v_file for input in binary mode.
      do.
        read dataset v_file into v_buff length v_length.
        v_total_length = v_length + v_total_length.
        move v_buff+0(v_length) to fic_attach-line+0(v_length).
        append fic_attach.
        if sy-subrc ne space.
          exit.
        endif.
      enddo.
      describe table fic_attach lines v_num.
      describe field fic_attach-line length v_len.
      move : 'Logo' to packing_list-objdes ,
             'Logo' to packing_list-objnam ,
             '1'    to packing_list-body_start ,
             'raw'  to packing_list-objtp ,
             'GIF'  to packing_list-file_ext .
      packing_list-body_num = v_num.
      packing_list-objlen   =  v_num * v_len.
      append packing_list.
    * Send mail.
      call function 'SO_OBJECT_SEND'
           exporting
               object_hd_change           = object_hd_change
               object_type                = 'RAW'
               owner                      = sy-uname
           tables
               objcont                    = itab_html
               objpara                    = objpara
               receivers                  = receivers
               packing_list               = packing_list
               att_cont                   = fic_attach
           exceptions
               others                     = 01.
    endform.                     " P_CREATE_MAIL.
    Regards
    Frédéric

  • To upload a file from client machine to server machine

    Hi everybody!
    Could anyone plz help me. I am struck in a problem
    I want to transfer a file from client's machine to server but I am not able to upload
    It is tranferring the file only to the local machine
    I am using orielley package It is transferring files only to my local machine but not to the server .Can anyone correct it. It's very urgent
    how to write the relative path for server
    I am using this path and it is not uploading
    MultipartRequest multi = new MultipartRequest(request, "../<administrator>:<dev2daask>@dev2:C:/123data/", 5 * 1024 * 1024);
    Here is my code:
    <%@ page import="java.util.*" %>
    <%@ page import="javax.servlet.*" %>
    <%@ page import="javax.servlet.http.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="com.oreilly.servlet.MultipartRequest"%>
    <%
    try {
    // Blindly take it on faith this is a multipart/form-data request
    // Construct a MultipartRequest to help read the information.
    // Pass in the request, a directory to saves files to, and the
    // maximum POST size we should attempt to handle.
    // Here we (rudely) write to the server root and impose 5 Meg limit.
    MultipartRequest multi = new MultipartRequest(request, "../<administrator>:<dev2daask>@dev2:C:/123data/", 5 * 1024 * 1024);
    out.println("<HTML>");
    out.println("<HEAD><TITLE>UploadTest</TITLE></HEAD>");
    out.println("<BODY>");
    out.println("<H1>UploadTest</H1>");
    // Print the parameters we received
    out.println("<H3>Params:</H3>");
    out.println("<PRE>");
    Enumeration params = multi.getParameterNames();
    while (params.hasMoreElements()) {
    String name = (String)params.nextElement();
    String value = multi.getParameter(name);
    out.println(name + " = " + value);
    out.println("</PRE>");
    // Show which files we received
    out.println("<H3>Files:</H3>");
    out.println("<PRE>");
    Enumeration files = multi.getFileNames();
    while (files.hasMoreElements()) {
    String name = (String)files.nextElement();
    String filename = multi.getFilesystemName(name);
    String type = multi.getContentType(name);
    File f = multi.getFile(name);
    out.println("name: " + name);
    out.println("filename: " + filename);
    out.println("type: " + type);
    if (f != null) {
    out.println("length: " + f.length());
    out.println();
    out.println("</PRE>");
    catch (Exception e) {
    out.println("<PRE>");
    out.println("</PRE>");
    out.println("</BODY></HTML>");
    %>

    you have not understood my point
    how does this code will run on servlet when I want to upload a file from client's
    machine to server machine
    what I am doing is I am giving an option to the user that he/she can browse the file and then select any file and finally it's action is post in the jsp form for which I have sent the code
    All the computers are connected in LAN
    So how to upload a file from client's machine to server's machine
    Plz give me a solution

  • Help please to Upload a file from my PC to server's KM

    Hello:
    I can't Upload correctly a file from my local PC to a KM of the server.
    My problem is after that I've uploaded any file from my PC to KM, sometimes when I open or download it from the KM appears blank, and when I try another way to write the file (out.write()) I've uploaded a bad file that can't be downloaded or opened it. I can't get the file Data of the file for uploading, I need to set it with the fileResource (I tried with fileResource.read(false))
    I use a FileUpload in my view.
    <b>My Context:</b>
    File (node)
         |----fileResource  (com.sap.ide.webdynpro.uielementdefinitions.Resource)
         |----fileData  (binary)   
         |----fileName  (String)
    wdDoInit(){
         IPrivateUploadDownloadKMView.IFileElement fileBind = wdContext.createFileElement();
         wdContext.nodeFile().bind(fileBind);
         IWDAttributeInfo attInfo = wdContext.nodeFile().getNodeInfo().getAttribute("fileData");
         ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
    onActionSubir(){
          IPrivateUploadDownloadKMView.IFileElement fileElement = wdContext.currentFileElement();
          IWDResource resource = fileElement.getFileResource();
          fileElement.setFileName(resource.getResourceName());
          fileElement.setFileData(fileData);
          byte[] fileData=new byte[resource.read(false).available()];
          fileElement.setFileData(fileData);
          fileName = fileElement.getFileName();
         try{               
               File file = new File(fileName);
               FileOutputStream out = new FileOutputStream(file);
               out.write(fileElement.getFileData());
               out.close();
               fin = new FileInputStream(fileName);
               fin.read();
               Content content = new Content(fin,null, -1);
                IResource newResource = folder.createResource(fileElement.getFileName(),null, content);
          catch(Exception e){
                 IWDMessageManager mm = wdControllerAPI.getComponent().getMessageManager();
                 mm.reportWarning("error: "+e.getMessage());
    Can you help me?, any sugestions to solve my problem or improve my code?
    Regards
    Jonatan.

    If you have got the permission to access <b>content management</b> in portal appliction server consle,then click on content management >select the KM Repository and clik on it.Then right click on <b>folder</b>>new-->upload.After clicking the upload option one page will be open and then you can browse your local file and upload to the KM Repository.

  • Upload PDF file from SAP Portal and save in SAP

    A file in PDF format needs to be uploaded from SAP Portal and the file is to be saved in SAP. Request for help, how to do the same. What are the FM to be used etc..
    Thanks,

    hi
    Use FM  GUI_UPLOAD with file type as BIN
    there are similar threads...pls refer to them for more details:
    https://www.sdn.sap.com/irj/sdn/profile?userid=3166533
    Upload pdf file to SAP
    PDF File
    reward if helpful
    regards,
    madhu

  • How can I upload .pdf file from Mac to iPhone or is there an app for that?

    How can I upload a .pdf file from my mac to iPhone 3G?
    Or is there an app that will allow me to that?
    Thanks in advance
    Zia

    The app called "Air Sharing" allows you to do that. Connect to a wifi network, run the program and you can mount your iphone as a drive using Finder. Upload all the PDFs you like, and you can open them from within the Air Sharing app. Also, you can view most image files, most office files, etc.

  • I am trying to upload my PDF file from my IBooks but its only giving me the option to upload from my pictures/gallery. How do I get it to where I can upload PDF files from my iBook or how do I transfer my PDF files to my pics?

    I am trying to upload my PDF file from my iBooks but its only giving me the option to upload from my pictures/gallery. How do I get it so I can upload from my iBooks or move my PDF files to my gallery so I can upload it?

    I'm having the same issue. I saved a PDF from an email into iBooks. I'm on apple applying for a job but the only option the upload button has is from the Photos file. How ironic right? Luckily I'm in Logistics and not an IT specialist applying for this job! Lol. Does anyone know the fix?

  • Interface Mngr: Option for Uploading file from presentation or unix server

    Hi all,
      I want to upload file through interface manager where the file can be on the presentaion server or the unix server. How do i achieve the same? I need to create parameters for 'Filename' and 'Unix Filename'. Either of the 2 will be chosen at a time. But how do i retrieve the respective file?

    Hi!
    For handling a file on the apllication server (unix), you have to use the OPEN DATASET, CLOSE DATASET commands.
    For handling the files on the presentation server (local PC), you have to use the upload/download method (GUI_UPLOAD, GUI_DOWNLOAD function elements).
    You can make 2 parameters in your ABAP program like this:
    PARAMETERS: p_f_app LIKE rlgrap-filename.
    PARAMETERS: p_f_pre LIKE rlgrap-filename.
    both is filled - error
    IF NOT p_f_app IS INITIAL AND
    NOT p_f_pre IS INITIAL.
    MESSAGE E001(ZERROR).
    ENDIF.
    both is empty - error
    IF p_f_app IS INITIAL AND
    p_f_pre IS INITIAL.
    MESSAGE E002(ZERROR).
    ENDIF.
    IF NOT p_f_app IS INITIAL.   "application server
    open dataset...
    ENDIF.
    IF NOT p_f_pre IS INITIAL.   "presentation server
    call function 'gui_upload'...
    ENDIF.
    Regards
    Tamá

  • Read the pdf file from the Third party server.

    hi all,
    we got the requirement that we have to display the salary statement and form16 in the portal.
    we are not using the sap for the pay roll.
    pay roll will run by the third party....they will keep all salary slips in the one folder under the server.
    so from the third party server we have to get the salary statement in to our application......third party will storing the file with salcode.pdf.
    can you help me to resolve this?
    Thanks in advance
    swapna

    Hi yugedhar,
    thank you for the reply.
    the pdf files will be available in one common folder , with in the server only.
    so i have to implement the code to download the file from the one particular location based on the name of the file
    (means if  file name =Login id that has to open)
    so can you help me implement this logic .
    Thank you
    swapna

  • Problem in uploading a file from JSP to SQL server

    Hi,
    I am using jspsmart ( www.jspsmart.com)to upload a file in a database.
    The problem is that when I am going to download the file and display in the browser, I got the file spoiled by other text on it, in a case of word file I get at the beginning the 'Content-Disposition' and some other strange txt staff, plus my document.
    I don't know in what direction investigate.
    Thanks in advance
    Leonardo

    Perhaps you could try anothers components :
    UploadBean + Download4J :
    http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html
    http://www.javazoom.net/jzservlets/download4j/download4j.html

  • Write blob data from database to unix server

    Hi all,
    I need to send the attachment file into the mail. I have a header form in which I have implemented Download/Upload functionality using Apex user guide. When ever a user fill all the entries and submit the form then some field information along with attachment I need to send to the user.
    I mean when ever user hit the submit button it should take blob data from my custom table tmp_downlod_files and send to the user as an attachment.
    I have searched the post and got lot information but not able to get succeed.
    I have implemented java stored procedure for sending automatic mail when user is submitting the form but what I need is to take blob content from database and send as an attachment.
    1: So I need to write blob content from custom table to unix server in some location and from there I need to attach that file.
    2: the java store which I have implemented for sending automatic mail is working and one argument is attachment which I am passing null for now. So mail is working how to write the file from database to unix server and send as an attachment.
    What I did for writing file from database to unix server:
    1:
    CREATE OR REPLACE PROCEDURE trx_blob_to_file (l_header_id IN NUMBER)
    IS
    BEGIN
    FOR rec_picture IN (SELECT ID
    FROM TMP.tpx_download_files
    WHERE header_id = l_header_id
    AND mime_type LIKE ('image' || '%'))
    LOOP
    DECLARE
    l_out_file UTL_FILE.file_type;
    l_buffer RAW (32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    l_blob_len INTEGER;
    p_data BLOB;
    file_name VARCHAR2 (256);
    BEGIN
    SELECT blob_content, filename
    INTO p_data, file_name
    FROM tpx_download_files
    WHERE ID = rec_picture.ID;
    l_blob_len := DBMS_LOB.getlength (p_data);
    l_out_file :=
    UTL_FILE.fopen ('/home/oracle/interfaces/out/upld',
    file_name,
    'wb',
    32767
    WHILE l_pos < l_blob_len
    LOOP
    DBMS_LOB.READ (p_data, l_amount, l_pos, l_buffer);
    IF l_buffer IS NOT NULL
    THEN
    UTL_FILE.put_raw (l_out_file, l_buffer, TRUE);
    END IF;
    l_pos := l_pos + l_amount;
    END LOOP;
    UTL_FILE.fclose (l_out_file);
    EXCEPTION
    WHEN OTHERS
    THEN
    IF UTL_FILE.is_open (l_out_file)
    THEN
    UTL_FILE.fclose (l_out_file);
    END IF;
    END;
    END LOOP;
    END;
    2: I have written a PL/SQL process and calling the above procedure on SUBMIT:
    DECLARE
    l_header_id NUMBER;
    l_filename VARCHAR2 (200);
    BEGIN
    SELECT header_id, filename
    INTO l_header_id, l_filename
    FROM tpx_download_files
    WHERE header_id = :p35_sr_header_id;
    trx_blob_to_file (l_header_id);
    END;
    But it is not writing the file from database to unix server.
    If I can get how to make working to write file from database to unix server then I will hopefully can send an attachment.
    3; I have given
    GRANT EXECUTE ON TPX_BLOB_TO_FILE TO PUBLIC.
    And
    GRANT EXECUTE ON UTL_FILE TO PUBLIC.
    Where I am doing wroung can anyone guide me or any other approach is appreciated.
    I am already late so I need soon. Please help.

    Hi all,
    I need to send the attachment file into the mail. I have a header form in which I have implemented Download/Upload functionality using Apex user guide. When ever a user fill all the entries and submit the form then some field information along with attachment I need to send to the user.
    I mean when ever user hit the submit button it should take blob data from my custom table tmp_downlod_files and send to the user as an attachment.
    I have searched the post and got lot information but not able to get succeed.
    I have implemented java stored procedure for sending automatic mail when user is submitting the form but what I need is to take blob content from database and send as an attachment.
    1: So I need to write blob content from custom table to unix server in some location and from there I need to attach that file.
    2: the java store which I have implemented for sending automatic mail is working and one argument is attachment which I am passing null for now. So mail is working how to write the file from database to unix server and send as an attachment.
    What I did for writing file from database to unix server:
    1:
    CREATE OR REPLACE PROCEDURE trx_blob_to_file (l_header_id IN NUMBER)
    IS
    BEGIN
    FOR rec_picture IN (SELECT ID
    FROM TMP.tpx_download_files
    WHERE header_id = l_header_id
    AND mime_type LIKE ('image' || '%'))
    LOOP
    DECLARE
    l_out_file UTL_FILE.file_type;
    l_buffer RAW (32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    l_blob_len INTEGER;
    p_data BLOB;
    file_name VARCHAR2 (256);
    BEGIN
    SELECT blob_content, filename
    INTO p_data, file_name
    FROM tpx_download_files
    WHERE ID = rec_picture.ID;
    l_blob_len := DBMS_LOB.getlength (p_data);
    l_out_file :=
    UTL_FILE.fopen ('/home/oracle/interfaces/out/upld',
    file_name,
    'wb',
    32767
    WHILE l_pos < l_blob_len
    LOOP
    DBMS_LOB.READ (p_data, l_amount, l_pos, l_buffer);
    IF l_buffer IS NOT NULL
    THEN
    UTL_FILE.put_raw (l_out_file, l_buffer, TRUE);
    END IF;
    l_pos := l_pos + l_amount;
    END LOOP;
    UTL_FILE.fclose (l_out_file);
    EXCEPTION
    WHEN OTHERS
    THEN
    IF UTL_FILE.is_open (l_out_file)
    THEN
    UTL_FILE.fclose (l_out_file);
    END IF;
    END;
    END LOOP;
    END;
    2: I have written a PL/SQL process and calling the above procedure on SUBMIT:
    DECLARE
    l_header_id NUMBER;
    l_filename VARCHAR2 (200);
    BEGIN
    SELECT header_id, filename
    INTO l_header_id, l_filename
    FROM tpx_download_files
    WHERE header_id = :p35_sr_header_id;
    trx_blob_to_file (l_header_id);
    END;
    But it is not writing the file from database to unix server.
    If I can get how to make working to write file from database to unix server then I will hopefully can send an attachment.
    3; I have given
    GRANT EXECUTE ON TPX_BLOB_TO_FILE TO PUBLIC.
    And
    GRANT EXECUTE ON UTL_FILE TO PUBLIC.
    Where I am doing wroung can anyone guide me or any other approach is appreciated.
    I am already late so I need soon. Please help.

Maybe you are looking for

  • Problem installing oracle 8.1.5 as local database, Help me!

    Hello, my friends! I've been having problems with the connection to oracle 8.1.5 via ODBC. Does Exist any way to install a protocol that no requieres a net like TCP, SPX. I have a pc in my house and I'm not in a networking, so when i configure a tnsn

  • Macbook Air with Xbox HD-DVD?

    Hi, I would like to buy a MBA to replace my 4-year-old iBook. Just wondering if I could use the Xbox HD-DVD drive to install software and restore OS on MBA? If it works, then it will save me $100 bucks for the MBA superdrive. Thank you very much!!

  • How to submit POST data to a JSP in iFrame

    Hi, We are accessing a JSP from the iFrame from a web collaborator product ( TIBCO PortalBuilder) . I have an iFrame where I display the application whose startup page is a JSP. I pass the userid using get method in the iFrame URL but there is a secu

  • New MX922 Photo Quality is Poor. Have tried different photo paper nothing helps.

    My new MX922 photo quality is terrible. Have tried different photo paper stock same results. Have tried several photos checking my setting for the best quality print. My Pixma 640 prints photos just fine. Trying to sell it but, may have too hold onto

  • Russian keyboard & writing in Russian

    How does one write in Russian on Palm Pre? Post relates to: Pre p100eww (Sprint)