Hi Wenwen,
I am still not convinced why a write statement is not enough to handle this. Whatever the user enters just move it to a variable of type SY-UZEIT and then use a write statement on this variable. This should give you the time in user format.
Ex.
user_entry = 16.
l_time TYPE sy-uzeit.
WRITE: user_entry TO l_time.
Regards
Ramanan R.S.