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

subbarao_ilam
Explorer
0 Likes
458

Hi All,

Please tell me how to set a cursor on a particular field of a transaction when the value entered is wrong.... in module pool program. I have used set cursor in PAI of the screen but it is not working........

thanx in Advance..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
431

Hi

Check the below syntax..

IF NOT p_sdate2 IS INITIAL.

IF p_sdate2 > p_sdate1.

MESSAGE e001(00) WITH text-007.

ENDIF.

ENDIF.

IF NOT p_ddate2 IS INITIAL.

IF p_ddate2 > p_ddate1.

SET CURSOR FIELD 'P_DDATE1'.

MESSAGE e001(00) WITH text-007.

ENDIF.

ENDIF.

SET CURSOR FIELD 'FIELD'

FIELD SHOULD BE IN CAPITAL LETTERS.

HOPE IT HELPS>

Praveen

2 REPLIES 2
Read only

Former Member
0 Likes
432

Hi

Check the below syntax..

IF NOT p_sdate2 IS INITIAL.

IF p_sdate2 > p_sdate1.

MESSAGE e001(00) WITH text-007.

ENDIF.

ENDIF.

IF NOT p_ddate2 IS INITIAL.

IF p_ddate2 > p_ddate1.

SET CURSOR FIELD 'P_DDATE1'.

MESSAGE e001(00) WITH text-007.

ENDIF.

ENDIF.

SET CURSOR FIELD 'FIELD'

FIELD SHOULD BE IN CAPITAL LETTERS.

HOPE IT HELPS>

Praveen

Read only

Former Member
0 Likes
431

Hi Subbu,

Please ensure you put the SET CURSOR FIELD '<fieldname>'. command before the MESSAGE (raising error) command.

Once you raise an error message, the program control does not go to the next command. Hence place the SET command, before MESSAGE and check.

Cheers,

Aditya