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

Time conversion function with bigger input field

paul_pendleton
Participant
0 Likes
614

I am trying to convert time using the "CF_UT_UNIT_CONVERSION" function. The problem is that the inport/input field "VALUE_OLD_IMP" is to small. The input field on the function is 9,3 and I have a field that is 13,3 that contains a value that is specified in PICO seconds. In the T006 table the entry is 'MS' type which is PICO seconds. Well needless to say the value in this field is sometimes to big to fit into the 9,3 field used in the "CF_UT_UNIT_CONVERSION" function module. Is there another function module out there that does the exact same thing using a bigger input field?

1 ACCEPTED SOLUTION
Read only

paul_pendleton
Participant
0 Likes
586

Just another bit of info. We are trying to convert everything into hours for reporting purposes.

3 REPLIES 3
Read only

paul_pendleton
Participant
0 Likes
587

Just another bit of info. We are trying to convert everything into hours for reporting purposes.

Read only

0 Likes
586

Hi,

For Operation time (in Milli secods, Seconds) in Prodution order we have similar issue and we have used the followig function.

CALL FUNCTION 'COR0_CONF_TO_OPR_UNIT_CONVERT'

EXPORTING

I_QUANTITY = P_ACTI1

I_CONF_UNIT = P_UNIT1

I_OPER_UNIT = 'H' " into hours

I_NOMINATOR = ' '

I_DENOMINATOR = ' '

I_MATERIAL = ' '

I_ROUT_UNIT = ' '

I_ORDER_UNIT = ' '

  • I_BASE_UNIT = ' '

  • I_ROUND = ' '

  • I_AUFNR = ' '

IMPORTING

E_QUAN_OPR = P_ACTI1

  • E_QUAN_F =

EXCEPTIONS

CONVERSION_ERROR = 1

OTHERS = 2 .

Maybe useful for you.

Regards,

Lanka

Read only

Former Member
0 Likes
586

First of all, let's make sure we're talking about the same thing. A pico-second is a 1 millionth millionth of a second. A micro-second is a millionth of a second. So I think that the MS entry in t006 is a micro second.

In any event, if you really have pico-seconds (or many many micro-seconds), you could divide the input by 1,000 (or 1,000,000) before passing it to the FM. Then multiply the result by 1,000(or 1,000,000).

Rob