‎2006 Sep 14 4:37 AM
hi all..
how to diaplay the AM and PM next to the st-datum.
venkat
‎2006 Sep 14 4:44 AM
‎2006 Sep 14 4:49 AM
‎2006 Sep 14 5:02 AM
Hello
Use the Function Module
HRVE_CONVERT_TIME
data: time type sy-uzeit,
OUT_TYPE(2) TYPE C.
CALL FUNCTION 'HRVE_CONVERT_TIME'
EXPORTING
TYPE_TIME = 'A'
INPUT_TIME = sy-uzeit
INPUT_AM_PM = 'AM'
IMPORTING
OUTPUT_TIME = time
OUTPUT_AM_PM = out_type
EXCEPTIONS
PARAMETER_ERROR = 1
OTHERS = 2
.
Write: time,
out_type.
Reward points if this helps.
Regards
Meera
‎2006 Sep 14 4:53 AM
hi
good
your query is confusing,
SY-DATUM ll display the current date .If you want to display , if you want to display AM or PM than you check with the hour if it going beyond than use APPEND statement to append PM into it otherise AM.
You can take AM and PM as a character field.
thanks
mrutyun^
‎2006 Sep 14 4:54 AM
‎2006 Sep 14 5:06 AM
hi,
check the FM <b>HRVE_CONVERT_TIME</b>
in that you need to specify
TYPE_TIME 'A'
INPUT TIME
INPUT_AM_PM 'AM' or 'PM'
hope this helps,
do reward if it helps,
priya.
‎2006 Sep 14 4:59 AM
Hi,
data: v_time type char10.
data: v_hour type numc2.
v_hour = sy-uzeit+(2).
write: sy-uzeit to v_time.
if v_hour > '12'.
concatenate v_time 'PM' into v_time.
else.
concatenate v_time 'AM' into v_time.
endif.
write: / v_time.
Thanks,
Naren