Skip to Content
author's profile photo Former Member
Former Member

converting decimal minutes to "real" minutes

hi there,

in HR time management time-balances are stored in decimal minute format:

e.g. 21,67 hours

in "real time" this would be 21:40 (HH:MM)

i need to display the values in the "real time" in my ESS-portal.

do you know if there is an function module or something else for converting from "decimal" to "real" minutes ?

br

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 21, 2012 at 12:41 PM

    hi Br,

    try to concatenate to a variable and display the variable.

    sample code :

    DATA: rt1(2),

    rt2(2).

    data : rtime TYPE atnam.


    rt1 = ausp-atwrt+0(2).

    rt2 = ausp-atwrt+2(2).

    CONCATENATE rt1 rt2 INTO rtime SEPARATED BY ':'.

    thank you,

    kata.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 21, 2012 at 12:48 PM

    Or multiply the decimal duration by 3600 giving an integer for second and add it to a TIMS type field with initial value.

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 21, 2012 at 12:56 PM

    Hi Martin,

    It looks like the standard SAP code follows Raymond's suggestion rather than having a reusable function module. If you take a look at something like CATS_COMPUTE_HOURS it performs the calcuation locally.

    Regards,

    Nick

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.