Hi, Guru:
I defeine one parameter as the following:
p_etime TYPE uzeit DEFAULT sy-uzeit.
I want to minus 30 minutes on p_etime field.
I can take hours, minutes and second from p_etime. then minutes=minutes-30.
Is there any short way to do that. call function module ....?
Thanks,
what is the time format u r giving suppose if u r giving like 12:30:00
now move the 30 into one variable and suppress 30 from this and if it is lessthan thirty find how many minutes short to thirty suppose ( 12:25:00)
for this u have to 30-25 = 5 to one varible and decrease 5 from 60 and decrease hours by1 i.e 11.
Yunfa,
I dont recall any function module that does this. But I can give you the code which does this.
REPORT ZTEST_TEST. DATA : time type sy-uzeit. data : time1(2) type c. break akumar. time = sy-uzeit. time1 = time+2(2) - 30. write : time. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING INPUT = time1 IMPORTING OUTPUT = time1 . CONCATENATE time+0(2) time1 time+4(2) into time. WRITE / time.
Regards
Aneesh.
data: t_uzeit type uzeit.
t_uzeit = sy-uzeit.
t_uzeit = t_uzeit - 1800.
Add a comment