‎2007 Sep 27 12:59 AM
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.
‎2007 Sep 27 1:40 AM
you need specify a field name, not a table control name
such as TABLE1-ZZVBELN
‎2010 Feb 12 7:04 PM
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.