2008 Apr 25 11:43 AM
hi experts.
Any body can give the function module for converting minutes to HR:MM
Example if i give input 125 mins output will be 02:05 .
its an urgent...
<b>points will be rewarded for sure</b>
regards,
priynaka reddy.
2008 Apr 25 11:46 AM
2008 Apr 25 11:46 AM
2008 Apr 25 11:47 AM
Hi Priyanka,
Try these FM.
CONVERSION_EXIT_SDURA_OUTPUT
RSSM_CONVERT_DAYSEC2TIMESTAMP
RRBA_DAYS_TO_TIMESTAMP_ADD
or try the foll code:
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,
Sunil
2008 Apr 25 11:48 AM
2008 Apr 25 11:52 AM
You wouldn't need a function module for it.
Just use this code.
*Local Data
DATA: l_hours type n length 2, " Hours
l_mins type n length 2, " Minutes
l_int type i. " Variable for Type I
* (Also, minutes should be a variable of type I)
l_int = minutes / 60.
l_hours = l_int.
clear l_int.
l_int = ( minutes mod 60 ) .
l_mins = l_int.
This will work...
Please reward points for the same..
Thanks..
Rahul
2008 Apr 25 12:15 PM
Hi Priyanka!
I hav already used this FM
CONVERSION_EXIT_SDURA_OUTPUT
It works fine.
U just have to give
INPUT as imoort parameter which should be times in minutes and u get time in hours as OUTPUT in export parameter.
Hope ur urgent requirement is fulfilled.
kindly reward points!!