Hi,
I have two Web Dynpro components, which can't work in one session. And click session1's button1 to open seesion2 by URL, and this URL contains a parameter EVENT_ID. This event is registered(using class cl_wd_notification_service) in session1 when you click button1.
And there's a button,called button2, in session2. Click session2's button2, we can prepare some useful data(USEFUL_DATA) here, and then call function cl_wd_notification_service=>update_event_status( event_id = EVENT_ID) to update the event's status.
After that it can trigger the registered event in session1, and go to the handle method. I want to get the session2's USEFUL_DATA in session1's event handle method.
How can I set my USEFUL_DATA as parameter to the event?
Here's the code:
----------Code in session1's button1 click handle method--------------------
DATA lo_view TYPE REF TO if_wd_view_controller.
DATA lo_service TYPE REF TO if_wd_notification_service.
DATA lv_event_id TYPE wdr_notification_id.
lo_view ?= wd_this->wd_get_api( ).
lo_service = cl_wd_notification_service=>get_service(
view_controller = lo_view ).
lv_event_id = lo_service->register_new_event(
action = 'REFRESH_STATUS' ).
wd_comp_controller->as_event_id = lv_event_id.
wd_comp_controller->launch_app( ).
----------parameter I can get in session1's event handle method--------------------
WDEVENT : CL_WD_CUSTOM_EVENT
----------Code in session2's button2 click handle method--------------------
DATA useful_data TYPE string.
useful_data = 'data have to pass by event in two sessions'.
cl_wd_notification_service=>update_event_status(
EXPORTING
event_id = wd_comp_controller->as_event_id "EVENT_ID
event_status = cl_wd_notification_service=>c_status_done ).
Thanks!
Lulu