C_UtilitiesServiceByAgent

DDL: C_UTILITIESSERVICEBYAGENT Type: view_entity CONSUMPTION

IS U BR Avg Serv Time Average by Agent

C_UtilitiesServiceByAgent is a Consumption CDS View that provides data about "IS U BR Avg Serv Time Average by Agent" in SAP S/4HANA. It reads from 1 data source (I_UtilitiesServiceDurationTP) and exposes 4 fields with key field CreatedByUser. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_UtilitiesServiceDurationTP I_UtilitiesServiceDurationTP from

Parameters (5)

NameTypeDefault
P_ValidFromDateTime crms4_act_date_from
P_ValidToDateTime crms4_act_date_to
P_CreatedByUser crmt_created_by
P_ServiceDefectCode crm_qcode
P_DistributionChannel crmt_distribution_channel

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_UtilitiesServiceTargetTimeTP _TargetByAgent _TargetByAgent.ISU_BR_CardGroup = 'A'
[0..1] I_UtilitiesServiceTargetTimeTP _TargetTotal _TargetTotal.ISU_BR_CardGroup = 'T'

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
Metadata.allowExtensions true view
EndUserText.label IS U BR Avg Serv Time Average by Agent view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY CreatedByUser CreatedByUser User Name
WorkDuration
dec42100else100endasISU_BR_TargetPercent
ISU_BR_Percentage

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_UtilitiesServiceByAgent.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- Parameters: P_ValidFromDateTime : crms4_act_date_from, P_ValidToDateTime : crms4_act_date_to, P_CreatedByUser : crmt_created_by, P_ServiceDefectCode : crm_qcode, P_DistributionChannel : crmt_distribution_channel

CREATE VIEW C_UtilitiesServiceByAgent AS
SELECT
  CreatedByUser,
  avg(WorkDuration as abap.decfloat16) AS WorkDuration,
  case when max(case when _TargetByAgent.ISU_BR_TargetSeconds is not null then _TargetByAgent.ISU_BR_TargetSeconds else _TargetTotal.ISU_BR_TargetSeconds end) <> 0 then (cast( avg(WorkDuration as abap.decfloat16) / max(case when _TargetByAgent.ISU_BR_TargetSeconds is not null then _TargetByAgent.ISU_BR_TargetSeconds else _TargetTotal.ISU_BR_TargetSeconds end) as abap.dec( 4, 2) )) * 100 else 100 end as ISU_BR_TargetPercent AS dec42100else100endasISU_BR_TargetPercent,
  cast(' % ' as unit) AS ISU_BR_Percentage
FROM I_UtilitiesServiceDurationTP
LEFT OUTER JOIN I_UtilitiesServiceTargetTimeTP AS _TargetByAgent ON _TargetByAgent.ISU_BR_CardGroup = 'A'  -- association [0..1]
LEFT OUTER JOIN I_UtilitiesServiceTargetTimeTP AS _TargetTotal ON _TargetTotal.ISU_BR_CardGroup = 'T'  -- association [0..1]
;