Display a document pdf in an external window (WD ABAP)

Hi all,
I have an application <u><b>Web dynpro Abap</b></u> and it adds articles in a alv component that it is a purchase basket.
This alv has a user function what opens a document pdf (interactiveForm)
that shows the lines of the order. I would like that this pdf be displayed in an <b>external window</b>, and it was  independent of the window of alv of the purchase basket.
This is possible. If it is possible, how can I do it?
Regards,
Ana

hi
good
go through these links, which ll help you to give a clear idea about creating of the external window.
http://help.sap.com/saphelp_nw04s/helpdata/en/0f/134540631d6f13e10000000a1550b0/content.htm
thanks
mrutyun^

Similar Messages

  • Open PDF in New External Window

    Hi
    how to open a PDF Report(File) in new IE Window from WebdynproJava
    Regards
    Dhinakar

    Hi,
             If the PDF document is in the server then we can show that in the external window onClick of the button.
    Write this code in the onAction button event.
    try
    byte[] content =this.getByteArrayFromResourcePath("<server path>\Guide.pdf");
    String stResourcePath = new String("<server path>\Guide.pdf");
    IWDCachedWebResource resource = WDWebResource.getWebResource(content, WDWebResourceType.PDF);
    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.getAbsoluteURL()," document");
    window.removeWindowFeature(WDWindowFeature.TOOL_BAR);
    window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
    window.removeWindowFeature(WDWindowFeature.STATUS_BAR);
    window.open();
    catch(WDURLException ex)
    catch(IOException ex)
    Paste this code here:
    //@@begin others
    private byte[] getByteArrayFromResourcePath(String resourcePath) throws FileNotFoundException, IOException
           FileInputStream in = new FileInputStream(new File(resourcePath));
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         int len;
         byte[] part = new byte[10 * 1024];
         while ((len = in.read(part)) != -1)
                   out.write(part, 0, len);
                   in.close();
                   return out.toByteArray();
       //@@end
    Regards,
    Vijai

  • Generate PDF into New External window

    Hi All,
    I have developped an application.In that I am getting the data from R/3.In my application first View displays table of data and the table row contain some invoice information when I click that Row that information would be displayed as PDFform(created using interactiveforms) in an External window.
    Any body have done same or any suggessions please.
    Advance Thanks
    Mandapati.

    Hi Mandapati,
    I am afraid, the InteractiveFrom ui element can only be used to display a pdf on the view is resides. It is not possible to display the same view of the same session within another browser at the same time.
    Therefore, you cannot use InteractiveForm ui element, but you could generate a PDF using the API Heidi refers to. The pdf can be stored inside of the cache of the application server or could be retrieved by special self-implemented handler in ICF. If I am not mistaken, there exists some information on doing something like this inside of the BSP forum as I know that it is part of Brian McKellar's und Thomas Jung's BSP book. My advise would be to search for a weblog or inside of the BSP forum (or to buy the book g). Of course, all the above only applies if you use Web Dynpro ABAP.
    Best regards,
    Thomas

  • Pdf link dont work if document open in separate Acrobat window in internet explorer

    Hi,
    We have many pdf with different links between this pdf. The link type is "Open a file".
    - If the fist pdf document is open from hard drive this links works perfectly.
    - If the pdf document is open from the web site (http://website/doc1.pdf) and adobe reader is configured to open pdf in internet explorer it work also.
    - But if the reader is configured to open pdf in a external window this link dont work. The link try to open the second pdf in c://Internet Temporary Folder/ as root instead of http://website/
    Does anyone know a workaround ? I don't know if my customers have configured the reader to open in internet explorer or in a external windows...
    Thanks for help !

    If web browser integration is turned off, it really is turned off.
    Adobe Reader simply becomes a "helper" application. The browser
    downloads the file, puts it somewhere, and runs Adobe Reader. Adobe
    Reader is not told anything special about the file and its origins, so
    it cannot know that this was (before the download) a web file, or
    where it came from.
    A URL link might be the answer.
    Aandi Inston

  • Open PDF in external window within browser?

    My company's line of business app (we're an insurance agency) depends on the browser plugin to display PDF's that are attached to customer accounts.  Unfortunately, the app displays the PDF in a small window that cannot be resized and requests to the software vendor to find another way to handle PDF's have been virtually ignored.  To get around this, we've been disabling "Display PDF in browser" to force PDF's to open in the full Reader program.  As luck would have it, at least one agency we do business with requires the browser plugin, otherwise it assumes we have no PDF program and asks the user to download Adobe Reader.  So we have people constantly going back & forth, disabling and enabling the browser plugin.  I looked at the SDK and there's a sample plugin to open a PDF in an external window.  I loaded it up in Visual Studio and built the project, but it appears to not be working (maybe it's strictly for Acrobat).  It would be awesome if there could be a button on the toolbar to open the PDF externally when you open it in a browser.  Any ideas we can try?  This image gives you an idea of what my end users are looking at.

    This offer Adobe doc http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf States that you can use '&'  instead of the '#'.
    Timo

  • How to use the AVMenuItemExecute() with an External Window

    Hello,
    I'm trying to use the AVMenuItemExecute() function in an External window. I mean that I have an opened document in another window (using AVDocOpenFromASFileWithParams or a function like that).
    Actually the problem is that the AVMenuItemExecute() is executed on the Acrobat windows which is emplty in my case because I open the PDF file in another window.
    Do you know whether it's possible or not? Whethet it's possible how can I do that?
    Thanks in advance,
    Joël

    joeln3 wrote:
    Thanks Leonard.
    Actually I want to use all MenuItem so it's not a good way to do this.
    I know it's possible using IAC but I have another problem with IAC. IAC allows to show the PDF file in an external window and to use the ExecuteMenuItem(). But in my case a PDF file is already open before starting IAC. So when I use the ExecuteMenuItem() function this is on my first Acrobat window that the action is launched. Indeed the document opens with IAC is not in an Acrobat window.
    Regards,
    Joël
    Actually it's not possible with IAC.  While IAC does allow you to open a PDF in an external window, and it does allow you to ExecuteMenuItem(), as Leonard explained you CAN NOT ExecuteMenuItem() on the PDF in your external window.  The reason for this is simple - in your external window, the menu items to execute do not exist as the menu only loads inside Acrobat/Reader.
    ExecuteMenuItem() doesn't simply replace having menu items and call the internal code associated with that menu item.  It literally executes that menu item.  So if the menu doesn't exist, it can't execute anything.

  • How to display interactive PDF  form in an external window?

    Hi Gurus,
    I have developped an application which involves interactive form . Now I want to display the pdf generated through the interactive form in an external window.
    Please guide me how to goahead.
    Thanks
    Nageswara.

    Hi Francois Gendebien ,
    Thanks for ur reply.
           But I have created Pdf in new window(by using window instance) but That window does not contain minimise and maximise and close button.
    Is there any suggessions to add these Options to created new window pdf form
    I am  strucking over here .
    Please help me out.
    Thanks
    Mandapati

  • Create new external window and displays the viewdata as pdf?

    Hi,
    I have developped an application that will display some textviews and one table that displays 5 records,
    for this I want display as new External window and dispay in PDF the data what we have in view.
    advise me how to approach for external window and diplay as PDF.
    Thanks,
    Lohi.
    Message was edited by:
            Lohitha M

    Thanks for your reply,
    Here my problem is now I am getting the table values as output in the Jsp.
    In Jsp I want to create Button when I click that button I need to display an external window and display the table data what ever is available that will display new external pdf.
    I have developped the applcation by using of the three files table.java,tablebean.java,table.jsp and in portalapp.xml cretated the component.
    Now  how can I perform my action in that existed Jsp page and how to display extenal window i that how to generate the PDF.
    I am in learning stage in this.
    please elobarate with atleast some snippests.
    Thanks,
    Lohi.
    Message was edited by:
            Lohitha M

  • Displaying PDF in new Browser window

    Hi all,
    I have a question about displaying a invoices in pdf format in a new window. I read several threads about this, but I haven't been able to solve my problem.
    I'm using following code:
    append the pdf to the response
      cl_wd_runtime_services=>attach_file_to_response(
        i_filename  = 'test.pdf'
        i_content   = lx_pdf
        i_mime_type = 'application/pdf'
        i_in_new_window = ' X'
        i_inplace       = 'X' ).
    The content (lx_pdf) is retrieved from a smartform, via the function module for the smartform in question, after which I convert the OTF Data (JOB_OUTPUT_INFO-OTFDATA) to XSTRING using FM SCMS_TEXT_TO_XSTRING. The returned data (buffer of type xstring) I use for afore mentioned method. But all I get to see is the following:
    //XHPLJIIID    0700 00000000001
    IN04EZZ_MO_SMARTFORM_TEST
    IN05TEST_PAGE_1
    OPDINA4   P 144  240 1683811906000010000100001
    IN06MAIN
    IN06TEXT_TEST1
    MT0168902156
    CP11000000E
    FCCOURIER 120  00144 SF001SF001110000144E
    UL +0000000000000
    CT00000000
    ST0590441This is a text page for displaying PDF in a
    MT0168902396
    ST0547238new window
    MT0168902636
    ST0460832called from within a WD application
    MT0168902876
    ST0144010Application
    EP
    The text is correct, but it is not displayed as PDF in new window, and of course I'm not interested in all the formatting codes in front of every line??
    I should be possible to display a pdf in a new browser window without having installed everything needed for Adobe Interactive forms, or isn't it??
    Kind regards,
    Micky.

    Hi Micky.
    If you have the spool number of the printed billing document you can use
    component WDK_SPOOL_TO_PDF in order to display spool as PDF.
    Just transfer spool number and format to default inbound start up plug.
    Cheers,
    Sascha

  • Display pdf in a new Window in a JSPDynPage

    I need to display the pdf in a new window on click of a button in the iview. The pdf is fetched as an array of bytes from an RFC. It displays correctly, but in the same window. Pls see the extract of the code:
    To Write
    writeText(IPortalComponentRequest request, IPortalComponentResponse response, byte[] pdfResult)
    try{
    Document doc = new Document(PageSize.A4);
    javax.servlet.http.HttpServletResponse myResponse = request.getServletResponse(true);
    myResponse.setHeader ("ContentDisposition", "inline;filename=\"ShortCV.pdf\"");
    myResponse.setContentType("application/pdf");
    OutputStream os = myResponse.getOutputStream();
    os.write(pdfResult);
    PdfWriter.getInstance(doc,os);
    catch(Exception Ex){
    OnView(Event evt){
    JCO.Field Table1 = m_function.getExportParameterList().getField("PDF_STRING");
    client.execute(m_function);
    writeText(request, response, Table1.getByteArray());
    onView is called on
    Button myButton11 = new Button("myButton11");
    myButton11.setText("View");
    myButton11.setOnClick("View");
    myButton11.render(rendererContext);
    Pls advice

    Detlev .....
    I am still not able to implement your suggested solution.
    If I call javascript written in JSP, will I be able to pass a bean to it. Pls see the code that I hv in addition to the one posted ...
    In ICellRenderer ....
    if ( column == 11 )
    Button myButton11 = new Button("myButton11");
    myButton11.setText("View");
    myButton11.setOnClientClick("Test("beantv2")");
    In JSP
    <script>
    function Test(zBean)
    popAssetWinSpecs = "left=250,top=250,width=300,height=300,scrollbars=no,toolbar=no,menubar=no,resizable=no,status=no,titlebar=no,location=no";
    htmlfile="/irj/servlet/prt/portal/prtroot/AIPLetters.HersheyTeamViewerAIPPDF?zBean="+zBean;
    window.open(htmlfile,"editWindow",popAssetWinSpecs);
    return false;
    </script>
    in the doInitialization of the second comp
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    IPortalComponentContext compcontext = request.getComponentContext();
    AIPBean = new HersheyTeamViewerAIPBean();
    HttpServletRequest zHttpRequest = request.getServletRequest();
    AIPBean = (HersheyTeamViewerAIPBean)zHttpRequest.getAttribute("zBean");
    nothing gets executed ....
    I am not sure whether I am passing the bean correctly
    Thanks for your help,
    Devina

  • Display pdf in a new window

    I need to display the pdf in a new window on click of a button in the iview. The pdf is fetched as an array of bytes from an RFC. It displays correctly, but in the same window. Pls see the extract of the code:
    To Write
    writeText(IPortalComponentRequest request, IPortalComponentResponse response, byte[] pdfResult)
    try{
    Document doc = new Document(PageSize.A4);
    javax.servlet.http.HttpServletResponse myResponse = request.getServletResponse(true);
    myResponse.setHeader ("ContentDisposition", "inline;filename=\"ShortCV.pdf\"");
    myResponse.setContentType("application/pdf");
    OutputStream os = myResponse.getOutputStream();
    os.write(pdfResult);
    PdfWriter.getInstance(doc,os);
    catch(Exception Ex){
    OnView(Event evt){
    JCO.Field Table1 = m_function.getExportParameterList().getField("PDF_STRING");
    client.execute(m_function);
    writeText(request, response, Table1.getByteArray());
    onView is called on
    Button myButton11 = new Button("myButton11");
    myButton11.setText("View");
    myButton11.setOnClick("View");
    myButton11.render(rendererContext);
    Pls advice

    See Display pdf in a new Window in a JSPDynPage

  • Surface Pro 3 Display/Video/Graphics Driver Issues - DisplayPort, External Monitors, Windows 10 Build 9926

    Surface Pro 3 - i5 with Intel HD Graphics 4400
    Windows 10 build 9926
    All Latest updates installed
    Intel Graphics Driver 10.18.15.4079.
    Latest system update released on Jan 22nd (which I understand is just the latest intel graphics driver?). 
    The display driver status has this error message: Windows has stopped this device because it
    has reported problems. (Code 43)  - I assume it's
    reverting to the basic Microsoft driver when this occurs. Which explains why my displayport (External monitors) will not work.
    I have uninstalled the driver completely (and deleted the driver files), tried the Windows basic driver,
    and rebooted several times with no luck.
    I cannot get my docking station displayport or the  displayporton my surface pro 3 working. 
    According to Microsoft (see below), this is a known issue UNTIL you update to display driver
    version 4079  - which I have.  
    Known issues on Surface after updating to Windows 10 January Technical Preview
    On Surface Pro 2 and Surface Pro 3, the Mini DisplayPort won’t work on the Windows 10 January Technical Preview until you’ve installed graphics driver 4079 or later. Check Windows Update often for the most recent graphics driver.
    On Surface Pro 2 and Surface Pro 3, you’ll notice poor graphics rendering on the Windows 10 January Technical Preview until you’ve installed graphics driver 4079 or newer from Windows Update. Check Windows Update often for the most recent graphics driver.
    If you’re using video driver 3496, you may need to start in safe mode and remove that driver. Then restart Surface in normal mode and go to Windows Update to get the most recent graphics driver.

    Hi Nicholas,
    Similar issue has been asked here:
    Surface Pro 3 restarting after a series of blank screens!
    For error code 43, here is a reference:
    Code 43: Windows has stopped this device because it has reported problems
    For the current situation, please try to wait for the driver update, as display driver version 4079 didn't work well at your side, please submit this through Windows Feedback Tool.
    Best regards
    Michael Shao
    TechNet Community Support

  • Displaying XML Document in new browser window

    Hi,
    I have a hyperlink on my page. When I click on it, it will open a new IE window and display xml document.
    The new window is displaying some of the xml and at the end displaying the following:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    End element was missing the character '>'. Error processing resource 'http://localhost:28080/benchmark/faces/displayXMLDocu...
    However, I cut and paste the xml String where I write it to the HTTPServletResponse to XMLSPY and it displays correctly.
    Please let me know.
    Rgrds

    Here are the steps:
    1. I created page1 that has a hyperlink.
    2. Hyperlink property are set to display page2 in a new window. (popup).
    3. page2.prerender() method, I set the response to the following:
    public void prerender() {
    javax.faces.context.ExternalContext ec = this.getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ec.getResponse();
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.setHeader("Cache-Control","must-revalidate");
    response.setHeader("Cache-Control","max-age=0");
    response.setHeader("Pragma","no-cache");
    response.setHeader("Expires","0");
    response.setContentType("text/xml");
    response.setBufferSize(5000);
    String xmlString = getRequestBean1().getBookingPnrDetailsXML();
    try{
    xmlString="<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><test1>this is a test</test1><victor>Hello Victor</victor></root>";
    PrintWriter out = new PrintWriter(response.getOutputStream());
    log(xmlString);
    out.print(xmlString);
    }catch(IOException io){
    System.out.println("" + io.getMessage());
    io.printStackTrace();
    4.page2.jsp code is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/xml;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view/>
    <ui:page binding="#{displayXMLDocument.page1}" id="page1"/>
    <ui:html binding="#{displayXMLDocument.html1}" id="html1"/>
    <ui:head binding="#{displayXMLDocument.head1}" id="head1"/>
    <ui:link binding="#{displayXMLDocument.link1}" id="link1"/>
    <ui:body binding="#{displayXMLDocument.body1}" id="body1"/>
    <ui:form binding="#{displayXMLDocument.form1}" id="form1"/>
    </jsp:root>
    please let me know.
    Rgrds.

  • Open PDF's in new window in document library when using "Find a file" search

    I need to be able to open PDF's in a new window from a document library when using the "Find a file" search built into the document library "All documents" view. I currently have the following javascript on the page:
    _spBodyOnLoadFunctionNames.push("setTargetBlank()");
    function setTargetBlank()
    { $("a[href$='.pdf']").removeAttr('onclick').attr("target", "_blank");
    This works great when going to the document library and navigating through the folders then clicking on a link.
    The problem is when someone goes to the document library then uses the "Find a file" search and then they click on a link. The "Find a file" search does not do a postback (reload) of the page, therefore my javascript to find the PDF links
    and make them open in a new window does not run for the links on the page.
    I have read the following article but this does not seem to offer a solution that will work in this situation for SharePoint 2013 (Office 365): http://social.technet.microsoft.com/Forums/sharepoint/en-US/7ad3224c-3165-47ae-95bc-4f3928e2f9a8/opening-document-library-pdf-in-a-new-window-sharepoint-2013?forum=sharepointgeneral
    I suppose the idea solution would be to somehow tap into the event that is fired when using "Find a file" search to run my javascript and update the links for the search results.
    Can anyone offer any solutions to this issue?

    Hi,
    According to your description, my understanding is that you want to open PDF files in a new window from a document library when using the "Find a file" search.
    As you said, the "Find a file" search does not do a postback (reload) of the page, therefore JavaScript to find the PDF links and make them open in a new window does not run for the links on the page.
    I recommend to use JS link to achieve the goal. Create a JavaScript override file and upload the JavaScript file to the Master Page Gallery, and then set the JS Link property of the document library web part to point to the JavaScript file.
    Here are some links about the JS link in SharePoint 2013 for you to take a look:
    http://www.idubbs.com/blog/2012/js-link-for-sharepoint-2013-web-partsa-quick-functional-primer/
    http://www.learningsharepoint.com/2013/04/13/sharepoint-2013-js-link-tutorial/
    http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Webdynpro application can't display a URL iView in a new External window

    Fellow developer:
    In my WD4A application, I called the method 'navigate_absolute' to display a URL iView in a new External window.
    The code is as follows:
    data lo_portal_manager type ref to if_wd_portal_integration.
    call method lo_portal_manager->navigate_absolute
    exporting
      navigation_target = 'ROLES://u2026'
      navigation_mode = '1'.            ('0' - Displayed in the Same Window, " '1' - Displayed in a new External Window)
    The application can display the iView in the same Window (navigation_mode = '0'), but cannot in a new External window (navigation_mode = '1').
    In the iView properties, the following attributes are set to:
    1. Launch in New Window - Dipslay in Separate Window
    2. Open iView Links in New Window - Yes
    If you know the answer, please advise.
    Thanks
    Bac Quan

    hi,
    i have the same problem. Did you solve it?. Please let me know...
    regards,
    MC

Maybe you are looking for

  • Iphone 5 backup

    When I was doing my regular backup for my iphone 5 on my laptop, I accidentally set it up as a new iphone.  How can I set it back to my old one so I can get all my pictures an everything back??

  • Image goes to grayscale

    In Photoshop CS5, if I drag-and-drop an image from one document to another, it has suddenly started going to grayscale rather than RGB. Any ideas on what setting I screwed up would be appreciated rhg

  • How to mouserotate center on specific point?

    Thanks in advance. Suppose I have a QuadArray (make it simple, a cube with vertex (0,0,0),(1,0,0),(1,1,0),(0,1,0),(0,0,-1),(1,0,-1),(1,1,-1),(0,1,-1)), how can I make mouserotate on its center (in this case, (0.5,0.5,-0.5)) without rewritting the ver

  • How to avoid the run time error  "java.lang.OutOfMemoryError"

    hi i have written a code to read a txt file ,i used FileReader to read a file . the code is working well for small txt files. but when i tried to read a large file(greater than 2MB), a run time error called "java.lang.OutofMemoryError" appeared . plz

  • Problem mit der graphischen Anzeige der Frequenz

    Hallo liebes Forum, wir basteln gerade an einem Programm zur Strömungsdatenerfassung. Das Eingangssignal ist frequenzmoduliert. Es erscheint kein Signalverlaufsgraph für die Frequenz, obwohl die numerische Frequenzanzeige funktioniert. Außerdem wird