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: 

Validation

Former Member
0 Kudos

Hi All,

I need to do the Validation for certain field that should contain only the numeric value.

If the Field entered with some wrong value then in the same selection screen the error message to be displayed and cursor should be in the wrong entered field.

Thanks in advance,

Ram M

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi Ram,,

AT SELECTION-SCREEN.

use FM  NUMERIC_CHECK

if sy-subrc ne 0.
  SET CURSOR FIELD 'P_FIELD'
  message e001(ee) with 'Enter numbers'.
endif.

3 REPLIES 3

Former Member
0 Kudos

hi Ram,,

AT SELECTION-SCREEN.

use FM  NUMERIC_CHECK

if sy-subrc ne 0.
  SET CURSOR FIELD 'P_FIELD'
  message e001(ee) with 'Enter numbers'.
endif.

Former Member
0 Kudos

Hi,

If you decalre the field with data type as i or num, then it will not allow the character fields to enter.

reward points if it is helpful.

Regards,

Sangeetha.a

Former Member
0 Kudos

you can use CA (contains any) to check if there are letters...you can also use SET CURSOR..