Restrictions in CLOSE WINDOW Functions
Use
To use the function, parameter CLOSE_WINDOW of type WDY_BOOLEAN must be declared in an Exit Plug. The function is triggered by setting the value ABAP_TRUE when the plug is called.
The Close Window function 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.
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.
-
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.
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.