Skip to Content

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

(ABAP) Set focus to UI element

In the method WDDOINIT of a view I want to set the focus to a certain input field (e. g. Id INP_NAME). I know that this can be done with the FOCUS-Method. But I do not know how to get the reference to the correct UI element.

data: MY_IMPUT_FIELD type ref to CL_WD_INPUT_FIELD.
MY_INPUT_FIELD = <b>???</b>.
MY_INPUT_FIELD->FOCUS( ).

Can I access it via the WD_CONTEXT or WD_THIS? Or is there any other permanent API? Could please someone help me out with a code snippet für the ??? part? Thanks in advance.

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