cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Time field format

Former Member
0 Kudos

Hi All,

I have a parameter field for SY-UZEIT in my selection-screen.

On pressing F4 on this field, I want to show the system time in 24 hour format, with HH:MM only.

How can I do this?

Regards,

Raj

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Use EDIT MASK to change the format of time.

Thanks,

Pramod

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Raj!

Field sy-uzeit has 6 places (internally) - when you just show 4 places in any popup, user would have to enter the seconds manually in addition afterwards.

You might use a different (own) field.

Or you just fill in a default value in:

INITIALIZATION.
p_uzeit = sy-uzeit.

Then there is no need for a popup or search help.

Regards,

Christian

Former Member
0 Kudos

Hi Rajasekhar,

1. Suppose, we can do this,

then also,

the time format will be HH:MM:SS (in the field)

2. So one way is after selection,

we can reset the second to Zero

using logic like

mytime+4(2) = '00'.

I hope it helps.

regards,

amit m.