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

input parameter validation

Former Member
0 Likes
1,191

Hi,

I have a parameter input p_window. I need to validate the input . The values entered should be either 1,2,3,4,5,6,7 .

Please sujjest me some ways of doing the validation..

regards

Avi..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
887

Go for at selection-screen on p_window event..

assuming the declaration as..

parameters p_window type i.

<b>at selection-screen on p_window. (** or u can use at selection-screen event also )

if p_window is not between 1 and 7.

error message

endif.</b>

regards,

sai ramesh

8 REPLIES 8
Read only

Former Member
0 Likes
888

Go for at selection-screen on p_window event..

assuming the declaration as..

parameters p_window type i.

<b>at selection-screen on p_window. (** or u can use at selection-screen event also )

if p_window is not between 1 and 7.

error message

endif.</b>

regards,

sai ramesh

Read only

Former Member
0 Likes
887

Hi,

Declare a Variable of length 7 char

data: p_var(7) type c value '1234567'.

At selection screen on that field : write:

if not <field> cp p_var.

message...

endif.

reward if useful

regards,

Anji

Read only

Former Member
0 Likes
887

use CO operator or use fm NUMERIC_CHECK.

p_window co '1234567890'.

regards

shiba dutta

Read only

Former Member
0 Likes
887

at selection-screen on p_window.

if p_window na '1234567'.

message e000(0) with 'invalid'.

endif.

Read only

Former Member
0 Likes
887

hi ,

try this

at selection-screen on p_window.

if p_window co '1234567'.

else.

error message,

endif.

Read only

Former Member
0 Likes
887

Avi,

at selection-screen on p_window.

if p_window CO '1234567'.

else.

<error message>

endif.

Regards,

Sujatha.

Read only

Former Member
0 Likes
887

parameters p_window type i.

at selection-screen on p_window.

if p_window lt 1 and p_window gt 7.

write an error message.

endif.

Read only

Former Member
0 Likes
887

Answered