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

Validation on a field

Former Member
0 Likes
591

Hi Folks,

I have created field for entering the name of the person.That field should accept only characters i.e from "A to Z". and should not allow any numbers or special charactes.Now pls suggest me how to do this......

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
565

IF INitab-fld CO

'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.

ENDif.

Regards,

Amit

Reward all helpful replies.

IF INitab-fld CO

'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.

ENDif.

Regards,

Amit

Reward all helpful replies.

3 REPLIES 3
Read only

amit_khare
Active Contributor
0 Likes
566

IF INitab-fld CO

'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.

ENDif.

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
565

data : text(5) value 'A1BC3',

len type i,

pos type i,

v_char.

compute len = strlen( text ).

do len times.

v_char = text+pos(1).

if v_char co sy-abcde.

else.

message 'Give the char value only' type 'E'.

endif.

pos = pos + 1.

endloop.

or

check

if text co sy-abcde.

else.

message 'Give the char value only' type 'E'.

endif.

regards

shiba dutta

Read only

Former Member
0 Likes
565

data : v_data(52) type c.

v_data = sy-abcde.

if urfield co v_data.

else.

message.

endif.

Reward Points if it is useful

Thanks

Seshu