P_SrvcContrList
Service Contracts List
P_SrvcContrList is a Composite CDS View that provides data about "Service Contracts List" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 6 fields with key fields ServiceObjectType, ServiceContract. It has 1 association to related views. Part of development package CRMS4_ANALYTICS_SERVICE_CONTR.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_ServiceDocumentEnhcd | I_ServiceDocumentEnhcd | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_SrvcContrDays | _ContractDays | $projection.ServiceContract = _ContractDays.ServiceDocument |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | PSRVCCONTRLIST | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (6)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ServiceObjectType | ServiceObjectType | ||
| KEY | ServiceContract | ServiceDocument | ||
| ServiceDocNetAmount | ServiceDocNetAmount | |||
| ServiceDocumentStatus | ServiceDocumentStatus | |||
| NumberOfDays | _ContractDays | NumberOfDays | ||
| TotalSrvcContrValueInDC | ServiceDocNetAmount |
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PSRVCCONTRLIST'
@AbapCatalog.compiler.compareFilter: true
@AccessControl: {
authorizationCheck: #NOT_REQUIRED,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
//@EndUserText.label: 'Service Contracts List'
@ObjectModel: {
usageType: {
dataClass: #MIXED,
serviceQuality: #D,
sizeCategory: #XXL
}
}
@VDM: {
viewType: #COMPOSITE,
private:true
}
define view P_SrvcContrList
as select from I_ServiceDocumentEnhcd
association [0..1] to P_SrvcContrDays as _ContractDays on $projection.ServiceContract = _ContractDays.ServiceDocument
{
key ServiceObjectType,
key ServiceDocument as ServiceContract,
ServiceDocNetAmount,
ServiceDocumentStatus,
_ContractDays.NumberOfDays,
@DefaultAggregation: #MAX
case
when _ContractDays.NumberOfDays >= 365
then ServiceDocNetAmount *(division(365,_ContractDays.NumberOfDays,2))
else ServiceDocNetAmount
end as AnnualSrvcContrValueInDC,
ServiceDocNetAmount as TotalSrvcContrValueInDC
}
where
ServiceObjectType = 'BUS2000112'
and(
ServiceDocumentStatus = 'A'
or ServiceDocumentStatus = 'B'
or ServiceDocumentStatus = 'D'
)
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA