cancel
Showing results for 
Search instead for 
Did you mean: 

set cursor in wd table control?

Former Member
0 Kudos

Hi Experts,

is there any possibilty to set the Cursor to a specific field in my table control within my webdynpro application?

My idea is: if a user fills in the fields in a line of the table control, to check if all fields, which have to be filled, are filled. and if not, to jump to the first field where something is missing. I want that the Cursor is set in this field, so the user can immediatelly start to fill the field without first clicking in that field.

I hope you understand what my idea is?

I tried already the command:

SET CURSOR FIELD lv_column LINE lv_index.

lv_column = 'TABLE-TABLE_MATNR'

lv_index = 1.

TABLE is the Name of my Table-Control and TABLE_MATNR is the Name of the column like it is named in the layout Editor.

i think the code is working, but the Cursor isn't blinking in the field.

What am i doing wrong? Or is it even another code that has to be used?

Hope for your help!

best regards,

Mathias

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Mathias,

GUI commands like SET CURSOR FIELD won't work in WDA. Instead you can set focus on a particular view field with method IF_WD_VIEW_CONTROLLER->REQUEST_FOCUS or you can issue an error message with one of the IF_WD_MESSAGE_MANAGER->REPORT_ATTRIBUTE* methods which automatically provide focus to the indicated view field.

Cheers,

Amy

Answers (3)

Answers (3)

Former Member
0 Kudos

is it work to set focus on input field in table  ?

Former Member
0 Kudos

Good Morning,

thanks for your help!

i decided to use  IF_WD_MESSAGE_MANAGER->REPORT_ATTRIBUTE* methods, but i think the other ways i will try in some other cases!

best regards,

Mathias

Former Member
0 Kudos

Hi Mathias,

    You can try using mandatory filed check using the class 'CL_WD_DYNAMIC_TOOL-'

and can have your mandatory field chack context level & view level.  This will also

highlight the field if a mandatory field was left blank.

Regards,

Monishankar Chatterjee