03-29-2008 12:27 PM
Hi all,
Is there any FM to calculate given data into hours and minutes.
Suppose i have 80 it should display 1hr 20 mins
Can any body tell me ASAP.
Regards,
Sagar.
03-29-2008 12:32 PM
Try these FM.
RSSM_CONVERT_DAYSEC2TIMESTAMP
RRBA_DAYS_TO_TIMESTAMP_ADD
Regards,
Chandru
03-29-2008 12:38 PM
Hi Sagar,
I am not sure of FM. But u can use the logic below for ur requirement.
DATA: l_input TYPE i VALUE '80',
l_hr TYPE i,
l_min TYPE i.
l_hr = l_input DIV 60.
l_min = l_input MOD 60.
WRITE:/1 l_hr, 'hr', l_min, 'min.'.
Thanks,
Vinod.
03-29-2008 12:39 PM
Hi VidysSagar Reddy Sannala,
Use the function module
CONVERSION_EXIT_SDURA_OUTPUT
It accepts minutes as input and gives the hour and remaining minutes as output
e.g. You enter
for 180, you get the output as 3:00;
for 207, the output is 3:27
Hope it will solve your problem
Reward points if useful..
Thanks & Regards
ilesh 24x7
03-29-2008 12:40 PM
hi check this..
parameters:p_min(3) type c.
data: hours(2) type c,
min(2) type c,
c(2) type c,
d type i.
if p_min lt 60.
hours = 0.
min = p_min.
write:/ hours , 'hours' , min, 'minutes'.
else.
c = p_min mod 60 .
d = p_min / 60.
hours = 0.
min = c.
write:/ d , 'hours' , c , 'minutes'.
endif.
regards,
venkat.