on 04-11-2014 5:20 AM
Hi,
I have 7 views embedded in a view container and use plugs to perform navigation. How can I get the view which is currently displayed?
Best regards,
ts
Hi,
Try the below code:
DATA:lr_view_controller type ref to IF_WD_VIEW_CONTROLLER,
lr_main_view_usage type ref to IF_WD_RR_VIEW_USAGE.
lr_vc_assignment type ref to IF_WD_RR_VIEW_CNT_ASSIGNMENT.
lr_view_usage type ref to IF_WD_RR_VIEW_USAGE.
lr_t_views type WDRR_VCA_OBJECTS.
lr_s_view like line of lr_t_views.
lr_view type ref to if_wd_rr_view.
lv_name type string.
lr_view_controller = wd_this->wd_get_api( ).
lr_main_view_usage = lr_view_controller->GET_VIEW_USAGE( ).
lr_t_views = lr_main_view_usage->GET_VIEW_CNT_ASSIGNMENTS( ). "This will return all the View Container assignments.
* Now loop over all the View containers and get the reference of embedding view.
loop at lr_t_views into lr_s_view .
lr_vc_assignment = lr_s_view-VIEW_CNT_ASSIGNMENT.
lr_view_usage = lr_vc_assignment->GET_DEFAULT_VIEW_USAGE( ). " This will return view usage reference
lr_view = lr_view_usage->get_view( ). " This will have the meta info of view
*You can get the name of View as below
lv_name = lr_view->get_name( ). " Lv_name wil have the name of Embegging View
endloop.
Hope this helps u,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this..
Data lv_view_name TYPE string.
DATA lo_controller TYPE REF TO if_wd_view_controller.
DATA lo_view_info TYPE REF TO if_wd_rr_view.
lo_controller = wd_this->wd_get_api( ).
lo_view_info = lo_controller->get_view_info( ).
IF lo_view_info IS BOUND.
lv_view_name = lo_view_info->get_name( ).
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.