on 07-21-2014 8:40 AM
Hi,
I have a requirement to display a popup when user click on a custom link given in ESS. Popup ALV displays some records and user selects any of the single row after that as soon as user clicks on 'OK' button of popup, it should be closed as well as the tab of 'Interner Explorer' should also be closed.
I am able to close popup however not able to close IE tab though I have used 'EXIT' outbound plug and fire-plug method on 'OK' button event of popup.
Below is the code for popup OK button to close popup as well as IE tab:
"To close PopUp window
wd_comp_controller->go_window->close( ).
* To Close Window
DATA LO_API_V_MAIN TYPE REF TO IF_WD_VIEW_CONTROLLER.
LO_API_V_MAIN = WD_THIS->WD_GET_API( ).
DATA : LO_WINDOW TYPE REF TO IF_WD_WINDOW_CONTROLLER.
CALL METHOD LO_API_V_MAIN->GET_EMBEDDING_WINDOW_CTLR
RECEIVING
RESULT = LO_WINDOW.
DATA : IT_PARAMETERS TYPE wdr_event_parameter_list,
WA_PARAMETERS TYPE wdr_event_parameter,
LV_DATA TYPE REF TO DATA.
FIELD-SYMBOLS : <FS_PARA> TYPE ANY.
CREATE DATA LV_DATA TYPE C.
ASSIGN LV_DATA->* TO <FS_PARA>.
<FS_PARA> = 'X'.
WA_PARAMETERS-NAME = 'CLOSE_WINDOW'.
WA_PARAMETERS-VALUE = LV_DATA.
INSERT WA_PARAMETERS INTO TABLE IT_PARAMETERS.
CLEAR WA_PARAMETERS.
CALL METHOD LO_WINDOW->IF_WD_VIEW_CONTROLLER~FIRE_PLUG
EXPORTING
PARAMETERS = IT_PARAMETERS
PLUG_NAME = 'EXIT'.
I am not able to understand the cause as values are passing perfectly however not getting desired output.
Hi Shiromani,
Try using the code below instead:
* To Close Window
data : LO_API_V_MAIN type ref to if_wd_view_controller,
LO_WINDOW type ref to if_wd_window_controller,
IT_PARAMETERS type wdr_event_parameter_list,
WA_PARAMETERS type wdr_event_parameter,
LV_DATA type ref to data.
field-symbols <fs> type any.
LO_API_V_MAIN = wd_this->wd_get_api( ).
LO_WINDOW = LO_API_V_MAIN->get_embedding_window_ctlr( ).
WA_PARAMETERS-name = 'CLOSE_WINDOW'.
create data LV_DATA type c.
assign LV_DATA->* to <fs>.
<fs> = 'X'.
WA_PARAMETERS-value = LV_DATA.
insert WA_PARAMETERS into table IT_PARAMETERS.
LO_WINDOW->if_wd_view_controller~fire_plug(
exporting plug_name = 'EXIT'
parameters = IT_PARAMETERS ).
endmethod.
Regards,
Ashvin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shiromani,
Refer to the below link if it might help you.
Programmatically Closing your ABAP WebDynpro Application
Automatically Close Browser Window of Web Dynpro Application
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shiromani,
Go to the window, and make sure that the outbound plug 'EXIT' is marked as interface and also chosen the plug type 'EXIT Plug'.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shiromani,
You have already closed the popup window using code WD_COMP_CONTROLLER->GO_WINDOW->CLOSE( ) and now you need to close the main window ZTEST_HR right?
If so, the EXIT plug needs to be created on window ZTEST_HR and need to get this window controller and trigger the exit plug.
Hope this helps you.
Regards,
Rama
Hi Shiromani,
Oh, here your popup is triggered from the ESS window.
So, you need to close the main window from which the popup is called.
Let us say you have a link "openDetails" in ESS view V_ESS_MAIN, from where the popup window is called.
Now, you need to create exit plug inside the ESS view's main window and OK button event should be handled inside the view V_ESS_MAIN
Hence the ESS main window gets closed, not the window of your component.
Hope this helps you.
Regards,
Rama
Hi Shiromani,
To access any attribute / methods of an assistance class, it should be made as PUBLIC.
Let us say you have attribute GV_NAME inside class and its marked as public.
Then inside WD component, you can access using wd_assist->gv_name.
Similarly, you can have method GET_DETAILS( ) and its public method.
wd_this->get_datails(
Regards,
Rama
Hi Rama,
I have created an Enhancement in WD, where in post exit method, I have written:
DATA: ld_application_id TYPE string.
wd_assist->ld_application_id.
Where ld_application_id is coming from method link_created, but I am not able to access this variable using wd_assist giving below error:
Statement "WD_ASSIST->LD_APPLICATION_ID" is not defined.
Hi,
You cannot access method parameters using wd_assist.
Sample:
wd_assist->link_created(
importing
id_application_id = ld_application_id )
Here: id_application_id is parameter from method LINK_CREATED, check out if it is of type returning, if so
wd_assist->link_created(
receiving
id_application_id = ld_application_id )
Hope this helps you.
Regards,
Rama
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.