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: 

Field validations and screen properties.

Former Member
0 Kudos

Hi,

I am doing validation for Company Code Select-Options. When the user enters the wrong ccode ,it triggers the error message and the cursor is focusing to the first element in the selection screen. How do I focus the cursor to the ccode when there is error. Please suggest.

Thanks,

Rajani.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Use "set cursor" statement.

SET CURSOR FIELD field

4 REPLIES 4

Former Member
0 Kudos

Hi,

Use "set cursor" statement.

SET CURSOR FIELD field

0 Kudos

Hi Shruthi,

Thanks for the relevant reply. But its not working. I included this statement after the Form Validations. Please let me know where to use this statement.

Thanks,

Rajani.

Former Member
0 Kudos

Hi,

Just go through this code.....

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS:

s_zbukr FOR regup-zbukr,

s_lifnr FOR regup-lifnr,

SELECTION-SCREEN END OF BLOCK b1.

PERFORM check_bukrs.

FORM check_bukrs.

SELECT COUNT(*) FROM t001 WHERE bukrs IN s_bukrs.

IF sy-subrc NE 0.

MESSAGE e208 WITH 'Comapany code not found'(002).

ENDIF.

ENDFORM.

Thanks,

Former Member
0 Kudos

Hi,

Instead of validating all the fields in At Selection-Screen use

At Selection-Screen on FIELD. This will focus the cusor on the validating field.