Application Development 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: 

set cursor in table control field

Former Member
0 Kudos

I have developed module using table control have done validation for one field on Enter key press.In change mode if user changes value in table control field and presses Enter key then system is showing Error message on status bar and table control gets gray out.

if user again hits Enter key then this error message clears and Table control is in Edit mode.

Here I wan that Cursor should go to same filed from which error message occurred.

I have written Get Cursor In PAI event and Set Cursor in PBO after Loop at table control. I tried Set cursor within Lop at Table control in PBO.

But cursor is not coming on that field of table control.

I have written set cursor as below:

Set Cursor Field itab-fieldname Line lineno Offset offsetval.

Here itab is internal table assigned to table control.

Please let me know why cursor is not setting on particular field on table control.

2 REPLIES 2

Former Member
0 Kudos

Hi,

You need to write like

Set Cursor Field <b>'</b>itab-fieldname<b>'</b> Line lineno Offset offsetval.

Regards

Sudheer

Former Member
0 Kudos

hi

even i did one table control.

like i create the new data.

i type some value in the table control line which in turn is the work area.

say after one record i press enter.

then the ok_code will have the previous value. i.e. if ok_code for the create new is say &CRE1. then after typing the data in the record the value ok_code will be &CRE1 only.

so for that either you have to read the record st in some other internal table and flag is set when user presses the enter.

say if the user presses the enter many times then modify the other internal tables.

i suggest if you work with flag and internal table concept then your Table control will not change in GRAY.

if you have any doubt then i could share with you my code as well because my problem solved like this only.

thanks

ekta