Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

function module to convert UOM to hours

Former Member
0 Likes
2,222

is there a standard FM that will convert a field value to hours? I have some in seconds & minutes and I need to convert all to hours. I do have the unit filed as well

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,223

Use UNIT_CONVERSION_SIMPLE

5 REPLIES 5
Read only

Former Member
0 Likes
1,223

v_time_diff type i.

v_date_diff = date2 - date1.

v_time_diff = time2 - time1. " Gives difference in seconds

v_time_diff = v_time_diff / 60. " Gives difference in Minutes

FM : /SDF/CMO_DATETIME_DIFFERENCE

L_TO_TIME_DIFF

Read only

Former Member
0 Likes
1,224

Use UNIT_CONVERSION_SIMPLE

Read only

0 Likes
1,223

Do you know what input needs to be? I thought a number but it says invalid

Read only

0 Likes
1,223

You cannot test this from SE37.

Read only

0 Likes
1,223

okay thanks