cancel
Showing results for 
Search instead for 
Did you mean: 

SET_FOCUS does not work when a message was fired before

jrgkraus
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

rainer_liebisch
Contributor
0 Kudos

Hello Jörg,

the message area gets the focus automatically if you raise a message. The reason for this is to fulfill the accessibility requirements for blind people. They will be informed about the new raised message because of the focus. Unfortunately there is no workaround for this behaviour, as you can't influence the focus of the message area.

Regards,

Rainer

Answers (1)

Answers (1)

former_member188831
Contributor
0 Kudos

what is wd_assist here ?????