A_ServiceContract
Service Contract Header
A_ServiceContract is a Consumption CDS View that provides data about "Service Contract Header" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 34 fields with key field ServiceContract. It has 5 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_ServiceDocumentEnhcd | ServiceContract | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | A_ServiceContractItem | _Item | $projection.ServiceContract = _Item.ServiceContract |
| [0..*] | A_ServiceContractText | _Text | $projection.ServiceContract = _Text.ServiceContract |
| [0..1] | E_ServiceDocument | _Extension | _Extension.ServiceCategory = 'BUS2000112' and $projection.ServiceContract = _Extension.ServiceOrder |
| [0..1] | I_CustMgmtExtRefID | _ReferenceServiceContract | _ReferenceServiceContract.CustMgmtObjectType = 'BUS2000112' and $projection.ServiceContract = _ReferenceServiceContract.CustMgmtDocument and _ReferenceServiceContract.CustMgmtExtRefIDType = '0003' |
| [0..1] | I_CustMgmtExtRefID | _ReferenceServiceQtan | _ReferenceServiceQtan.CustMgmtObjectType = 'BUS2000112' and $projection.ServiceContract = _ReferenceServiceQtan.CustMgmtDocument and _ReferenceServiceQtan.CustMgmtExtRefIDType = '0009' |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Service Contract Header | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | ASRVCTR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.representativeKey | ServiceContract | view | |
| ObjectModel.createEnabled | false | view | |
| ObjectModel.updateEnabled | false | view | |
| ObjectModel.deleteEnabled | false | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (34)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ServiceContract | ServiceDocument | ||
| ServiceContractType | ServiceDocumentType | |||
| ServiceContractDescription | ServiceDocumentDescription | |||
| Language | Language | |||
| ServiceContractStartDateTime | ||||
| ServiceContractEndDateTime | ||||
| PurchaseOrderByCustomer | PurchaseOrderByCustomer | |||
| CustomerPurchaseOrderDate | CustomerPurchaseOrderDate | |||
| ServiceDocGrossAmount | ServiceDocGrossAmount | |||
| ServiceDocNetAmount | ServiceDocNetAmount | |||
| ServiceDocTaxAmount | ServiceDocTaxAmount | |||
| TransactionCurrency | TransactionCurrency | |||
| ServiceContractIsReleased | ServiceDocumentIsReleased | |||
| SrvcContrCreditStatus | SrvcDocCreditStatus | |||
| SrvcDocGTSEmbargoStatus | SrvcDocGTSEmbargoStatus | |||
| SrvcDocGTSScreeningStatus | SrvcDocGTSScreeningStatus | |||
| SrvcDocGTSLglControlStatus | SrvcDocGTSLglControlStatus | |||
| SalesOrganization | SalesOrganization | |||
| DistributionChannel | DistributionChannel | |||
| Division | Division | |||
| SalesOffice | SalesOffice | |||
| SalesGroup | SalesGroup | |||
| SoldToParty | SoldToParty | |||
| ShipToParty | ShipToParty | |||
| BillToParty | BillToParty | |||
| PayerParty | PayerParty | |||
| ContactPerson | ContactPerson | |||
| PersonResponsible | ResponsibleEmployee | |||
| ServiceContractCanclnParty | ServiceDocumentCanclnParty | |||
| ServiceContrCancellationReason | ServiceDocumentCanclnReason | |||
| ReferenceServiceContract | _ReferenceServiceContract | CustMgmtExtRefID | ||
| ReferenceServiceQtan | _ReferenceServiceQtan | CustMgmtExtRefID | ||
| _Item | _Item | |||
| _Text | _Text |
@EndUserText.label: 'Service Contract Header'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog: {
sqlViewName: 'ASRVCTR',
compiler.compareFilter: true,
preserveKey: true
}
@VDM: {
viewType: #CONSUMPTION,
lifecycle.contract.type: #PUBLIC_REMOTE_API
}
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
representativeKey: 'ServiceContract',
createEnabled: false,
updateEnabled: false,
deleteEnabled: false,
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #L
}
}
@Metadata.ignorePropagatedAnnotations: true
define view A_ServiceContract
as select from I_ServiceDocumentEnhcd as ServiceContract
//Item
association [0..*] to A_ServiceContractItem as _Item on $projection.ServiceContract = _Item.ServiceContract
//Text
association [0..*] to A_ServiceContractText as _Text on $projection.ServiceContract = _Text.ServiceContract
//Extensibility
association [0..1] to E_ServiceDocument as _Extension on _Extension.ServiceCategory = 'BUS2000112'
and $projection.ServiceContract = _Extension.ServiceOrder
//External ID
// 0003 Service Contract External Reference
// 0009 Service Quotation External Reference
association [0..1] to I_CustMgmtExtRefID as _ReferenceServiceContract on _ReferenceServiceContract.CustMgmtObjectType = 'BUS2000112'
and $projection.ServiceContract = _ReferenceServiceContract.CustMgmtDocument
and _ReferenceServiceContract.CustMgmtExtRefIDType = '0003'
association [0..1] to I_CustMgmtExtRefID as _ReferenceServiceQtan on _ReferenceServiceQtan.CustMgmtObjectType = 'BUS2000112'
and $projection.ServiceContract = _ReferenceServiceQtan.CustMgmtDocument
and _ReferenceServiceQtan.CustMgmtExtRefIDType = '0009'
{
key ServiceDocument as ServiceContract,
ServiceDocumentType as ServiceContractType,
ServiceDocumentDescription as ServiceContractDescription,
Language,
cast ( ServiceContractStartDateTime as crms4_cont_start_dec15 preserving type ) as ServiceContractStartDateTime,
cast ( ServiceContractEndDateTime as crms4_cont_end_dec15 preserving type ) as ServiceContractEndDateTime,
PurchaseOrderByCustomer,
CustomerPurchaseOrderDate,
/* CUMULAT_H */
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
ServiceDocGrossAmount,
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
ServiceDocNetAmount,
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
ServiceDocTaxAmount,
TransactionCurrency,
/* STATUS */
ServiceDocumentIsReleased as ServiceContractIsReleased,
case ServiceDocumentStatus
when 'C' then 'X'
else ''
end as ServiceContractIsCompleted,
@ObjectModel.readOnly: true
SrvcDocCreditStatus as SrvcContrCreditStatus,
// GTS Embargo Status
@ObjectModel.readOnly: true
SrvcDocGTSEmbargoStatus,
// GTS Screening Status
@ObjectModel.readOnly: true
SrvcDocGTSScreeningStatus,
// GTS Legal Control
@ObjectModel.readOnly: true
SrvcDocGTSLglControlStatus,
/* ORG */
SalesOrganization,
DistributionChannel,
Division,
SalesOffice,
SalesGroup,
/* PARTNER */
SoldToParty,
ShipToParty,
BillToParty,
PayerParty,
ContactPerson,
ResponsibleEmployee as PersonResponsible,
/* Cancellation */
ServiceDocumentCanclnParty as ServiceContractCanclnParty,
ServiceDocumentCanclnReason as ServiceContrCancellationReason,
cast(
case ServiceDocumentCanclnParty
when '' then 0
else ServiceContractEndDateTime
end
as crms4_cont_end_dec15 preserving type ) as SrvcContrCancellationDateTime,
/* External ID */
_ReferenceServiceContract.CustMgmtExtRefID as ReferenceServiceContract,
_ReferenceServiceQtan.CustMgmtExtRefID as ReferenceServiceQtan,
//Associations
_Item,
_Text
}
where
ServiceObjectType = 'BUS2000112'
and ServiceDocumentTemplateType = ''
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