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

Validatios on date

Former Member
0 Likes
1,106

Hi,

I am having date as a select-options.

I want to check that the date entered in the lower box is not greater than today...

Can anyone plzz help??

Himanshu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,083

Hi,

select-options:date for sy-datum.

at selection-screen.

if date-low > sy-udatum.

message w001(zmsgtable).

endif.

rgds,

bharat.

6 REPLIES 6
Read only

Former Member
0 Likes
1,083

use at selection screen event and compare with system date

Read only

Former Member
0 Likes
1,084

Hi,

select-options:date for sy-datum.

at selection-screen.

if date-low > sy-udatum.

message w001(zmsgtable).

endif.

rgds,

bharat.

Read only

Former Member
0 Likes
1,083

if u declare like this

selec-options : s_budat like bkpf-budat.

then no need to do any validations , system will not allow user to enter like that.

Regards

Prabhu

Read only

0 Likes
1,083

At the event,

AT selection-screen

compare the date-low with the sy-datum value

Regards

Navdeep

Read only

aakash-neelaperumal
Active Participant
0 Likes
1,083

Hi,

Try this code...

select-options : date for sy-datum.

AT SELECTION-SCREEN ON date.

loop at date.

if date-low > sy-datum.

message 'low date greater than sy-datum' type 'I'.

endif.

endloop.

Thanks..

Read only

Former Member
0 Likes
1,083

SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.

select-options: S_DATE FOR SY-DATUM.

SELECTION-SCREEN END OF BLOCK b.

AT SELECTION-SCREEN .

IF s_date-low gt sy-datum.

MESSAGE w000(ZSA) WITH 'Enter Proper Date'.

ENDIF.

LEAVE LIST-PROCESSING.

this code will help you