Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

set cursor on table control not working

Former Member
0 Likes
700

Hi,

I have a screen with delivery number field on top with Get Data Button next to it. Once I click on Get Data, I want to get all the handling units and show them in a table control below and show the first line of that table control selected by default.

I m able to get the data but the cursor always goes back to the delivery number field.

I have the following code in PBO

  • Status & title for the screen

MODULE status_0100.

And in the module, the last lines are as follows

if sy-ucomm = 'GET'.

s_vepo-sel = c_x.

set cursor field 'TABLE1' line 1. "TABLE1 is name of the table control in screen

"painter

endif.

I debugged and saw that the line " set cursor field 'TABLE1' line 1." is indeed the last line which gets executed but still the cursor goes back to delivery number field and table row doesnt get selected.

Thanks for reading.

2 REPLIES 2
Read only

Former Member
0 Likes
470

you need specify a field name, not a table control name

such as TABLE1-ZZVBELN

Read only

Former Member
0 Likes
470

Try maintaining the "Cursor position" in the screen layout in Attributes tab with the field name that you want the default cursor position to be present.

Regards,

Shri Hari.