Skip to Content
0
Jul 22, 2008 at 06:24 AM

SET_FOCUS does not work when a message was fired before

96 Views

Hello to all,

in a wd view, I try to set a focus to a specified field using the following code (Method WDDOMODIFYVIEW ):

data lo_view type ref to if_wd_view.

DATA: lv_v_elem TYPE REF TO if_wd_view_element.

lo_view = wd_assist->get_view( ).

lv_v_elem = lo_view->get_element( 'LGPLA' ).

IF lv_v_elem IS BOUND.

lo_view->request_focus_on_view_elem( lv_v_elem ).

ENDIF.

Everything works fine, if not a message is set. As soon as I output a message using a message area, the mechanism doesn't work any more. The cursor does not appear in the required field.

Can anyone tell why?

Thanks