Skip to Content

SAP C4C Service - Time Calculation Fields

Hi experts,

I am trying to find a way to calculate the time that elapsed between creating a ticket (Created On) and Completion Date

I have tried using KUT by creating a Calculated Extension Field, but I cannot get this to work. To gain access to Date/Time fields, I can only choose 'Text' option. The only operator is '&'. I do not understand this.

Is there any way to calculate or report on time elapsed between Created On and Completion Date?

Please assist



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 22, 2016 at 11:59 PM

    Hi Kendal,

    The time to completion (from Reported On till Completion Date) is available in the Tickets Datasource as Ticket Handling Time.

    If you want to calculate the time elapsed between two other events not covered by standard, your approach is going in the right direction. You actually need at least 2 custom fields: one to store the timestamp of the first event, one to store the timestamp of the second event. If yo uwant, you can add also a calculated field with the difference, or you can simply handle this in reporting via a calculated key figure. These fields should be of type Quantity, because they will all store a number in Seconds.

    You can now define two workflow rules of type Field Update, to store the current date/time in the fields when the relevant events happen (for example, you could define a rule on Save, with condition on Status change from "In Process" to "Complete"). When defining the field update, you can pick the Calculated option to ask the system to store the timestamp.

    All custom fields of type Quantity are automatically available as key figures in reporting, so you can easily define a calculated key figure as the difference of those two fields (and further divide it by 60 to get the time in minutes, etc.).

    Hope this helps,

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Gab,

      I am busy trying this for another event, what you have described above - when a ticket goes into a status that is 'provider action' then my understanding is that it should accumulate time in the key figure for Time at Provider and the same for a status that is Requestor Action feeding the key figure Total Time at Requestor. However, I have found that the Time at Requestor has time in it for tickets that are In Process (Provider Action). This raises the question - Is time at requestor linked to Requestor Action Statuses? And similarly is Time at Provider key figure linked to status Provider Action?

      If not, then my understanding of this is wrong and I need to find a new approach to calculate total time a ticket spent with the provider and total time it spent with the requestor.

      For e.g. If a ticket's total handling time was 7 hours, this could be the timeline -

      1hour - Open (Provider Action)

      1hour - In Process (Provider Action)

      2hours - Customer Action/More info needed/Customer to Test (Requestor Action)

      2hours - In Process (Provider Action)

      1hour - Solution Proposed (Requestor Action)


      I want to depict this in a report that shows

      Time with Provider: 4hours

      Time with Requestor: 3hours

      I am testing to see if this is possible, but it would be great if you could validate this. Am I on the correct path?



  • Dec 05, 2016 at 11:42 AM

    Hi Gab

    I am trying out your advice in order to record a timestamp of when the first response was sent to the customer. The goal is to show this in the timeline section in the same way as other timestamped values e.g. Created On etc.

    However, I am having some trouble. I created an extension field in the Timeline section and then I created a workflow with the following conditions...

    When I define the action, I only get the option to add a text value. There is no option to link the update to another system field or calculate a value.

    Is there another way I can timestamp this?

    Thanks and Regards

    gvzhv.png (29.8 kB)
    qqhoi.png (26.9 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Leslie,

      What field type is Initial Response? The "Calculated" update type should be available for all fields of type Date, Time, and DateTime. Perhaps you defined Initial Response as a Text field?

      Kind regards,

  • Dec 08, 2016 at 04:42 PM

    Hi Gab

    I orginally tried with the text field as it was the only one which showed the Calculated button:

    Neither Date or Time have this option and DateTime is not available at all

    I have tried with workflows but they do not populate the field in the way I want. In the end I came up with an idea but I require help in order to realize it as I have searched the community and found nothing:

    1. Create a 'copy' of the Last Agent Interaction Date Time Key figure. This is already available under Ticket Time Points and Contact Party Datasource.

    2. Restrict this in some way that it only updates once - In the same way that the Initial Review Date and Created On fields act.

    3. Enable this figure for viewing on the Ticket Screen.

    Thank you for your help on the matter, Your time on this is always appreciated.

    Best Regards

    hsmee.png (14.4 kB)
    sxhwl.png (9.3 kB)
    xllwp.png (18.0 kB)
    uier4.png (24.8 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Leslie Finan

      Hi Leslie,

      Apologies for the delay. Not sure if you have figure this out in the meantime. You should try defining your extension field as a Decimal Number (with no decimals). The calculated field update will store the timestamp in the field as a number of seconds (since a fixed past date). By storing the timestamp for two different events in two different decimal fields, you will be able to calculate the number of seconds elapsed as the difference between the fields.

      Hope this helps!

  • avatar image
    Former Member
    Apr 21, 2017 at 10:39 AM

    Hi Gab,

    I am also facing this issue. I wan't to create a custom field as copy of a date/time field. The source field is in an activity (opend activity) of a ticket, the target field should be in the overview of activities in the ticket it self (under tab "activities"). If done this with other fields (like Completion in %), this works. But Date / Time fields seems not to update.

    Will there be more Options in the future as well? e.g. not only "&" in Calculation, Change of calculation rule of field after first creation...


    best regards


    Add comment
    10|10000 characters needed characters exceeded