How to open PDF doc on LinkToAction event

Hello,
I have a linktoaction UI element. I want to open a PDF file which is in my mime folder when I click it.
Please help...
Regards,
Sridhar Karra.

Thxs for your help.... Raja
But here the code that will help you open PDF files....
  DATA : lv_object_id(40) TYPE c VALUE 'DCA24C262A1F82F18331005056AA0110'.
" This is the logical ID for the PDF uploaded in the Mime folder of your WDA
  DATA : lv_io TYPE skwf_io.
  DATA : lit_data TYPE sdokcntbins.
  DATA : lv_lang TYPE sy-langu VALUE 'E'.
  DATA lv_filesize TYPE i.
  DATA lv_buffer TYPE mime_data.
  lv_io-objtype = 'L'.
  lv_io-class = 'M_APP_L'.
  lv_io-objid = lv_object_id.
  CALL METHOD cl_wb_mime_repository=>load_mime
    EXPORTING
      io              = lv_io
   check_authority = ' '
    IMPORTING
   docname         =
   description     =
   filename        =
     filesize        = lv_filesize
      bin_data        =  lit_data
   mimetype        =
    CHANGING
      language        = lv_lang
    EXCEPTIONS
      no_io           = 1
      illegal_io_type = 2
      not_found       = 3
      error_occured   = 4
      OTHERS          = 5
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
    EXPORTING
      input_length       = lv_filesize
  FIRST_LINE         = 0
  LAST_LINE          = 0
   IMPORTING
     buffer             = lv_buffer
    TABLES
      binary_tab         = lit_data
EXCEPTIONS
  FAILED             = 1
  OTHERS             = 2
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  cl_wd_runtime_services=>attach_file_to_response(
  EXPORTING
  i_filename = 'WebHelp.pdf'
  i_content = lv_buffer
  i_mime_type = 'application/pdf'
  i_in_new_window = abap_true

Similar Messages

  • Opening PDF docs using ipad3

    using an ipad3. need to know how to open PDF docs to view at websites. thanks

    thanks for trying. it didn't work. when I'm on the internet using safari I cannot open a PDF doc. I have no problem opening docs in my email. only when using safari on the internet. there must me someone else out there that has experienced this problem and can explain what I need to do.
    thanks.
    Sent from my iPad

  • How do I open pdf docs in Safari 5.1.5?  Online suggestions have not worked.

    How do I open pdf docs in Safari 5.1.5?  Online suggestions have not worked.

    Back up all data.
    In the Finder, select Go ▹ Go to Folder... from the menu bar, or press the key combinationshift-command-G. Copy the line of text below into the box that opens, and pressreturn:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari.
    If you still have the issue, repeat the above steps using this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • How to open pdf or word doc or notpad file in flex

    hai friends,
           how to open pdf or word doc or notpad file in flex. i am doing flexcoldfusion project. now i reterive data(notpad or worddoc or pdf file path) from database using coldfusion.now i want to open that file content .if i reterive notpad file .that will show in notpad. if it is possible. give example.
    regards,
    welcomecanv

    Hi WelcomeCan,
    Try this...
    var urlRequest:URLRequest = new URLRequest();
        urlRequest.url = "http://www.yourdomain.com/notepad.txt";
        //urlRequest.url = "http://www.yourdomain.com/FlexComp.pdf";
        navigateToURL(urlRequest,_blank);
    Thanks,
    Bhasker Chari

  • I am using Endorange as my main mail, but every time i wannt to send open pdf docement as e-mail my computer comes up with other mail softwere called mail, how do I chance that?

    I am using Endorange as my main mail, but every time i wannt to send open pdf docement as e-mail my computer comes up with other mail softwere called mail, how do I chance that?

    I am using Endorange as my main mail, but every time i wannt to send open pdf docement as e-mail my computer comes up with other mail softwere called mail, how do I chance that?

  • After i changed the setting in application tab in options : open pdf doc by adobe by default, the "Ask" window still pop up every time. How to fix this ?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/913026]]</blockquote>
    after i changed the setting in application tab in options : open pdf doc by adobe by default, the "Ask" window still pop up every time. How to fix this ?

    How do I fix this problem ...javascript (cid) applications.

  • How to open pdf files in browser using flex

    hi,
    my project is having a Document explorer wchich contains pdf
    files,iwant to open it in the browser.can any one tell me how to
    open pdf documents using flex programming(i tried with different
    thing like swf's but my client wants only pdf formatt).

    Another option is by calling a JSP page. This example will
    open a pdf file into a new browser without displaying the download
    "save" prompt.
    Function to call the JSP:
    private function downloadFlyer(event:Event):void {
    var jspLink:URLRequest = new
    URLRequest("jsp/downloadpdf.jsp?fileName=Fundraiser_flyer_2008.pdf");
    navigateToURL( jspLink, "_blank" );
    JSP code:
    <%@ page errorPage="error.jsp" %>
    <%@ page import="java.io.*" %>
    <%
    //Get the parameters
    String downloadFileName=request.getParameter("fileName");
    String fileName = application.getRealPath("/downloads/" +
    downloadFileName);
    File file = new File(fileName);
    if (!file.exists()) {
    throw new IOException("File does not exist.");
    // Get the size of the file
    long length = file.length();
    // You cannot create an array using a long type.
    // It needs to be an int type.
    // Before converting to an int type, check
    // to ensure that file is not larger than Integer.MAX_VALUE.
    if (length > Integer.MAX_VALUE) {
    throw new IOException("File too big.");
    response.reset();
    response.resetBuffer();
    response.setContentType( "application/pdf" );
    response.setHeader ("Content-Disposition", "filename=" +
    downloadFileName);
    //Prevent the Java error: "getOutputStream() has already
    been called for this response"
    out.clear();
    out = pageContext.pushBody();
    InputStream in = new FileInputStream(file);
    OutputStream output = response.getOutputStream();
    try {
    int curByte=-1;
    while( (curByte=in.read()) !=-1){
    output.write(curByte);
    } catch (IOException ioe) {
    ioe.printStackTrace(System.out);
    } finally{
    output.flush();
    in.close();
    response.flushBuffer();
    %>

  • Downloaded Adobe 9 -- Using Word 2007 to open PDF doc (Error Msg)

    I just updated to Adobe 9 and am getting this signature error message when trying to open a pdf doc from MicroSoft Word 2007:  appname: acrord32.exe appver: 9.3.0.148 ModName: acrord32dll ModVer: 9.3.0.148 Offset: 001937fa
    Am not able to get beyond the error msg. 
    Help anyone?

    I have MicroSoft Word Office 2007.
    I recently upgraded from Adobe 8.1 to 9.3.  Now, I can no longer open pdf docs.
    I am getting an error that says: "Adobe Reader 9.3 (or 8.1) has encountered a problem and needs to close."
    I have uninstalled 9.3 and reinstalled.  I have uninstalled 9.3 and reinstalled 8.1.  I have gone back to 9.3.
    I have run 2008 Advanced Registry Optimizer.
    The error signature when trying to open a pdf file w/ either Adobe Reader (9.3 or 8.1) is this:
    AppName acrord exe AppVer: 9.3.0148 ModName: acrord32.dll ModVer: 9.3.0.148 Offset: 0019371a.
    How do I get back to opening pdf docs??

  • I have been able to open PDF docs using C# API Process.Start("Full_path_To_the_PDF_File") in windows 7 or windows 8 with all previous versions of Acrobat32 reader.

    I have been able to open PDF docs using C# API Process.Start("Full_path_To_the_PDF_File") in windows 7 or windows 8 with all previous versions of Acrobat32 reader.
    However, with v11.0, the same command, in Windows 8, it does not open the PDF document. I can see the Acrobat(32) started in the task manager, but the document does open. Not sure how I can troble shoot this problem. Any help would be appreciated.

    I haven't use the C# API but I imagine it is the same as C ShellExecute. Which in turn is the same thing (in essence) as double clicking in Windows Explorer.
    So... does Adobe Reader run normally on this machine?
    And does it start and open if you double click on a PDF file?

  • I don't know how to store PDF docs in my iBook library ... can anyone help ?  ?  ?

    I don't know how to store PDF docs in my iBook library ... can anyone help ?  ?  ?

    What I have been doing is exporting documents to PDF's on my PC in Open Office and emial them to myself. I create a lot of ads, fliers and other content on my PC then transfer the content to my iPad though email. I have yet to find a PDF that I cannot choose to open in iBooks which automatically saves it in my library.

  • TS1702 Safari has just stopped opening PDF docs, it shows the message that I get on my PC when the server is unavailable etc.  Foxbrowser opens them fine.  Thanks  I.M.

    Safari has just stopped opening PDF docs, it shows the message that I get on my PC when the server is unavailable etc.  Foxbrowser opens them fine.  Thanks  I.M.

    Hello kmanthie,
    I just sent you a private message. If you are not sure how to check your forum messages, this post has instructions.
    I worked on behalf of HP.

  • How to Secure pdf doc individual computerwise or individual mobilewise.

    How to Secure pdf doc individual computer-wise or individual mobile-wise.

    Could you, please, elaborate on your question. I do not understand it. Be as verbose and specific as you can. Describe what it is that you need to accomplish. Do you mean encryption? Do you mean access? Do you want to encrypt in such a way that a PDF can be opened only on a specific computer or mobile device?

  • TX Unable to open PDF docs

    message ~ memory cache is full, please soft reset.  No change, still unable to open PDF docs.  How do I clear memory cache or is PDF reader defective?   
    Post relates to: Palm TX

    Adobe for Palm is an ancient program that requires you to convert the raw PDF files on your desktop before you can sync them on a PalmOS device.  Are you using the converter program from Adobe?
    I gave up on this program a long time ago, and switched to the freeware "PalmPDF" available on freewarepalm.com.  You can put raw PDF's on an SD card and they can be read by the program with no conversion necessary!
    Wyrenut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • How to open -pdf in a secure environment

    Opening PDF files from a secured account on Internet (e.g. telephone billing info) does not work. in Safe as the file is shown as _pdf (underscore instead of dot).  We suspect this problem started after installing CS6, but are not sure. Win 7, IE 9, Reader XI

    PDF on a regular website can be opened and downloaded. However, PDF on a secure website (https) looks normal with normal icon but double click gives screen for open / save / save as. ‘Open’ gives no result, no error message either. ‘Save’ or ‘save as’ shows screen with filename ending on _pdf, which cannot be opened or saved, no error messages either. Changing the filename into .pdf gives the same reaction: nothing happens, no error messages.
    The same files can be opened on a different PC win7, IE9, Reader XI and similar software, but without CS6.
    Van: Pat Willener [email protected]
    Verzonden: 3 november 2012 5:19
    Aan: EllyHo
    Onderwerp: how to open -pdf in a secure environment
    Re: how to open -pdf in a secure environment
    created by Pat Willener <http://forums.adobe.com/people/pwillener>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/4820274#4820274

  • I have had a trial version of Acrobat X1 Pro - I have decided not to buy at this stage - for some time it has been conflicting with opening PDF docs after saving as from word 2007 - I uninstalled Pro X1 and now when I save as from word 2007 to PDF it will

    Can anyone help with this - do I have to uninstall Reader and then reinstall?

    I have had a trial version of Acrobat X1 Pro - I have decided not to buy at this stage - for some time it has been conflicting with opening PDF docs after "saving as" from word 2007 - I uninstalled Pro X1 and now when I "save as" PDF from word 2007 to PDF it will save the document as a PDF but will not open the document to display after publishing - I have to got to where the file has been saved to view the new PDF document - this is really annoying - do I have to delete adobe reader and reinstall it - adobe needs to look at this conflict with acrobat pro as I have even gone it to properties and tried to have adobe reader as the default PDF program - the main issue is that I cannot view the PDF after publishing it from word 2007

Maybe you are looking for

  • How to display  LONG TEXT STRING in Module Pool Screen ?

    Hi Experts, I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string. I want to display it

  • Table name which stores teh vendor Email id

    Hi ,   Can any body tell me the table name, where i can find the email id of the vendor.I found one structure, SZA1_D0100 where the email id is stored. but as it is of structure i cannot use that in my report. Could any body help me regaridng the iss

  • Ola_42

    Trouble printing to PDF. Purchased and loaded Acrobat X1 Standard on Windows 7 computer. Message on trying to print to a PDF in micorsoft word and other programs is: 'Unable to find adobe PDF resource files'. When i look in appdata\roaming\adobe\adob

  • Gantt Chart in Webdynpro Java

    Hi All, I want to display the Gantt Chart in my Application. I am using following as a reference: [http://help.sap.com/saphelp_nw04/helpdata/en/c6/af11b1423a3c4fb642e357912936e4/frameset.htm] But i am unable to get the Bars in my Chart. I am just get

  • HR Transaction data

    Hi, We are implementing SAP BI for HR module. After going through various business documents i came to know that everything that all data stored in ECC is master data. To perform analysis in BI we require transaction data which are KF. How do we conv