SAP Knowledge Base Article - Public

2534512 - Calendar Object not Accessible to Determine Customization Logic


Currently in Cloud for Customer (C4C) system, you are allowed to maintain working days as per Country in configuration Activity Working Calendar in Business Configuration.
However, this Calendar object is not accessible from the backend through PDI (add-on solution).

You wish to assess this calendar to determine customization logic in Service Tickets, is it possible that this Calendar object can be PSM released?


The functionality to calculate dates based on Service Levels assigned to Tickets is already available.

  1. In this case you have to get the CreatedCalendarUUID from Ticket.
  2. ServiceTerms => Service Level => Operathing Hours.Root
  3. On this Service Level calendar you can do date and time operations based on the defined days and working hours.
  4. When you use the working day calendar, you can only do date operations. Time information is not considered then.

    Also, below is the code to access the calendar and calculate with it:

    import ABSL;
    import AP.Common.GDT;
    import AP.IS.DateAndTime.Global;
    import AP.CRM.Global;

    var TimePoint : TimePoint;
    var Duration_T1 : DataType::Duration;
    var CalendarUUID : UUID;

    //Retreiving the Currenr UTC timings
    var CurrDateTime = Context.GetCurrentGlobalDateTime().ToString();
    // Passing the Values into the Variables for Utility
    TimePoint.TypeCode = "5";
    TimePoint.DateTime = Library::DateTime.ParseFromString(CurrDateTime);
    var ServiceTerms = this.ServiceTerms;
    var ServiceLevelObjective = ServiceTerms.ServiceLevelObjective;
    var OperHours = ServiceLevelObjective.OperatingHours.GetFirst();
    CalendarUUID.content = OperHours.CreatedCalendarUUID.content;
    var Direction = "+";
    Duration_T1 = Library::Duration.ParseFromString("PT10H");
    var CalendarCode : WorkingDayCalendarCode;

    if ( !CalendarUUID.IsInitial() )
    var NextDateTime1 = DateTimeUtilities.MoveTimePoint(TimePoint, Duration_T1, Direction, CalendarCode, CalendarUUID);
    var NextDate2 = NextDateTime1.DateTime.content;
    var Date1 = GlobalDateTime.ParseFromString(NextDate2.ToString());
    var NextDate3 = Date1.GetDate();


KBA , AP-RC-BCT , Business Config. Tools (SAP Business ByDesign , How To


SAP Hybris Cloud for Customer add-ins 1708