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

Selection Screen Validation for Character

Former Member
0 Likes
1,073

Hi All

My query is regarding the selection screen validation for character.

I am using a Select-option: S_ORDER FOR VBAK-VBELN OBLIGATORY.

and S_order should be only having the numeric field.

Please help how to validate it for character field.

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
1,042

Hi,

at selection-screen.

if not s_order[] is initial.

IF S_ORDER-low CA 'AB...Z'.

throw error message.

elseif s_order-high CA 'AB...Z'.

throw error message.

ENDIF.

ENDIF.

Regards,

nagaraj

9 REPLIES 9
Read only

Former Member
0 Likes
1,042

Hi

Please use the FM NUMERIC_CHECK to check whether the value entered is numeric or not.

~ Ranganath

Read only

Former Member
0 Likes
1,042

Hi,

Do as below :

at selection-screen.

if not s_order[] is initial.

if s_order-low CA 'ABCDEF.............Z'.

message 'Enter only numerics only' type 'E'.

endif.

"similarly for s_order-high also.

endif.

Thanks,

Sriram Ponna.

Read only

former_member404244
Active Contributor
0 Likes
1,043

Hi,

at selection-screen.

if not s_order[] is initial.

IF S_ORDER-low CA 'AB...Z'.

throw error message.

elseif s_order-high CA 'AB...Z'.

throw error message.

ENDIF.

ENDIF.

Regards,

nagaraj

Read only

0 Likes
1,042

Well this code is taking my program to DUMP!!

Kindly check !!

Read only

0 Likes
1,042

Hi,

Here i cannot check it..kindly tell what the dump is about..I mean dump analysis.

Reagrds,

nagaraj

Read only

0 Likes
1,042

Hi

When i try validating the Character inputs, prog goes to dump.

ANd dump analysis says that Unable To interpret " A "as a number

and same is the case with other codes present in the thread.

Kindly help in this regard.

Edited by: Gaurav Verma on Jan 10, 2008 10:55 AM

Read only

0 Likes
1,042

Thanks Guys !!

The Problem is resolved now !!

Read only

Former Member
0 Likes
1,042

Hi,

Try like this.

AT SELECTION-SCREEN.

if not s_order[]-low is initial.

if s_order-low CA SY-ABCDE.

message ' ' type 'E'.

endif.

if not s_order[]-high is initial.

if s_order-high CA SY-ABCDE.

message ' ' type 'E'.

endif.

Rewards points if helpful.

Regards,

Srinivas Ch

Read only

Former Member
0 Likes
1,042

Verma,

at selection-screen.

if not s_order-low is initial.

if s_order-low CA Sy-abcde.

message 'Enter only numerics only' type 'E'.

endif.

if s_order-high CA Sy-abcde.

message 'Enter only numerics only' type 'E'.

endif.

endif.

Don't forget to reward if useful