Skip to Content

SET_FOCUS does not work when a message was fired before

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 22, 2008 at 08:03 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 25, 2008 at 02:58 PM

    what is wd_assist here ?????

    Add comment
    10|10000 characters needed characters exceeded