Open View or Window in a external window (popup)

Hi experts!
I have the following issue:
- I know how to open a external window from a given URL, but my problem is that I want this new external window to open and show one of my own windows and I don't know how to get the window's URL. Any Idea???
Please help or redirect me to some doc or post. Thanks.
Osvaldo Silva

Hi,
If you want the url of the another window in your WD Component. As per my knowledge you need to have a seperate application to be created for this window also.
For Example you have Window1 (View1 is embeded in this window) and Window2(View2 is embeded in this window). Now you need the url of the Window2.
So for this purpose you need to create two applications for this WD Component.
For example App1 (Created for Window1InterfaceView) and App2 (Created for Window2InterfaceView).
Now use this below code to open the Window2 URL in a sepearate window.
// Get name of deployable object this component belongs to
String deployableObjectName =
wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
Map urlParameters = new HashMap();
// If there are any application parameters you need to pass to App2 you can set those in urlParameters
// as urlParameters.put("key","value");
try {
// Get deployable object part of target application.
// Precondition: assume, that other application belongs to the same
// Web Dynpro Project (Deployable Object)
WDDeployableObjectPart deployableObjectPart =WDDeployableObject.getDeployableObjectPart(
deployableObjectName,"App2",WDDeployableObjectPartType.APPLICATION);
// Get target URL based on deployable object part and URL parameters
String urlToTargetApp =WDURLGenerator.getApplicationURL(deployableObjectPart, urlParameters);
//Open this urlToTargetApp in external window.
IWDWindow window = wdComponentAPI.getWindowManager(.createNonModalExternalWindow(urlToTargetApp,"Window2");
window.show();
} catch (WDURLException e) {
messageMgr.reportException(e.getLocalizedMessage(), false);
} catch (WDDeploymentException ex) {
messageMgr.reportException(ex.getLocalizedMessage(), false);
Note:/Warning:  We are opening another window using another WebDynpro application.
Here it creates a seperate WDComponent instacne. You can't access Window1(View1)'s existing context data in Window2(View2). The only way is you can pass some data using app/url parameters.
Apart from this as per my knowledge there is no other way to get the url for a Window.
Regards,
Charan

Similar Messages

  • Is Create window instnce into External window?

    Hi All,
    I have small problem in creating window instace into new External window.
    IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI
    .getComponentInfo()
    .findInWindows("AddressbookWindow");
    IWDWindow window = wdComponentAPI.getWindowManager()
    .createWindow( windowInfo, true);
    window.setWindowPosition(300, 150);
    window.open();
    wdContext.currentPopupElement().setWindowInstance(window);
    This is the window instance But this winsdow instance I want to display in new external window .
    How can i do it .
    help me out.
    Advance thanks.
    Mandapati

    Hi Nageswar,
    I have a suggestion for you. Lets start off creating a new application which contains two different views View_1, View2. Create two windows Window_1, Window_2 and embed View_1 and View_2 respectively.
    Let View_1 and View_2 contain a Button UI Element.
    Create a dummy attribute in the comp_controller and map it to both the View controllers.
    Create a submit() method for your View_1 button's onAction event.Create submit() method in your component controller.
    Call comp_controllers submit() method from your View_controller's submit() method.
    You have to declare the following code in your comp_controller within //@@begin others **   //@@end code
    private IWDWindow excelLinkWindow;
    write the following code in comp_controller's submit() method...
    excelLinkWindow =
         wdComponentAPI.getWindowManager().createModalWindow(
         wdComponentAPI.getComponentInfo().findInWindows(
                   "Window_2"));
         excelLinkWindow.setWindowPosition(WDWindowPos.CENTER);
         excelLinkWindow.open();
    Create submit() method in View_2 and second_submit() method in comp_controller. Call second_submit() method from your View_2's submit() method.
    write the following code in your second_submit() method.
    if (excelLinkWindow != null) {
            excelLinkWindow.destroy();
         excelLinkWindow = null;
    Now deploy and run your application.
    Hope this helps.
    Regards,
    Rekha Malavathu.

  • Opening External Window in Web Dynpro ABAP with URL disabled or Hidden

    Hi Experts, I have a requirement where-in we want to open the Web Dynpro ABAP application using tcode WDYID (by passing the application name  and startmode), but the URL of the newly opened explorer should be disabled or hidden. To achieve the same, I have created a component (lets name it PARENT) and inside that in DOMODIFY/DOINIT method have written code to invoke the required WDA (lets name it CHILD) in external window (by using lo_window_manager->CREATE_EXTERNAL_WINDOW) and is successfully able to open the application with URL disable using different parameter of method CREATE_EXTERNAL_WINDOW. But in this case there are 2 window which opens, one is for PARENT view and other is for CHILD. Now I only want to keep the second view (CHILD) to be opened and want to close the PARENT view. When I used EXIT_PLUG to close the PARENT window, it closes both the window. Need your inputs on my approach or if you have any. Regards, Harish

    Hi,
    If you open the popup, it opens as Modal Window, originating from Parent window. Without external window( where you can pass has_location = abap_false ), you cannot hide the URL/Address bar.
    If you want to partially hide the URL( if you dont want to show the full URL with application path), you can create an Alias for the service in SICF.
    Go to SICF, and create an alias for your WDA application; say original URL: domain:port/sap/bc/webdynpro/sap/<ZAPPLICATION_NAME>
    This URL you can convert( partially hide) as, domain:port/sap/<ANY_NAME>
    Refer creating Alias in this help: http://help.sap.com/saphelp_sem320bw/helpdata/en/55/361a3c9c004866e10000000a11402f/content.htm
    Hope this helps u,
    Regards,
    Kiran

  • Open an image in new external window...

    Hi all,
    I have an image in the server, say "c:\hai.jpg", through my application i want to open this image in a new external window on click of a button.
    I used the following code,
              String file ="C:\images\p.JPG";
              final byte[] content = this.getByteArrayFromResourcePath(file);
              final IWDCachedWebResource resource = WDWebResource.getWebResource(content, WDWebResourceType.JPG_IMAGE);
              resource.setResourceName("p."+resource.getResourceType().getFileExtension());
              try
                   final IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(resource.getAbsoluteURL(), "WD_Filedownload", true);
                   window.open();
              catch(Exception e){
                   wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    This code opens a new Internet Explorer, but not the image. When i printed the AbsoluteURL of the resource, its printing null. Where am i going wrong?
    Thanks in advance,
    Pravin

    Hi Armin,
    I am using this byte array code
         private byte[] getByteArrayFromResourcePath(String resourcePath)throws FileNotFoundException, IOException
               FileInputStream in = new FileInputStream(new File(resourcePath));
               ByteArrayOutputStream out = new ByteArrayOutputStream();
               int length;
               byte[] part = new byte[10 * 1024];
               while ((length = in.read(part)) != -1) {
                 out.write(part, 0, length);
               in.close();
               return out.toByteArray();
    Thanks
    Pravin

  • Printing Non Modal External Window - print out additional blank page

    Hi All,
    I am printing out a content of a web dynpro view as a non modal external window with the browser print functionality.
    Even if the content of the web dynpro view is not more than the half of a page the browser print functionality prints 2 pages. The second page is a blank page.
    I tried to change the external window size in web dynpro, but it is still printing 2 pages.
    How can I set / configure the browser print functionality, so it prints only the page that contains the web dynpro view content?
    Thanks,
    Yasar

    Hi,
    I'm guessing the concurrent program is outputting text (character mode) as opposed to PDF?
    This could be a number of reasons:
    1. Printer driver issue, e.g. the number of lines printed on the page is more than is defined for the printer driver: Try reducing the "Rows" on the current program definition
    2. Printer PRT issue, extra page break could be being inserted.
    3. The "box" in the report definition containing the address could be being expanding due to the extra address line, but not enough space so it forces a new page to be printed.
    Gareth
    Blog: http://garethroberts.blogspot.com
    Web: http://www.virtuate.com

  • Close external window in NW04s

    Hi,
    We are using the following API in order to close an external window: TaskBinder.getCurrentTask().getClient().sendRedirect("javascript:window.close();",0);
    After closing the window, the object in the backend system remain locked (and not released). it seems that the session remains alive and hence the object is locked.
    If we close the window with the X of the window, the object of the backend is released as required.
    As suggestions?
    Thanks,
    Aviad

    Hi AVIAD,
    Check this.
    Step 1: Take a context attribute(WindowInstance) of type “com.sap.tc.webdynpro.services.session.api.IWDWindow”.
    Step 2: Take a CloseButton in the View(DisplayView) that is used as a embed View of external Window.
    Step 3:
    When you are calling the external window set “WindowInstance”
    public void onActionDisplayExternal Window(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionDisplayResult(ServerEvent)
         IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
         "DisplayWindow");
    //        create the Window
         IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
         window.setWindowPosition(WDWindowPos.CENTER);
         window.setTitle("WindowTitle");
         window.setWindowSize(100,100);
    //        Save WindowInstance in Context
         wdContext.currentContextElement().setWindowInstance(window);
    //        and show the window
         window.show();
         //wdThis.wdFirePlugInDisplay();
        //@@end
    Step4: Associate action “CloseWindow” with the “CloseButton
    ” and destroy the window instance inside it.
      public void onActionCloseWindow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCloseWindow(ServerEvent)
       IWDWindow window = wdContext.currentContextElement().getWindowInstance();
       window.destroyInstance();
        //@@end
    External Window
    Re: Exit button error...
    Regards,
    Mithu

  • Open view in external window..

    Hi,
    try this:
    define a new window
    and at this to the link action:
    //Create a new Window and open it
    IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("MyNewWindow");
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);
    window.setWindowPosition(x, y);
    window.open();
    // Save WindowInstance in Context
    wdContext.nodePopup().bind(wdContext.nodePopup().createPopupElement());
    wdContext.currentPopupElement().setWindowInstance(window);
    Regards
    Sebastian

    >
    Husalban RM wrote:
    > Hi all,
    >
    > This is the scenario:
    >
    > In my WD i have a initial view with a selection criteria for search documents (like POWL) when you select one and push the button 'Display' I start a navigation to another view to display the details...
    >
    > Now the client wants to change that. When the user push the button 'Display' a new external window must be opened.
    >
    > With the method CREATE_EXTERNAL_WINDOW of the class IF_WD_WINDOW_MANAGER i need an URL that i haven't for call this view.
    >
    > Then, is necessary to create a new Webdynpro Application in my component in order to do it? Or is there any other way to do it?
    >
    > Thanks in advance.
    Hi,
    Should  it be absolutely a external window ?
    You can use a create_window method of the IF_WD_WINDOW_MANAGER to show it on a popup window.

  • Open view in a new browser window

    Hi all,
    I want to open a view in a new browser window.
    I try this two code:
    1)IWDWindow window=
    wdControllerAPI.getComponent().getWindowManager().createExternalWindow(
              "http://www.google.it","google",false);
    but in this case i can only open an url...
    2)IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("ExternalWindow");
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
    but in this case it open an internal windows, not an external new browser windows...
    What can i do?
    Thanks!

    Hello Andrea,
    you should call not "http://www.google.it" but result of something like this:
         public static String resolveURL(String dcName, String applicationName) throws EntryNotFoundException, WDURLException
              IWDDeployableObject deployableObject = WDDeployableObject.getDeployableObject(dcName);
              if(null!=deployableObject && WDDeployableObjectState.STARTED.equals(deployableObject.getState()))
                   boolean found = false;
                   int i = 0;
                   WDDeployableObjectPart[] parts = deployableObject.getParts(WDDeployableObjectPartType.APPLICATION);
                   if(parts!=null)
                        for(;i<parts.length;i++)
                             if( applicationName.equals(parts<i>.getShortName()))
                                  found = true;
                                  break;
                   if(found)
                        return WDURLGenerator.getApplicationURL(parts<i>, null);
                   else
                        throw new EntryNotFoundException( "Application '" + applicationName + "' not found" );
              } else {
                   throw new EntryNotFoundException( "Application '" + applicationName + "' not found in '" + dcName + "'" );
    Best regards, maksim Rahchnski

  • Application lock on open external window

    Hi everybody,
    I have problems with opening a new browser window pointing to a folder on the network.
    If the user has access to the folder everything is working fine.
    If the user has no rights to access the folder, the user gets an error message and the window stays empty. After clicking okay on the error message and closing the window the  user can continue working in the application.
    If the folder which should be display does not exist the user gets an error message.
    After clicking oay on the message he can return to the application. But there the 'progress circle' is still running and it cannot abort or do anything! The user has to close the application and login again.
    Is there a way to handle the external window in any way after having it opened and the calling method was left?
    Any hint or advice is highly appreciated!
    Best regards,
    Roland

    Hi,
    Do this way... So that there will not be a minimise option, close option. and control will be there inside the Window and till the time user closes the window he cannot perform any actions on any other screens.
         //Added below code to open a new window
              IWDWindowInfo info =
                   wdComponentAPI.getComponentInfo().findInWindows("WD_vendorTable");
    //Where WD_vendorTable is a window with the desired view embedded inside it.
              IWDWindow win =
                   wdComponentAPI.getWindowManager().createModalWindow(info);
              wdContext.currentContextElement().setVa_VendorWinName(win);
    //Save this window information in a context variable(declared at component level and mapped to the parent view and to the window(child) view)
              win.setWindowSize(300, 300); //Desired window size
              win.setWindowPosition(600, 100); //Desired window position (from top left cornor)
              win.setTitle("Vendor Details"); //Desired window title
              win.show();
    To close this window
    create a button inside it and inside the button's action
    IWDWindow win=wdContext.currentContextElement().getVa_AssetNoWinName();
    win.destroyInstance();
    Regards,
    Srinivas.

  • Opening an External Window which shares the same context.

    Hi,
    I have a requirement where <b>I need to open an external window which shares the same context</b>. (i.e, A window which belongs to the same application in a seperate browser)
    If I use the following coding <b>it only opens a model window in the same browser</b>.
    IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("NewWindow");
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow(winInfo,false);
    But if I use wdComponentAPI.getWindowManager().CreateExternalWindow() <b>it could only accept the URL that opens a seperate application with different context</b>.
    Please help me in this regard.

    Hi Anbu,
    Dont feel bad that i am asking you more questions than giving you answers.
    if you just want to show content or let the user enter data or something you can use always popup modal/non modal window.
    External window is used to refer to other website or other applications in otherwords referring other url.
    So your workaround would be relaxing your requirement and redesign your application.
    This is my view point.Probably some other expert sdn'ers might have better one you know.
    Success !!
    BTW- if you decided to follow nagarajan suggession then you have to use URL generator to generate the URL.Using static URL is depreciated and also wont work in your Customer places.
    Message was edited by: Baskaran Senthivel

  • Can I display 2nd view on external window ?

    Hi all
    I would like to implement the function that Output views come out on external window.
    For example, OnAction method searches data from DataBase and the result appears on external window not original window.
    Comparing this function to HTML, I imagine anchor with "target = BLANK".
    I try to use 2 methods ,create_window and create_external_window, in if_wd_window_manager.
    But I couldn't get my want.
    Howcan I do ?
    Please help.
    Best regards
    Tom

    HI
    there are two scenrios here.
    1. creating a MODAL POPup window using create_window and this will create a window having the the second view with the desired data.
    here in this case you have to create a comman context node in the comp contrl and use it both views. then
    create second window and embed the second view in it.
    now fill the data in the first view in the context node and then use the method create_window to create the modal popup
    window and show your data here in the second view may be table or form (whatever you want).
    2. second scenario is to create sn external non modal window itself which will open in a seprate browser window.
    there how ever you cannot pass the context node itself. masimum you can do is pass url string paramters.
    which you can fetch in the second application and disply the result accordingly.
    thanks
    sarbjeet singh

  • How to display a view on external window

    Hi folks,
    I have a scenario like to implement the function that Output views should display on external window.
    I couldn't get as per my requirement..
    Please help me on this.
    thanks i nadvance..
    Regads,
    Prashanthi

    Hi,
                U need to the following
               1.Create another window
               2.Create a view in it tat contains Interacive form element.
               3. call this window dynamically thru the first window by creating a context element of IWDWindow  type
    The code may help:
      IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("SearchEmpwind");
          IWDWindow window = wdThis.wdGetAPI().getComponent().getWindowManager().createWindow(windowInfo, true);
          window.setWindowPosition(WDWindowPos.CENTER);
          window.setWindowSize(400, 250);
          window.open();
          wdContext.currentContextElement().setEmpSearchWind(window);
    Regards
    Ishita

  • Erec - When an External window opens after click of a button

    We are using an Standard Webdynpro Erec Appln.
    When an External window opens after click of a button the smart form embedded in that windows view is not appearing instead and small X mark (in Red)  is appearing with fully plain background
    It is happening only for my system, others are able to view it properly...
    I have cleared the cache, restarted the system and also re-installed the Adobe Reader too..
    But still the problem persists.. Let me know what can be done in this case...
    Thanks & regards,
    Rashmi

    The service that you are trying to use requires integration of adobe with in browser(IE). Check the option [Display PDF in browser |http://lh4.ggpht.com/_E1SpYl0ZbfE/SlI0rfQAxeI/AAAAAAAAAh4/fC9alkf1M78/Adobe_Setting.gif]in Adobe Reader preferences.
    If it still doesn't show the PDF, try to reset the browser setting to Medium and re-open.
    Regards,
    Trikanth Basetty

  • How to display a view which contain interactive form in an external window

    Anyone know how to display a view which contain interactive form in an external window?
    I managed to display the view in an internal window with the following code:
    IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PdfReportWin");
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);
    For external window, I tried this method : wdComponentAPI.getWindowManager().createExternalWindow(String URL, String title, boolean modal) but there are no parameter for view name?
    Maybe this is not the correct way, really appreaciate if anyone can help.

    Hi,
                U need to the following
               1.Create another window
               2.Create a view in it tat contains Interacive form element.
               3. call this window dynamically thru the first window by creating a context element of IWDWindow  type
    The code may help:
      IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("SearchEmpwind");
          IWDWindow window = wdThis.wdGetAPI().getComponent().getWindowManager().createWindow(windowInfo, true);
          window.setWindowPosition(WDWindowPos.CENTER);
          window.setWindowSize(400, 250);
          window.open();
          wdContext.currentContextElement().setEmpSearchWind(window);
    Regards
    Ishita

  • Open view in new browser window

    Hi all,
    I have got a webdynpro-application, which contains two windows and two views.
    Actually each window contains one view. The second window is opened as a pop-up-window right now.
    Instead of the pop-up, I just want to open a new external browser window which contains the view.
    Moreover the context of the external browser window has to exchange data with the application itself.
    Does anybody know how realize this?
    Thank you in advance.
    Kind regards, Patrick.

    can help
    some information
    String strURL = WDURLGenerator.getApplicationURL("WebDynpro_PATH", "WindowApp");
    Now u can use this strURL for opening your external window.
    wdControllerAPI.getComponent().getWindowManager().createExternalWindow(strURL,"TITLE",false);
              IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("CallTreeWindow");
              //create the "AddressbookWindow"
              IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
    WDWebContextAdapter.getWebContextAdapter().getParameter("param");
    WDWebContextAdapter.getWebContextAdapter().getRequestParameter(key)
    you should call not "http://www.google.it" but result of something like this:
         public static String resolveURL(String dcName, String applicationName) throws EntryNotFoundException, WDURLException
              IWDDeployableObject deployableObject = WDDeployableObject.getDeployableObject(dcName);
              if(null!=deployableObject && WDDeployableObjectState.STARTED.equals(deployableObject.getState()))
                   boolean found = false;
                   int i = 0;
                   WDDeployableObjectPart[] parts = deployableObject.getParts(WDDeployableObjectPartType.APPLICATION);
                   if(parts!=null)
                        for(;i<parts.length;i++)
                             if( applicationName.equals(parts.getShortName()))
                                  found = true;
                                  break;
                   if(found)
                        return WDURLGenerator.getApplicationURL(parts, null);
                   else
                        throw new EntryNotFoundException( "Application '" + applicationName + "' not found" );
              } else {
                   throw new EntryNotFoundException( "Application '" + applicationName + "' not found in '" + dcName + "'" );

Maybe you are looking for

  • Terminated by signal 11

    Hi, If we run the request for a order, the requets ends with status "Completed Error" and outpufiles are not created. It is XML Publisher report. The error is Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are : American_America.UT

  • Saml authentication error-cross domains

    Hi, I am trying to setup the SAML 1.1 authentication with OWSM Policy for my SOA composite. The Web Service contains a simple hello operation which is called by an external client also BPEL service. The SOA service is just an SAML assertion consumer.

  • Oracle 9.i Driver issues when connecting a pool in WLS6.1

    Ok. Ammendment to other message as I haven't gotten a solution yet. My problem is I am using Oracle 9.i on a Sun UNIX box and using Weblogic 6.1 SP2 on another box. Trying to connect a pool between the two of them. Obviously, there has to be a way to

  • Account Identification - New field - Search

    Dear Experts,    In Account Identification screen I have added a new field from the BOL object; but the search is not happening with this field? How would I accomplish this? Warm Regards, Kanthimathi

  • How to make the browser reload an updated jar-file?

    Hi there, Previosly when running applets using MSIE, all needed to reload an updated jar-file was pressing CTRL+F5 Currently I've been assigned to re-develop some of my old applets and now I realize that the old CTRL+F5 won't do the trick any more si