cancel
Showing results for 
Search instead for 
Did you mean: 

VIEW Name in webdynpro

Former Member
0 Kudos

Hi all,

How can i get the current VIEW name in a webdynpro application ?

Best regards

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member1151507
Participant
0 Kudos

Hi,

We can get the current view name using view controller. Here is some sample code.

DATA lo_api TYPE REF TO if_wd_view_controller.

DATA lv_str TYPE string.

lo_api = wd_this->wd_get_api( ).

lv_str = lo_api->if_wd_controller~name.

Regards,

Manogna

Former Member
0 Kudos

Thank you for the quick reply !

And how can we get the name of the VIEW currently called in a ViewContainerUIElement ?

Best regards

Madhu2004
Active Contributor
0 Kudos

hi,

If you need to get the view name statically you can right clik on any UI element and go for more field help.

It will display the component,view name

Madhu

daniel_humberg
Contributor
0 Kudos

try something like this:

  
  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( ).
*   get view name from controller api via view info
  lo_view_info = lo_controller_api->get_view_info( ).
  IF lo_view_info IS BOUND.
    rv_view_name = lo_view_info->get_name( ).
  ENDIF.