cancel
Showing results for 
Search instead for 
Did you mean: 

calling webdynpro application from method .

ravi_kumar221
Participant
0 Kudos

hi i ma calling   webdynpro applicatin from method   as pop up but some      code i have written for exection after that  which i want to execute after  pop up gets  colse in the same method but the metod from where i m calling   webdynpro applicatin all code is getting executed at once the i can see the popo up which i dont want hlep me

method onactionkk .

DATA lo_window_manager TYPE REF TO if_wd_window_manager.

DATA lo_api_component  TYPE REF TO if_wd_component.

DATA lo_window         TYPE REF TO if_wd_window.

lo_api_component  = wd_comp_controller->wd_get_api( ).

lo_window_manager = lo_api_component->get_window_manager( ).

lo_window         = lo_window_manager->create_window_for_cmp_usage(

                    interface_view_name    = 'ZEXAMPLE2'

                    component_usage_name   = 'KK'

*                  title                  =

*                  close_in_any_case      = abap_true

                    message_display_mode   = if_wd_window=>co_msg_display_mode_selected

                    ).

lo_window->open( ).

hi    after  this i want to execute this code not at once . help

* get message manager

DATA lo_api_controller     TYPE REF TO if_wd_controller.

DATA lo_message_manager    TYPE REF TO if_wd_message_manager.

lo_api_controller ?= wd_this->wd_get_api( ).

CALL METHOD lo_api_controller->get_message_manager

   RECEIVING

     message_manager = lo_message_manager

     .

* report message

CALL METHOD lo_message_manager->raise_exception

   EXPORTING

     message_object =

*    msg_user_data  =

     .

endmethod.

Accepted Solutions (1)

Accepted Solutions (1)

RicardoRomero_1
Active Contributor
0 Kudos

Hi,

WD doesn't work in that way. After the sentence lo_window->open() the method will not wait to close the window for continue with the following code... the entire code of the method will be executed at once.

If you want to execute some code after the window is closed you can create an interface event in the component controller of your second component and trigger it manually (using the code wizard) when the window is closed (try with the method WDDOEXIT of the window).

Then in your main component you can create a new method as event handler for this event and you can write there the code you want...

Hope this help you.

Answers (0)