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,

I'd like my report to display an error message when the user select a month that does not exist, I'm using the following but not getting the required. Can you help plz?

If month < '1' and month > '12'.

message e001(00) with 'Does not exist.'.

endif.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can do as below in at selection-screen event.


if sp_month GT 12.
message 'Month is invalid' type 'E'.
endif.

Thanks,

Sriram Ponna.

4 REPLIES 4

Former Member
0 Kudos

Hi,

You can do as below in at selection-screen event.


if sp_month GT 12.
message 'Month is invalid' type 'E'.
endif.

Thanks,

Sriram Ponna.

Former Member
0 Kudos

hi,

At selection-screen.

if month LT 01 or month GT 12.

message eXXX with text-001.

clear month.

endif.

Cheers,

BUjji

Former Member
0 Kudos

Hi,

initially assign months like

case month.

when 'january'.

int = 1.

when 'feb'.

int =2.

endcase.

then write ur condition.

if int gt 1 and lt 12.

message

endif.

Plzz reward points if it helps.

Former Member
0 Kudos

Hi,

if it is a parameter declare it as below

parameters p_date type dats.

if it is a sel-option declare it as below

data date type dats.

select-options s_date for date.

validation ll be done automatically..........

or

at selection-screen.

if not ( p_month >= '02' and p_month <= '05' ).

message.........

endif.

it ll allow only feb to may........

Cheers,

jose.