
To use the function, parameter CLOSE_WINDOWof type WDY_BOOLEANmust be declared in an Exit Plug. The function is triggered by setting the value ABAP_TRUEwhen the plug is called.
The Close Windowfunction cannot be used in every scenario in Web browsers. Since this function cannot be adequately checked across all scenarios, bear in mind the following:
The close window function can only be implemented in the following scenarios:
The application runs in SAP NetWeaver Business Client.
The application runs in a browser window opened by JavaScript.
Portal:
Opened in a new window using portal navigation.
Web Dynpro:
Window opened by CREATE_EXTERNAL_WINDOW.
JavaScript:
Window opened by window.open().
You also have to check the availability of the function as follows: The function can only be implemented if IF_WD_APPLICATION=>GET_IS_CLOSE_WINDOW_SUPPORTED( )returns the value ABAP_TRUE.
This is the case if at least one of the following conditions is met:
The application runs in the portal.
Note that the function can only be used in the portal in the cases described above.
The application runs in SAP NetWeaver Business Client.
The application runs directly in a browser window which was opened by another window either using a link or by JavaScript.
Microsoft Internet Explorer opens a confirmation prompt if the browser window was opened with a link.
If the close window function is used in other scenarios, the following may occur as a result of the call:
The window is not closed.
A message appears The application was closed. You can now close the window.
A confirmation prompt appears. If the prompt is confirmed, the window is closed. Otherwise the message appears as above.
The application is ended by calling the exit plug in any case.