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

Screen validation for Date/Time field

Former Member
0 Likes
878

Hi,

I need to add a search help for a Date and time field for the CRTSP(Product Created on)

Its format is 09.08.2008 23:16:59 Date + Time.

Now when i give its domain it does not provide the calander on the field.

So I had used S_crtsp type erdat. So that it will display calander on that field.

My issue is when we select the date from that calander it is unable to calidate with the internal format

which is 09.08.2008 23:16:59.

Any suggestions so that I can add calander on this field on the selection-screen and also it will validate correctly.

Any suggestions will be apprecaited!

Regards,

Kittu

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
760

Hi there..

Declare the fields at sy-datum and sy-uzeit... all the validation and internal format will be taken care of automatically...

if its still not as you expected.. then you need to check ur settings in Own data

J@Y

6 REPLIES 6
Read only

Former Member
0 Likes
760

Hi Kittu,

Check search help TIMEIO.

Regards,

Darshan Mulmule

Read only

former_member156446
Active Contributor
0 Likes
761

Hi there..

Declare the fields at sy-datum and sy-uzeit... all the validation and internal format will be taken care of automatically...

if its still not as you expected.. then you need to check ur settings in Own data

J@Y

Read only

Former Member
0 Likes
760

hi,

you can declare as date and time as

data:v_date like sy-datum ,

v_time like sy-uzeit.

Pls see table SYST.

thanks

Read only

0 Likes
760

HI,

Thank you for your response!

My issue is the format of the date which i am using is YYYY/MM/DD HH:MM:Sec

Now when i use the same field type it will not show the calander on the selection-screen.

So On the selection-screen i changed it's type as g_dat type erdat or sy-datum.

By doing so I am able to get the calander but this date should get validated against the date which we are using with YYYY/MM/DD HH:MM:SEC

Is there any way to concatenate or do condense or anything so that if user selects any date from the alaender it should only get validated against YYYY/MM/DD (HH:MM:SEC) It will not be an issue if it does not take HH:MM:Sec against the validation.

Is there any way we can do this...I hope I am making my point clear.

Any suggestions would be appreciated.

Regards,

Kittu

Read only

0 Likes
760

Change the date format to internal format at at selection screen.

You can use sy-datum and sy-uzeit but at at selection screen, declare a local variable which is compatible with your desired field type and then concatenate these two formats into your desired format.

Read only

Former Member
0 Likes
760

Hello,

Thank you for your response!

Regards,

Kittu