on 10-26-2007 2:27 PM
How can I get the name of the webdynpro-application and the name of the view that is currently shown?
(for example inside an event handler or inside WDINIT of the view)
Hi Daniel,
the following code inside WDDOINIT of the view will do it:
get application name
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
DATA lo_api_componentcontroller TYPE REF TO if_wd_component.
DATA lo_application TYPE REF TO if_wd_application.
DATA lo_application_info TYPE REF TO if_wd_rr_application.
DATA lv_app_name TYPE string.
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_api_componentcontroller = lo_componentcontroller->wd_get_api( ).
lo_application = lo_api_componentcontroller->get_application( ).
lo_application_info = lo_application->get_application_info( ).
lv_app_name = lo_application_info->get_name( ).
get view name
DATA lo_api_main_view TYPE REF TO if_wd_view_controller.
DATA lo_view_info TYPE REF TO if_wd_rr_view.
DATA lv_view_name TYPE string.
lo_api_main_view = wd_this->wd_get_api( ).
lo_view_info = lo_api_main_view->get_view_info( ).
lv_view_name = lo_view_info->get_name( ).
Best Regards,
Anika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.