Close External Window in Web Dynpro Application
Hi Folks,
I am working on a development in Web Dynpro and I am pretty new to this topic, so I seek your help.
The scene is:
I have created a Web Dynpro application in which I open an URL using CREATE_EXTERNAL_WINDOW method of the Window Controller. I am able to open the window but not able to close it.
I tried using methods,
CLOSE()
and
SET_CLOSE_IN_ANY_CASE()
but no success.
Please guide me if anything more needs to be done for closing the opened window.
Thank you.
Sud.
Thank you Thomas,
You correctly pointed out, I was trying to close the external window from my source window.
More precisely, I have a WD application which has a button (Search) on one of its views. On click of 'Search' button, I open a new window using 'CREATE_EXTERNAL_WINDOW' passing the URL 'www.google.com'.
Till this point its fine, but now I want to close this newly opened window. As you said now these are 2 different sessions and cannot communicate anymore, so any guidance how to close this new window?.
OR
Is this the only way to call an URL i.e using CREATE_EXTERNAL_WINDOW? Is there any other way to call an URL without closing my current running WD application?
Request your help......
Thanks.
Regards,
Sud....
Similar Messages
-
Closing window of web dynpro application with exit-plug don't run in the EP
Hi everybody,
I want to close a window that contains a Web Dynpro with a close button, because it's used and create as a popup from an other iView (that's not created with web dynpros) in the EP. I read the different threads how to close a window in web dynpro, like JavaScript in WD
I create a HTML file with the javascript code to close the window and it works fine, when I start the application separately.
If I used it in the portal and click the close button I get the following error message:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application!
I tried also: ...wdFirePlugExit("javascript:self.parent.close();") or some other javascript code, but got the same error message.
Then I tried:
WDPortalNavigation.navigateAbsolute(url,WDPortalNavigationMode.SHOW_INPLACE,(String) null, (String) null,(String) null);
instead of fireing the outbound plug in the action of the close button
(...InterfaceViewController().wdFirePlugExit(url);)
but than a new window with the EP open and the old is still there!
We use the NWDS2004s an the EP 7.00.
It must be possible to close a (this) window!
Thanks for any hint
christianHi,
This is what you can do:
1. You have already created the HTML file with the necessary javascript in the foloowing folder structure :
src->Mimes->Components-><your component name>-><fileName.html>.
2. Create a new iView of type URL in your portal.
3. Get the absolute URL of this HTML file inside your project. This will be in the following format:
http://<server>:<port>/webdynpro/resources/sap.com/<development ComponentName>/Components/<namespace>/<fileName>.html
You can find it thus:
try {
String u = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getDeployableObjectPart(),"filename.html");
wdComponentAPI.getMessageManager().reportSuccess(u);
} catch (WDURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
4. Now enter this URL string as the URL for the iview.
5. Do a normal portal navigation to this iview on-click of the button.
Regards,
Satyajit. -
How to inject external configuration into web dynpro application
Hi colleagues,
I've a web dynpro application, which has some hard coded hostnames in the source code.
All hard coded hostnames should be moved to some else place, either engine parameters or external configuration file.
Searching over the project, hard coded hostnames were found in following file types:
- wdmodel files
- properties files
- java files
How to inject external configured hostnames into web dynpro applications, especially wdmodel and property files? Are threre best practices?
Thanks for any hint!
Best regards
Danielproperty file is supposed to do that job, you can configure the value at nwa after the application is deployed.
Configuring a Web Dynpro Application (Java) - IT Scenarios at a Glance - SAP Library -
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 -
Create external window in Web Dynpro Java
Hello experts,
I am new in web dypro java as well as enterprise portal. I have a problem concerning external window.
I have created a button in my ivew in web dynpro java. By a click on this button, I would like to open an external window with a specified URL(ex: www.google.com).
Could you help me how to do it please?
Thanks in advance,
SenglyHi experts,
I have found the solution. Thanks to this link and thanks to all:
[Problem with linkToURL in a table column|Problem with LinkToURL in a table column;
best,
Sengly -
Calling a new Browser Window from Web Dynpro Application - Empty Context
Hello,
I want to open a view in a new browser window, and followed the same way which is described in this thread:
Open view in new browser window
My first try was creating two applications, which refer to the same Component Controller. The opening of a new browser window is triggered by an action, which is called in the other application. As both applications have the same Component Controller, I thought, the context content has to be the same, but actually the context attributes are empty after opening of the new window.
In my second try I created two applications with two different Component Controllers, mapped via embedded Interface Controller. The effect is the same - I have no context content in the view.
Please, can anybody help me?
Thank you in advance.
Ilona SeifertI done something like this:
[code]
try {
strURL =
WDURLGenerator.getApplicationURL(
"$<b>PROJECT_PATH</b>$/$<b>PROJECT_NAME</b>$",
"$<b>APPLIC_NAME</b>$");
} catch (WDURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
strURL += "?par1=";
strURL += var1;
strURL += "&par2=";
strURL += var2;
strURL += "&par3=";
strURL += var3;
[/code]
and after i retrieve them:
[code]
Var1Value= WDWebContextAdapter.getWebContextAdapter().getRequestParameter("var1");
[/code] -
Close Web Dynpro Application on click of button
Hi,
I have a Web Dynpro Appliaction which would be open in a Portal iView. I have a close button in the application. How do I close the application on the click of "Close" button.
Thanks,
Prasanna.Hi prasanna,
First, it is very bad decision to make decisions instead of user. Just redirect him to logoff page and let close window himself.
In WebDynpro you may use Exit plug on interface view with parameter Url (notice the case) of type string.
Then you may previously fire this plug with JavaScript url: javascript:void(window.top.close())
In recent versions of WD this will not work. So you have to redirect user via exit plug to some static html page, that contains in header <script>window.top.close();</script>
Check the below thread,u will get an solution for your question....
Close Button
How to close portal page by Web Dynpro App
Exit button that close me the window in personalize
Re: Close Button Issue -
Close window in web dynpro abap
Hi,
I have a web dynpro application for a workflow. When a user clicks on the workitem in UWL, a window opens with task description and two button on it. When the user clicks on one of the button, my requirement is: I want to close that window. How could I achieve that? any snippets of code will be highly appreciated.
Thanks.
BijayHi
I am facing problem with 2 buttons one is SAVE and One is Close.
For Close Button i have added below code its giving the popup with yes and no buttons, Its closing when i press Yes but its giving error like " Application terminated you can close the window " , Please help how can i sove this one.
Sorry to disturb you.. Thanks in advance.
data : l_view_cntr type ref to if_wd_view_controller,
l_win_cntr type ref to if_wd_window_controller,
l_window type ref to if_wd_window,
l_parameter_list type wdr_event_parameter_list,
l_parameter type wdr_event_parameter,
l_val type ref to data.
field-symbols <fs> type any.
l_view_cntr = wd_this->wd_get_api( ).
l_win_cntr = l_view_cntr->get_embedding_window_ctlr( ).
l_parameter-name = 'CLOSE_WINDOW'.
create data l_val type c.
assign l_val->* to <fs>.
<fs> = 'X'.
l_parameter-value = l_val.
insert l_parameter into table l_parameter_list.
l_win_cntr->if_wd_view_controller~fire_plug(
exporting plug_name = 'EXIT'
parameters = l_parameter_list ).
For Save button...
I wrote below code in component controller method , but its not populating any window or any pop-up please help in this also.
DATA:
lo_cmp_api TYPE REF TO if_wd_component,
lo_window_manager TYPE REF TO if_wd_window_manager,
popup_title TYPE string.
wdw_variant TYPE string VALUE 'WDW_TEMPLATE_POPUP'.
CALL METHOD cl_wd_utilities=>get_otr_text_by_alias
EXPORTING
alias = 'PAOC_HAP_PA_CASC_GOALS_UI/TEMPLATE'
RECEIVING
alias_text = popup_title.
Calling the POPUP
lo_cmp_api = wd_this->wd_get_api( ).
lo_window_manager = lo_cmp_api->get_window_manager( ).
CALL METHOD lo_window_manager->create_window
EXPORTING
window_name = 'ZH_GOALS'
title = popup_title
close_button = abap_true
close_in_any_case = abap_false
button_kind = if_wd_window=>co_buttons_okcancel
default_button = if_wd_window=>co_button_ok
RECEIVING
window = wd_this->lo_window.
wd_this->lo_window->open( ). -
How to Debug a BAPI from a Web Dynpro application
I have a Web Dynpro application calling a BAPI, and I would very much like to see what data the Web Dynpro application is passing into the BAPI, and then debug the BAPI.
Is there a way to do this? I'm wondering if it is possible to somehow set up the ABAP stack so that on receipt of the BAPI call, it appears on the tRFC queue waiting for execution.
However it is done, I need a way to step through the BAPI on the ABAP stack.
BR,
Tony.Hi Anthony,
The ABAP runtime environment contains various tools that you can use for analysis purposes, such as for debugging source code. All source code written for Web Dynpro applications in ABAP can normally be tested using the debugger.
To allow it to test other Web Dynpro-specific program entities too, the debugger has been equipped with a special enhancement. In the phase model in the active application, you can typically see the following information at various points in time:
-The structure of the content of the current controller,
-The properties of the UI elements in the layout of the current view
-The currently instantiated component usages
Starting the Debugger
The functions for debugging Web Dynpro entities are embedded in the new debugger. You therefore need to have selected the new debugger in your Workbench settings.
Selecting the New Debugger
1. In the menu, choose Utilities -> Settings.
2. A dialog box now appears that contains two nested tab page areas. Choose the parent tab page ABAP Editor.
3. The settings for ABAP Editor always open with the content of the child tab page Editor. Here, select Front End Editor (New).
4. Now switch to the Debugging tab page in the ABAP Editor settings and select New Debugger.
5. Save your changes and close the dialog.
Starting the Debugging Process
To run an application in debugging mode, you first need to set an external breakpoint in display mode in one of the methods in the component.
Now start a test run of the application from ABAP Workbench as usual.
The method in which you set the breakpoint depends on the purpose of the test run. To debug a view, for example, it is best to set the breakpoint in method WDDOMODIFYVIEW. Provided that the context of the view controller is not filled using a supply method, the view is fully instantiated in the phase model at this point in time.
Selecting the Web Dynpro Tool in the New Debugger
When you start the application, another session opens automatically for the debugger. If you have not yet saved any personal settings with regard to the layout of the debugger, the Editor tool will now appear on the left, with the Display Variables tool on the right.
1. Select one of the three desktops in order to reconfigure it for debugging the Web Dynpro application (see Designing Work Areas).
2. The right-hand edge of the debugger window has a bar of function icons. Choose the Replace Tools icon:
3. In the next dialog box (New Tool) open the lowest node (Special Tools) and choose Web Dynpro.
4. Confirm the dialog box.
On the right of the debugger desktop, you will see that the previous tool has now been replaced by the Web Dynpro debugger. You can save this setting for future debugging activities. To do this, choose Save Layout In the debuggers general toolbar.
Thankyou,
Ramganesh. -
Navigation to External URLs from Web Dynpro Java
Hi,
I have Web Dynpro application, which shows one button called 'Navigate' and 'Close'.
I have created iView for this Web Dynpro application and integrated with Page to display in Portal.
When I click the button 'Navigate', I want to display some external url (ex: http://www.google.com) in the same window.
When I click the button 'Close', I want to close this window.
Let me know how to achive this.
ThanksHI
To close a window use
window.hide();
windw.destroyInstance();
and check this [thread |How to close a window ?;
For navigating to another web page use LinkToURL UI element in code and place your website as said above
Regards,
Mahesh -
Close external window using Button
Hi all,
I have implemented a Web Dynpro application which runs in a portal. It opens in a separate browser window.
Now I have to implement a "close" functionality inside this application, which closes the window when the user clicks on a Button (or LinkToUrl -- never mind).
What would be the best way to implement this on NetWeaver 2004s?
Regards,
MartinHI,
You can use an external html file to close window.
Looks like your trying to close window from that window itself.
then create an close.html file and put it into mimes folder
access this file
String url = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"close.html");
wdThis.wdGetViewController().wdFirePlugExit(url);
in close.html write a javascript which contains following function
<html>
<SCRPT LANGUAGE='JavaScript'>
function win_close()
window.parent.opener = top;
window.parent.close();
window.opener.close();
</SCRPT>
<body onlod='javascript:win_close()'>
</body>
</html> -
Cannot deploy Web dynpro application from NWDS
Hi,
I am new to EP. I created a web dynpro application in nwds and tried to deploy it. But it gives the following error .
Settings
SDM host : nw04
SDM port : 50118
URL to deploy : file:/E:/WINDOWS/TEMP/temp12188WelcomeWebDynproprj.ear
Result
=> deployment aborted : file:/E:/WINDOWS/TEMP/temp12188WelcomeWebDynproprj.ear
Aborted: development component 'WelcomeWebDynproprj'/'local'/'LOKAL'/'0.2007.05.02.19.35.01'/'0':
<b>Cannot login to the SAP J2EE Engine using user and password as provided in the Filesystem Secure Store. Enter valid login information in the Filesystem Secure Store using the SAP J2EE Engine Config Tool</b>. For more information, see SAP note 701654.
com.sap.sdm.serverext.servertype.inqmy.extern.DeployManagerAuthExceptionWrapper: Wrong security credentials detected while trying to obtain connection to the J2EE Engine.
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.checkLoginCredentials.DMAUTHEXC)
I have even configured J2EE server in the nwds through preferences. I have used the default passwords during installing sneak preview.
What should i do to deploy my application successfully??????My Server settings are fine in preferences of NWDS. Every thing is showing green
I get the same problem even when i delpoy through SDM.
This is the error when i deploy through SDM
Deployment started Thu May 03 06:27:27 PDT 2007
===========================================================================
Starting Deployment of MyFirstWebDynProPrj
Aborted: development component 'MyFirstWebDynProPrj'/'local'/'LOKAL'/'0.2007.04.14.22.37.46'/'0':
<b>Cannot login to the SAP J2EE Engine using user and password as provided in the Filesystem Secure Store. Enter valid login information in the Filesystem Secure Store using the SAP J2EE Engine Config Tool.</b> For more information, see SAP note 701654.
com.sap.sdm.serverext.servertype.inqmy.extern.DeployManagerAuthExceptionWrapper: <b>Wrong security credentials detected while trying to obtain connection to the J2EE Engine.</b>
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.checkLoginCredentials.DMAUTHEXC)
Deployment of MyFirstWebDynProPrj finished with Error (Duration 6656 ms)
It seems like a configuration issue in SAP J2EE Engine Config Tool.What should i do.
Highest points will be awarded if some one can help me in this -
Call ESS FPM CATS Working time application from non FPM web dynpro application on click of button
Hi,
My requirement is to launch ESS Working time application HRESS_AC_CATS_1 from custom web dynpro application.
ESS CATS working time application is configured in LPD_CUST launchpad.
I tried using method cl_hr_navigation_services=>navigate in my custom web dynpro but it did not work.
Regards,
IbrahimIn case you want to use Launchpad, you can use ABAP class CL_APB_LAUNCHPAD_API. If choose not to use Launchpad, you can use method CONSTRUCT_WD_URL of ABAP class CL_WD_UTILITIES to generate the URL. Specify Web Dynpro application and Web Dynpro Configuration as parameter. Finally create an external window using method CREATE_EXTERNAL_WINDOW that points to that URL.
-
Problem in Closing a web dynpro application
Hi experts,
I wanted to close the application when the user clicks on the close button.
I created a out bound plug "EXIT" of type 'EXIT' in my window.
I also created a parameter "CLOSE_WINDOW" of type "WDY_BOOLEAN" for the outbound plug
Now in action of the close button i have done the below code:
DATA: l_ref_ywd_maintain_catalog TYPE REF TO ig_ywd_maintain_catalog .
l_ref_ywd_maintain_catalog = wd_this->get_ywd_maintain_catalog( ).
l_ref_ywd_maintain_catalog->fire_exit_plg( CLOSE_WINDOW = 'X'
where ywd_maintain_catalog is my window name.
when i check the program i am getting the below error:
get_ywd_maintain_catalog_ctr is unknown or protected or private.
I refered the standard web dynpro component "WDR_TEST_EXIT_PLUG" to implement the logic
Pls help
Regards,
VinodHi all,
This is my requirement when i click on a close button the application should close.
i refered to a web dynpro component "WDR_TEST_EXIT_PLUG" where they have explained the way to use exit plug.
They have created a outbound plug in the window called "EXIT" of type exit. and in the action of the button they have used the below code to fire the outbound plug.
method onactionfire_exit .
data: l_ref_wdr_test_exit_plug type ref to ig_wdr_test_exit_plug .
l_ref_wdr_test_exit_plug = wd_this->get_wdr_test_exit_plug_ctr( ).
l_ref_wdr_test_exit_plug->fire_exit_plg(
url = 'http://www.google.de/'
endmethod.
I followed the similiar approach in my code:
I created a out bound plug "EXIT" of type exit in my window.
then in the action of the close button i have done the below code:
DATA: l_ref_ywd_maintain_catalog TYPE REF TO ig_ywd_maintain_catalog .
l_ref_ywd_maintain_catalog =wd_this->get_ywd_maintain_catalog_ctr( ).
l_ref_ywd_maintain_catalog->fire_exit_plg( CLOSE_WINDOW = 'X'
The problem i am facing is i am getting the error "method get_ywd_maintain_catalog_ctr is unknown or public or private"
I am referred to the below URL to do it :
link: [Exiting a Web Dynpro Application by pressing a button on a Web Dynpro View]
Regards,
Vinod -
Exiting a Web Dynpro Application by pressing a button on a Web Dynpro View
Hi all,
I want to exit a Web Dynpro application when the user presses an Exit button on the screen. Is there an API for closing the current browser window and exiting the application?Thanks.
Sukruhi,
For closing Main Window, use Exit Plug in Windows:
Do the following steps :
-> Make an Outbound Plug to the Window.
->Make the type of Outbound plug to Exit Type.
->Add CLOSE_WINDOW of type wdy_boolean as a parameter to the outbound plug of Window.
->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont be possible ).
->Fire the outbound plug with close_window as X in the onAction of Exit Button .
Refer SAP online help on using Exit plug to close a window:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/content.htm
method ONACTIONGO_EXIT .
data: L_REF_MAIN_WINDOW type ref to IG_MAIN_WINDOW .
L_REF_MAIN_WINDOW = WD_THIS->GET_MAIN_WINDOW_CTR( ).
L_REF_MAIN_WINDOW->FIRE_MY_EXIT_PLUG_PLG( CLOSE_WINDOW = 'X' ).
endmethod.
here Main_window is the window which needs to be closed.
I hope it is clear.
Maybe you are looking for
-
Please help me for Parameters of the reports in client server mode
Dear reader, I have a problem, suppose there is a hierarchy of listings in reports e.g. countries, states, provinces, districts. in the parameter if i want to list the districts of the selected provinces, provinces of the selected states, states of t
-
How to create a dll file for lab view?
Hello I want to create a DLL file for LabView. Can anyone help me in this issue? Regards Vivek
-
Encore installation for Adobe Premiere Pro CC 2014
How to install encore. Please I need link download and the way to activate with cloud.
-
Is there a grace period for apple email address?
Hey guys I was wondering if there was a grace period for apple email address yourname@'insert apple domain name'.com once you deactivate or delete it before it can be used again? for example with phone numbers for certain companies it takes 2yrs once
-
How can I turn off Respond with text option on iphone 5s
I would like to disable the respond with text option, several times while taking the phone out of my pocket I responded to call I wanted to answer