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

Date and Time validation together...

former_member186487
Participant
0 Likes
748

Hi,

I want to have the date and time validation together. Is it posible?

I am not able to do it using "AT SELECTION-SCREEN".

e.g.

DATE1 - DATE2 is 12/22/2009 - 05/27/2010

TIME1 - TIME2 is 15:00:00 - 01:00:00

This will result in error because the time1 is more than time2 but it is correct when it is tied to date1.

I tries to validate them together but it gives the standard error all the time.

Please help me.

Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
717

Hi,

You could have a normal range for your date field and two parameters for the times...no?


SELECTION-SCREEN BEGIN OF LINE.
 SELECTION-SCREEN COMMENT 1(33) ttime FOR FIELD p_time1.
 PARAMETERS: p_time1 type t.
 SELECTION-SCREEN COMMENT 54(2) tto FOR FIELD p_time2.
 SELECTION-SCREEN POSITION 60.
 PARAMETERS: p_time2 TYPE t.
SELECTION-SCREEN END OF LINE.

INITIALIZATION.
   ttime = 'Time'.
   tto = 'to'.

Kr,

Manu.

Hi,

You could have a normal range for your date field and two parameters for the times...no?


SELECTION-SCREEN BEGIN OF LINE.
 SELECTION-SCREEN COMMENT 1(33) ttime FOR FIELD p_time1.
 PARAMETERS: p_time1 type t.
 SELECTION-SCREEN COMMENT 54(2) tto FOR FIELD p_time2.
 SELECTION-SCREEN POSITION 60.
 PARAMETERS: p_time2 TYPE t.
SELECTION-SCREEN END OF LINE.

INITIALIZATION.
   ttime = 'Time'.
   tto = 'to'.

Kr,

Manu.

4 REPLIES 4
Read only

Former Member
0 Likes
717

Hi

I don't know what you need to do:

IF you have:

DATE1 = 12/22/2009

DATE2 = 05/27/2010

TIME1 = 15:00:00

TIME2 = 01:00:00

What do you mean with TIME2 - TIME1 (or TIME1 - TIME2)???

It should be the hours, minuts or seconds between the two dates?

Max

Read only

0 Likes
717

Thank you Manu.

It was simple and nice idea.

Resolved.

Edited by: Surendra Singh on Nov 3, 2011 4:48 PM

Read only

Former Member
0 Likes
718

Hi,

You could have a normal range for your date field and two parameters for the times...no?


SELECTION-SCREEN BEGIN OF LINE.
 SELECTION-SCREEN COMMENT 1(33) ttime FOR FIELD p_time1.
 PARAMETERS: p_time1 type t.
 SELECTION-SCREEN COMMENT 54(2) tto FOR FIELD p_time2.
 SELECTION-SCREEN POSITION 60.
 PARAMETERS: p_time2 TYPE t.
SELECTION-SCREEN END OF LINE.

INITIALIZATION.
   ttime = 'Time'.
   tto = 'to'.

Kr,

Manu.

Read only

Former Member
0 Likes
717

Or maybe a couple of Timestamp fields:

COMT_DATE_FROM

and

COMT_DATE_TO

Rob