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 Issue

Former Member
0 Likes
320

hello friends...

i have Operations Which Calculates the DURATION And UNIT

say 1st ENTRY is 30 MIN

2ND ENTRY IS 80 MIN

3RD ENTRY 1.20 H (H STANDS FOR HOURS) AND SO ON.

NOW I NEED TO CALCULATE THE TOTAL TIME N SHOW THE

RESULT AS SUPPOSE 05:03 [H:M] FORMAT HOW DO I DO IT IN SAPSCRIPT.

FIELDS FOR DURATION IS AFVGD-DAUNO AND

FIELD FOR UNIT IS AFVGD-DAUNE.

PLEASE REPLY ASAP.

REGARDS

ESSAM

essamsaud@yahoo.co.in

1 REPLY 1
Read only

franois_henrotte
Active Contributor
0 Likes
284

you will have 2 variables: one for single time and one for total time

LOOP.

if AFVGD-DAUNE = minutes then time = AFVGD-DAUNO * 60.

if AFVGD-DAUNE = hours then time = '010000' * AFVGD-DAUNO.

total time = total time + time.

ENDLOOP.