cancel
Showing results for 
Search instead for 
Did you mean: 

problem with setting focus in popup

jakob_steen-petersen
Active Participant
0 Kudos

Hi

In order to set focus on a specific field in an Webdynpro view i use this code in WDDOMODIFYVIEW

But it dosen´t Work - i seems like "something is happenig" after this code? I call the view as a Popup Window with if_wd_window_manager->create_and_open_popup

Any ideas?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

In order set the focus on the particular field,may be the problem may be first_time = 'abap_true'.

Once keep the session break point check it you may come to know.because same way i am using its working fine for me.

check where you are writing the code whether in the popup view or another view, these simple mistakes we used to do.

  DATA: lr_elem TYPE REF TO if_wd_view_element.

lr_elem = view->get_element( wd_this->field ).

if lr_elem is BOUND.

view->request_focus_on_view_elem( lr_elem ).

endif.

Thanks & Regards

@Surendra@

jakob_steen-petersen
Active Participant
0 Kudos

Hi Surendra

Sorry but the first part of your response i don´t understand? Why do you think it is a problem with If first_time = abap_true ? I only need the focus to be set on the intial call of the Popup?

Secondly - the code is in the method WDDOMODIFYVIEW of the popup view which is bound to a window