Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

set focus

Hi ,

I have to setfocus based on some condition. I have 3 group UI elements . but each time only one group will be visible based on some condition. Each group has some selection criteria and an submit button.

so I wrote the below code in wdmodifyview. When I go the view the focus is set correctly on the input submit button. But as soon as enter in the inputfields the focus is shifted to input fields. after I enter the fields the hit enter it does not navigate to other view as the focus is on the input field I last entered.

How to handle this scenario.

Case lv_setfocus.

When 'G'.

lv_v_sort = view->get_element( 'VSORTENTER' ).

IF lv_v_sort IS BOUND.

view->request_focus_on_view_elem( lv_v_sort ).


when 'M'.

lv_v_cinq = view->get_element( 'SUBMIT' ).

IF lv_v_cinq IS BOUND.

view->request_focus_on_view_elem( lv_v_cinq ).


when 'H'.

lv_v_cpric = view->get_element( 'ENTERCUSTPRIC' ).

IF lv_v_cpric IS BOUND.

view->request_focus_on_view_elem( lv_v_cpric ).



Former Member
Not what you were looking for? View more on this topic or Ask a question