cancel
Showing results for 
Search instead for 
Did you mean: 

Scren Number

abhishek37373
Participant
0 Kudos

Hi Folks,

Can you please let me know the method to read the screen name.Suppose i have two screen ,one for change and one fro display ,i want to read the screen number and use a same perform to do do things differently depending on the screen number.

Thanks in Advance

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

There won't be any screen number in Web Dynpro like in Module pool. You can get the current view name using the below code

DATA lr_view_controller TYPE REF TO if_wd_view_controller.

  DATA lr_view_info TYPE REF TO if_wd_rr_view.

  lr_view_controller = wd_this->wd_get_api( ).

*   get view name from controller api via view info

  lr_view_info = lr_view_controller->get_view_info( ).

  IF lr_view_info IS BOUND.

    rv_view_name = lr_view_info->get_name( ).

  ENDIF.

Hope this helps u,

Regards,

Kiran

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can read the value of system field 'SY-DYNNR' to identify current screen number.