Skip to Content

Collect statment on time feilds

Hi ,

Is it possible to use collect statment to sum the fields of the time.

I have a requirement where i am using the collect statement on the time fields whis is not summing up the value.

if collect does not do it can please suggest some alternative instead of loop.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jun 13, 2019 at 05:18 AM

    It seems an odd requirement. Why would you want to add five past one to a quarter to seven? I guess you're perhaps wanting to sum elapsed time?

    In that case add a field to your internal table and fill it with the time converted to seconds. Use collect to sum up the seconds. Convert the seconds later to dd:hh:mm:ss.

    if collect does not do it can please suggest some alternative instead of loop. This is a bit odd as well, since collect requires a loop. You could use a table comprehension like VALUE #( FOR wa IN itab... I suppose.

    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.