Open a pdf file located on Application Server from forms 10g

Dear all,
I want to open a pdf file which is stored in a folder on Application Server.
I have the following codes but could not be able to open the file.
1. host('rundll32 url.dll,FileProtocolHandler C:\REP012.pdf');
in this code I mentioned the path on local machine which is okey.
but the question is that how to open the file which is located in a folder on application server?
the following code don't show and file or error:
host('rundll32 url.dll,FileProtocolHandler /EMS/MANUALS/ACC001.PDF');
This is the file on Application Server not on local machine.
2. web.show_document('//EMS/MANUALS/ACC001.PDF/','_blank');
This give HTTP 404 NOT FOUND error
I think the problem is in path, how to mention the path of my Application Server file?
Regards:
Muhammad Nadeem

Hi,
Did you find a solution to this?
We are running into the same problem where we need to open a file present on the application server (path /opt/webapps/applications/ISL/)
When we try this from the local machine it works (path D:/forms) however it does not work while trying to open it from the application server.
Regards,
Pooja

Similar Messages

  • Default file location when calling report from Forms 10G

    I've tried this in the reports forum, but it applies equally to forms I guess..
    Hi,
    I've managed to put together a routine for running a report from a 10G Form. In 6i I specified a "relative path" to my report name as follows:-
    "Run_Product(REPORTS, '..\Reports\myreportname', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL); "
    In 10G I would like to just specify the report name, rather than the full file path. Can I specify a relative file path - or alternatively can I set the default report location in a configuration file?
    At the moment I'm having to specify something like:
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,
    'c:\oracle\systemname\reports\myreportname.RDF');
    I would like to just have:
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,
    'myreportname.RDF');
    Many thanks,
    Keith.

    Do you run your application on an application server?
    If so you should use the REPORTS_PATH environment variable (in windows registry entry).
    Alternatively you could use an environmentid in the reports.conf-file:
    <server version="10.1.2.0.2">
    <environment id="YOURID">
    <envVariable name="REPORTS_PATH" value="C:\......"/>
    </environment>
    You call the report with the parameter &envid=YOURID in the URL.

  • Save PDF-file on the application server

    Hello experts,
    I convert my Smartform to a PDF-File. I copied the code from  Suresh Kumar Parvathaneni (REPORT zsuresh_test). At first, thank you Suresh Kumar for that!
    Now, I would like to save the PDF-File on the application server and not local.
    Could you tell me how to do this. Especially, where do I have to put the abap-code in the given code from Suresh Kumar.
    I thank you very much for your help in advance.
    With kind regards.
    gokselin

    Hi,
    You can use the OPEN DATASET statment.
    Probably you must be having an output table which you are downloading to the local machine.You can use the same and loop at it. and if the OPEN dataset returned sy-subrc 0, use the TRANSFER statment.
    Remember the data will be binary for pdf. So you have to open the dataset in binary mode.
    regards,
    Advait

  • Download PDF File to SAP Application Server

    Hi,
    I need to download the PDF file to SAP Application Server. Can any one please help me to Solve this Issue?
    Thanks in Advance,
    Kannan

    You can read and upload the file to the PC:
    report ztest.
    data: begin of itab occurs 0,
            field(256),
          end   of itab.
    data: dsn(100) value '/usr/sap/xfr/FIS/testpdf',
          length  like sy-tabix,
          lengthn like sy-tabix.
    call function 'GUI_UPLOAD'
         exporting
              filename   = 'c:temptest.pdf'
              filetype   = 'BIN'
         importing
              filelength = length
         tables
              data_tab   = itab.
    open dataset dsn for output in binary mode.
    loop at itab.
      transfer itab-field to dsn.
    endloop.
    close dataset dsn.
    clear   itab.
    refresh itab.
    open dataset dsn for input in binary mode.
    do.
      read dataset dsn into itab-field.
      if sy-subrc = 0.
        append itab.
      else.
        exit.
      endif.
    enddo.
    call function 'GUI_DOWNLOAD'
         exporting
              filename     = 'c:temptestn.pdf'
              filetype     = 'BIN'
              bin_filesize = length
         importing
              filelength   = lengthn
         tables
              data_tab     = itab.
    Rob

  • My reader will not open a PDF file that I have downloaded from a government web site (an application form) - it states that the file is not good.  I can open on the web site but not from my mac computer

    My reader will not open a PDF file that I have downloaded from a government web site (an application form) - it states that the file is not good.  I can open on the web site but not from my mac computer.

    Maybe this: http://helpx.adobe.com/acrobat/kb/pdf-error-1015-11001-update.html ?
    Do you have a link to that document?

  • Error while accessing a file located in the server from JSP

              Hi
              I am having problem while accessing the file located in the server from a JSP
              page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
              The same code is working if the jsp placd under defaultwebApp directory and not
              working if i create a war and deploy the same.
              I am using weblogic server 7.0 trail version.I am setting the context path also.
              Can any help me in this regard.
              Thank And Regards
              Anand Mohan
              

              Hi
              Thank you.Is there a way to read a file which is existing in the war file.
              Regards
              Anand Mohan
              "Wenjin Zhang" <[email protected]> wrote:
              >
              >In Weblogic, if your files are archived in a WAR, you cannot get an entry
              >as individual
              >file since it is only bytes in a large archive file. So getRealPath will
              >give
              >you null result. If you only want the path, try to use other getXXXPath,
              >getURL,
              >or getURI method. If you want to read the content, use getResource.
              >
              >
              >"Anand" <[email protected]> wrote:
              >>
              >>Hi
              >>I am having problem while accessing the file located in the server from
              >>a JSP
              >>page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
              >>
              >>The same code is working if the jsp placd under defaultwebApp directory
              >>and not
              >>working if i create a war and deploy the same.
              >>
              >>I am using weblogic server 7.0 trail version.I am setting the context
              >>path also.
              >>
              >>Can any help me in this regard.
              >>
              >>Thank And Regards
              >>
              >>Anand Mohan
              >
              

  • Open a PDF file located in a network folder in WD ABAP application

    Hello,
    I need to open a PDF file in my Web Dynpro ABAP application:
    1) The PDF file is located in a shared folder (e.g.
    host\files\file.pdf)
    2) If I build an ALV table in my application and create a linktourl element that opens the following path "file://host/files/file.pdf" I have success
    3) Now, instead of having the linktourl element in my table I want to have a button that saves the pdf located in
    host\files\file.pdf to the user's local PC and then opens the PDF
    Do you know if this is possible?
    Can you explain me how to do it?
    Thanks in advance.
    Kind regards,
    Ricardo

    Hi Ricardo.
    Use below method to save file to your local system.
    Instead of using link to URL, use link to action.
    LV_FILENAME = 'FIlename.pdf'.
    LV_MIMETYPE = 'pdf'.
    CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE(
              EXPORTING I_FILENAME = LV_FILENAME
                        I_CONTENT  = LV_CONTENT
                        I_MIME_TYPE = LV_CTYPE
                        I_IN_NEW_WINDOW = ABAP_TRUE ).
    thanks,
    vidyasagar

  • Regarding the uploading the pdf file to the application server

    hi,
    iam getting this error while uploading the pdf file to the applicatioin server.
    "There was an error while trying to parse an image"
    to convert smartform into PDF file we ll use convert_otf FM.
    If see that FM data ll be stored in it_tline structure ok.
    For sending to application server we ll use
    OPEN DATASET p_arch for OUTPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
      LOOP AT it_tline.
      TRANSFER it_tline to p_arch.
      ENDLOOP.
      CLOSE DATASET p_arch.
    Ok
    For getting data from internal table we ll use
    OPEN DATASET p_arch FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS
    do.
      READ DATASET p_arch INTO it_tline.
      if sy-subrc = 0.
        APPEND it_tline.
        ELSE .
          exit.
          endif.
      enddo.
    CLOSE DATASET p_arch.
          LOOP AT it_tline.
        TRANSLATE it_tline USING '~'.
        CONCATENATE wa_buffer it_tline INTO wa_buffer.
      ENDLOOP.
      TRANSLATE wa_buffer USING '~'.
      DO.
        i_record = wa_buffer.
        APPEND i_record.
        SHIFT wa_buffer LEFT BY 255 PLACES.
        IF wa_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Attachment
      REFRESH:
        i_reclist,
        i_objtxt,
        i_objbin,
        i_objpack.
      CLEAR wa_objhead.
      i_objbin[] = i_record[].
    Create Message Body
    Title and Description
      i_objtxt = 'COMMERCIAL INVOICE'.
      APPEND i_objtxt.
      DESCRIBE TABLE i_objtxt LINES v_lines_txt.
      READ TABLE i_objtxt INDEX v_lines_txt.
      wa_doc_chng-obj_name   = 'COMMERCIAL INVOICE'.
      wa_doc_chng-expiry_dat = sy-datum + 10.
      wa_doc_chng-obj_descr  = 'COMMERCIAL INVOICE'.
      wa_doc_chng-sensitivty = 'F'.
      wa_doc_chng-doc_size   = v_lines_txt * 255.
      CLEAR i_objpack-transf_bin.
      i_objpack-head_start = 1.
      i_objpack-head_num   = 0.
      i_objpack-body_start = 1.
      i_objpack-body_num   = v_lines_txt.
      i_objpack-doc_type   = 'RAW'.
      APPEND i_objpack.
    Attachment
    (pdf-Attachment)
      i_objpack-transf_bin = 'X'.
      i_objpack-head_start = 1.
      i_objpack-head_num   = 0.
      i_objpack-body_start = 1.
      DESCRIBE TABLE i_objbin LINES v_lines_bin.
      READ TABLE i_objbin INDEX v_lines_bin.
      i_objpack-doc_size =  v_lines_bin * 255 .
      i_objpack-body_num  = v_lines_bin.
      i_objpack-doc_type  = 'PDF'.
      i_objpack-obj_name  = 'COMMERCIAL INVOICE'.
      i_objpack-obj_descr = 'COMMERCIAL INVOICE'.
      APPEND i_objpack.
    BREAK-POINT.
      IF it_adr6[] IS NOT INITIAL.
        LOOP AT it_adr6 INTO wa_adr6.
          CLEAR i_reclist.
          i_reclist-receiver = wa_adr6-smtp_addr.
          i_reclist-rec_type = 'U'.
          i_reclist-com_type = 'INT'.
          APPEND i_reclist.
        ENDLOOP.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data = wa_doc_chng
            put_in_outbox = 'X'
          TABLES
            packing_list  = i_objpack
            object_header = wa_objhead
            contents_bin  = i_objbin
            contents_txt  = i_objtxt
            receivers     = i_reclist.
      ENDIF.
    The above error I am getting.
    Please give your suggestions
    Thanks in advance

    U can use this code
    Reward if useful
    REPORT  ZMN_PDF_UPLOAD.
    data: begin of itab occurs 0,
    field(256),
    end of itab.
    data: dsn(100) value '\usr\sap\DEV\DVEBMGS00\work\testpdf',
    length like sy-tabix,
    lengthn like sy-tabix.
    call function 'GUI_UPLOAD'
    exporting
    filename = 'c:\temp\test.pdf'
    filetype = 'BIN'
    importing
    filelength = length
    tables
    data_tab = itab.
    open dataset dsn for output in binary mode.
    loop at itab.
    transfer itab-field to dsn.
    endloop.
    close dataset dsn.
    clear itab.
    refresh itab.
    *To crosscheck if it went well
    open dataset dsn for input in binary mode.
    do.
    read dataset dsn into itab-field.
    if sy-subrc = 0.
    append itab.
    else.
    exit.
    endif.
    enddo.
    call function 'GUI_DOWNLOAD'
    exporting
    filename = 'c:\temp\testn.pdf'
    filetype = 'BIN'
    bin_filesize = length
    importing
    filelength = lengthn
    tables
    data_tab = itab.
    *Or
    *Use the TCode
    *CG3Z or CG3Y
    *for downloading to Application Server.

  • Excel file located in application server to be uploaded

    Hello friends,
                 Please tell me what are the steps to be followed while uploading the data from a file in EXCEL format located in application server in to SAP data base using BDC.
    Thanks in advance,
    Ram.

    declarations:
    DATA:IT_EXCEL LIKE TABLE OF ALSMEX_TABLINE WITH HEADER LINE.
    I guess u r familiar with notepad upload.....just use your declaration as it is. Below is a basic demonstration of uploading data from excel...reward if useful.
    Excel file Locating.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
    PARAMETERS: P_FILE TYPE LOCALFILE OBLIGATORY .
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          STATIC    = 'X'
        CHANGING
          FILE_NAME = P_FILE.
    Check whether the uploaded fiel is excel or not
    AT SELECTION-SCREEN ON P_FILE.
      WK_LEN = P_FILE.
      CONDENSE WK_LEN NO-GAPS.
      LENT = STRLEN( WK_LEN ).
      WK_ALP = LENT - 4.
      B = WK_LEN+WK_ALP(LENT).
      IF ( B NE '.xls' AND B NE '.XLS' ).
        MESSAGE E939.
        CLEAR P_FILE.
        STOP.
      ENDIF.
    START-OF-SELECTION.
    do all the othre process here
    PERFORM FETCH_FROM_FLAT_FILE.
    store the values to your normal itab and the process.
    LOOP AT IT_EXCEL.
        CASE IT_EXCEL-COL.
          WHEN '0001'.
            MOVE: IT_EXCEL-VALUE TO RECORD1-MATNR_005.
          WHEN '0002'.
            MOVE: IT_EXCEL-VALUE TO WK_WERKS.
          WHEN '0003'.
            MOVE: IT_EXCEL-VALUE TO RECORD1-BUDAT_002.
          WHEN '0004'.
            MOVE: IT_EXCEL-VALUE TO RECORD1-BKTXT_004.
          WHEN '0005'.
            MOVE: IT_EXCEL-VALUE TO RECORD1-ERFMG_007.
          WHEN '0006'.
            MOVE: IT_EXCEL-VALUE TO RECORD1-ERFMG_008.
        ENDCASE.
        AT END OF ROW.
          APPEND RECORD1.
          CLEAR RECORD1.
        ENDAT.
      ENDLOOP.
    **Here record1 is the internal table holding the data fetched from excel
    end-of-selection.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME                = P_FILE
          I_BEGIN_COL             = 1 "From 1st Column
          I_BEGIN_ROW             = 2 "From 2nd row
          I_END_COL               = 6 "Till 6th Column
          I_END_ROW               = 65536 "Till Row
        TABLES
          INTERN                  = IT_EXCEL
        EXCEPTIONS
          INCONSISTENT_PARAMETERS = 1
          UPLOAD_OLE              = 2
          OTHERS                  = 3.
      CLEAR IT_EXCEL.
      DESCRIBE TABLE IT_EXCEL.
      IF SY-TFILL = 0.
        MESSAGE I937.
        STOP.
      ENDIF.

  • Open a pdf file with Acrobat Reader/Pro from a https site using ie

    Hi!
    I somehow don't manage to open a pdf file directly with Acrobat Reader/Pro when trying to open it from a https site and using ie8.
    With http sites everything works just fine.
    Are there any settings to enable this with https sites?
    Greetings
    Laura

    Reader is a different product
    http://forums.adobe.com/community/adobe_reader_forums

  • How to connect to SQL Server from Forms 10g?

    Hello all,
    How do we connect to SQL Server database from Forms 10g?
    In Oracle Metalink site they have suggested using Transparent Gateway for SQL Server as a solution.
    But is there a way we can connect directly to SQL Server from Forms using an ODBC connection
    without installing anything on the database server?
    Pls help!
    Regards,
    Sam

    Hello all,
    I was able to connect to SQL Server from Oracle using Generic Connectivity (HSODBC).
    Transparent gateway was not required.
    Followed metalink note 109730.1
    So, after I created a dblink to SQL Server, I created a synonym for the dblinked SQL Server table.
    When I used the synonym as the table source in Oracle Forms, I got the following error while querying.
    "ORA-02070 - ROWID is not supported in this context."
    This is because Forms has an invisible ROWID field and when data is fetched from SQL Server table
    no Rowid is fetched since SQL Server table doesn't have one.
    Is there a way to overcome this issue or do we have populate the block manually using a SQL query ?
    Pls suggest.
    Regards,
    Sam

  • PDF file write to application server

    Hi All,
    I want to write PDF file to application server while downloading its writing but in this manner
    %PDF-1.6#%####
    108 0 obj#<</First 17/Length 108/Filter/FlateDecode/N 3/Type/ObjStm>>stream
    xڲT0P04Q07W05#2,#ll##K#J*#R#C####Sbq#[^##GjNYjIfr##SN##kr~Jf#~xf#c^q&##Ҧ##agG#a####X###T##XR### ##b#
    Please let me know where i am doing wrong.
    Please see below my code .
    (the scenario is when i download the pdf file i want to write the same file in to app server )
      call function fm_name
        exporting
          /1bcdwb/docparams  = fp_docparams "
          ls_header          = ls_waste
          lt_item            = gt_rkpf
          aufnr              = lv_aufnr
        importing
          /1bcdwb/formoutput = fp_formoutput
        exceptions
          usage_error        = 1
          system_error       = 2
          internal_error     = 3
          others             = 4.
    concatenate 'D:\temp\PROCESSORDER_' ls_waste-rsnum   '.PDF' into lv_file.
        pr_file = lv_file.
      open dataset pr_file for output in binary mode."text mode encoding  NON-UNICODE.
      if sy-subrc  0.
        exit.
      endif.
      transfer fp_formoutput-pdf  to pr_file.
      close dataset pr_file.
      clear :fp_formoutput-pdf,lv_file.
    Please any one help me thanks,
    Thanks,
    Kumar

    You can't tranfer the whole PDF data with just one transfer statement, instead you have to loop that table and transfer the data to the file until you reach the last row.
      open dataset pr_file for output in binary mode."text mode encoding  NON-UNICODE.
      if sy-subrc  0.
        exit.
      endif.
      loop at fp_formoutput-pdf  *****************
        transfer fp_formoutput-pdf  to pr_file.
      endloop.
      close dataset pr_file.
      clear :fp_formoutput-pdf,lv_file.

  • Upload the doc , pdf  file presentation to application server

    When upload file from presentaion to application server other then text
    file data is corruption in wed dynpro application using the UI element
    of UPLOAD. we used the code in custom application when we checked in
    T.Code : 'AL11'. only text file is showing file other then text file
    data is showing as corrupt.
    code:
    elem_sel_opt_1->get_attribute(
    EXPORTING
    name = 'DATASOURCE'
    IMPORTING
    value = gd_data ).
    CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    EXPORTING
    in_xstring = gd_data
    IMPORTING
    out_string = gd_filedata.
    SPLIT gd_filedata AT cl_abap_char_utilities=>newline INTO TABLE
    ist_data.
    Opening the File
    OPEN DATASET gd_file_appl IN TEXT MODE FOR OUTPUT ENCODING DEFAULT. IF sy-subrc NE 0.
    WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
    EXIT.
    ENDIF.
    Transferring Data
    LOOP AT ist_data INTO wa_data.
    TRANSFER wa_data TO gd_file_appl.
    ENDLOOP.
    Closing the File
    CLOSE DATASET gd_file_appl.
    is it problem with my code. is it problem with UI element.
    for file uploading the prasentation server to appliation.
    we try with binary mode also
    Regards
    Praveen Chetpally.

    You can't tranfer the whole PDF data with just one transfer statement, instead you have to loop that table and transfer the data to the file until you reach the last row.
      open dataset pr_file for output in binary mode."text mode encoding  NON-UNICODE.
      if sy-subrc  0.
        exit.
      endif.
      loop at fp_formoutput-pdf  *****************
        transfer fp_formoutput-pdf  to pr_file.
      endloop.
      close dataset pr_file.
      clear :fp_formoutput-pdf,lv_file.

  • How can I upload a pdf file into the application server?

    Hi,
    I have the otf data, which i have converted into pdf using the funcation module "Convert_otf". Is it possible to upload the pdf file in application server?

    Dear Srishti,
    Use OPEN DATASET in BINARY MODE.
    following link will help you.
    http://scn.sap.com/thread/1480434
    thanks,
    vidyasagar

  • Unale to print pdf files in oracle application server using oracle forms

    Hi
    We are using oracle developer suite 10g(10.1.2.3.0) in Windows vista. (test environment)
    Oracle application server 10g(10.1.2.3.0) in Hp-UX 11iv3 (production environment)
    We are able to print pdf files in test environment from oracle forms using the below command:
    host('/usr/bin/lp -d p9775hplaser '||'/ashome/output/'||:print_file);
    But while declaring to the live environment it is not working
    host('cat '||:pdf_print_file||' | acroread -toPostScript | /usr/bin/lp -dp9775hplaser');
    but when the above command is put in hp-ux cmd prompt it is workinh"'cat '||:pdf_print_file||' | acroread -toPostScript | /usr/bin/lp -dp9775hplaser'";
    Kind ly tell me whether the problem i with the host command and some other command is available for printing files from forms.

    Here is my guess:
    declare
    AppID PLS_INTEGER;
    begin
    AppID := DDE.App_Begin('acroread -toPostScript '||file name,DDE.APP_MODE_MINIMIZED);
    end;

Maybe you are looking for