R_ServiceContractTP
Service Contract - TP
R_ServiceContractTP is a Transactional CDS View that provides data about "Service Contract - TP" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 101 fields with key field ServiceContract. It has 16 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_ServiceDocumentEnhcd | I_ServiceDocumentEnhcd | from |
Associations (16)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_StatusObjectUUIDStatus | _SrvcContrStatus | $projection.ServiceContractUUID = _SrvcContrStatus.StatusObjectUUID and ( _SrvcContrStatus.StatusCode = 'I1002' or _SrvcContrStatus.StatusCode = 'I1003' or _SrvcContrStatus.StatusCode = 'I1004' or _SrvcContrStatus.StatusCode = 'I1005' ) and _SrvcContrStatus.StatusIsActive = 'X' |
| [0..1] | I_CustMgmtExtRefID | _ExtRefServiceContract | _ExtRefServiceContract.CustMgmtObjectType = 'BUS2000112' and $projection.ServiceContract = _ExtRefServiceContract.CustMgmtDocument and _ExtRefServiceContract.CustMgmtExtRefIDType = '0003' |
| [0..1] | I_CustMgmtExtRefID | _ExtRefServiceQtan | _ExtRefServiceQtan.CustMgmtObjectType = 'BUS2000112' and $projection.ServiceContract = _ExtRefServiceQtan.CustMgmtDocument and _ExtRefServiceQtan.CustMgmtExtRefIDType = '0009' |
| [0..1] | I_CustMgmtExtRefID | _ExtRefLegalContract | _ExtRefLegalContract.CustMgmtObjectType = 'BUS2000112' and $projection.ServiceContract = _ExtRefLegalContract.CustMgmtDocument and _ExtRefLegalContract.CustMgmtExtRefIDType = '0021' |
| [0..1] | I_WBSElementBasicData | _WBSElement | _WBSElement.WBSElementInternalID = I_ServiceDocumentEnhcd.WBSElementInternalID |
| [0..1] | R_SrvcDocDocumentFlow | _RefServiceTemplate | $projection.ServiceContractUUID = _RefServiceTemplate.ServiceDocumentUUID and _RefServiceTemplate.PrdcssrSuccssrDocObjectType = 'BUS2000112' and _RefServiceTemplate.ServiceObjectType = 'BUS2000112' and _RefServiceTemplate.ServiceDocumentTemplateType is not initial |
| [0..1] | E_ServiceDocument | _Extension | $projection.ServiceObjectType = _Extension.ServiceCategory and $projection.ServiceContract = _Extension.ServiceOrder |
| [0..*] | R_ServiceContractItemTP | _ServiceContractItemTP | |
| [0..*] | R_SrvcContrPartnerTP | _SrvcContrPartnerTP | |
| [0..*] | R_SrvcContrPriceElementTP | _SrvcContrPriceElementTP | |
| [0..*] | R_SrvcContrUserStatusTP | _SrvcContrUserStatusTP | |
| [0..*] | R_SrvcContrAppointmentTP | _SrvcContrAppointmentTP | |
| [0..*] | R_SrvcContrDurationTP | _SrvcContrDurationTP | |
| [0..*] | R_SrvcContrFUPBillgDocTP | _SrvcContrFUPBillgDocTP | |
| [0..*] | R_SrvcContrFUPSrvcOrdTP | _SrvcContrFUPSrvcOrdTP | |
| [0..*] | R_SrvcContrLongTextTP | _SrvcContrLongTextTP | |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #TRANSACTIONAL | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| EndUserText.label | Service Contract - TP | view | |
| ObjectModel.sapObjectNodeType.name | ServiceContract | view | |
| ObjectModel.representativeKey | ServiceContract | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (101)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ServiceContract | ServiceDocument | ||
| ServiceObjectType | ServiceObjectType | |||
| ServiceContractType | ServiceDocumentType | |||
| ServiceContractUUID | ServiceDocumentUUID | |||
| ServiceContractDescription | ServiceDocumentDescription | |||
| Language | Language | |||
| PostingDate | PostingDate | |||
| ServiceDocCreationDateTime | ServiceDocCreationDateTime | |||
| ServiceDocChangedDateTime | ServiceDocChangedDateTime | |||
| ServiceDocumentCreatedByUser | ServiceDocumentCreatedByUser | |||
| ServiceDocumentChangedByUser | ServiceDocumentChangedByUser | |||
| SoldToParty | SoldToParty | |||
| ShipToParty | ShipToParty | |||
| BillToParty | BillToParty | |||
| PayerParty | PayerParty | |||
| ContactPersonBusinessPartnerId | ContactPerson | |||
| RespEmployeeBusinessPartnerId | ResponsibleEmployee | |||
| PaymentTerms | PaymentTerms | |||
| PaymentMethod | PaymentMethod | |||
| SEPAMandate | SEPAMandate | |||
| SrvcSEPAMandateRelevance | SrvcSEPAMandateRelevance | |||
| SalesOrganization | SalesOrganization | |||
| DistributionChannel | DistributionChannel | |||
| Division | Division | |||
| SalesOffice | SalesOffice | |||
| SalesGroup | SalesGroup | |||
| EnterpriseServiceOrganization | EnterpriseServiceOrganization | |||
| SalesOrganizationOrgUnitID | SalesOrganizationOrgUnitID | |||
| SalesOfficeOrgUnitID | SalesOfficeOrgUnitID | |||
| SalesGroupOrgUnitID | SalesGroupOrgUnitID | |||
| ServiceOrganization | ServiceOrganization | |||
| ServiceContractStatus | ServiceDocumentStatus | |||
| SrvcContrBillingStatus | ServiceDocBillingStatus | |||
| SrvcDocRejectionStatus | SrvcDocRejectionStatus | |||
| ServiceContractHasError | ServiceDocumentHasError | |||
| SrvcDocTransferStatus | SrvcDocTransferStatus | |||
| SrvcContrCreditStatus | SrvcDocCreditStatus | |||
| SrvcDocGTSEmbargoStatus | SrvcDocGTSEmbargoStatus | |||
| SrvcDocGTSScreeningStatus | SrvcDocGTSScreeningStatus | |||
| SrvcDocGTSLglControlStatus | SrvcDocGTSLglControlStatus | |||
| ServiceContractStartDateTime | ServiceContractStartDateTime | |||
| ServiceContractEndDateTime | ServiceContractEndDateTime | |||
| SrvcContrEarliestStartDateTime | SrvcContrEarliestStartDateTime | |||
| SrvcContrLatestEndDateTime | SrvcContrLatestEndDateTime | |||
| TransactionCurrency | TransactionCurrency | |||
| ServiceDocGrossAmount | ServiceDocGrossAmount | |||
| ServiceDocNetAmount | ServiceDocNetAmount | |||
| ServiceDocTaxAmount | ServiceDocTaxAmount | |||
| PricingDocument | PricingDocument | |||
| ServiceContractCanclnParty | ServiceDocumentCanclnParty | |||
| ServiceContrCancellationReason | ServiceDocumentCanclnReason | |||
| ServiceContractCanclnSts | ServiceContractCanclnSts | |||
| PurchaseOrderByCustomer | PurchaseOrderByCustomer | |||
| CustomerPurchaseOrderDate | CustomerPurchaseOrderDate | |||
| ServiceContractRejectionReason | ServiceDocumentRejectionReason | |||
| SrvcContrExternalReference | _ExtRefServiceContract | CustMgmtExtRefID | ||
| ServiceQtanExtReference | _ExtRefServiceQtan | CustMgmtExtRefID | ||
| LegalContractExtReference | _ExtRefLegalContract | CustMgmtExtRefID | ||
| RefBusinessSolutionOrder | RefBusinessSolutionOrder | |||
| RefServiceContractTemplate | ||||
| WBSElementExternalID | _WBSElement | WBSElementExternalID | ||
| _ServiceContractItemTP | _ServiceContractItemTP | |||
| _SrvcContrPriceElementTP | _SrvcContrPriceElementTP | |||
| _ServiceDocumentType | _ServiceDocumentType | |||
| _ServiceObjType | _ServiceObjType | |||
| _SoldToParty | _SoldToParty | |||
| _ShipToParty | _ShipToParty | |||
| _BillToParty | _BillToParty | |||
| _PayerParty | _PayerParty | |||
| _ContactPerson | _ContactPerson | |||
| _RespEmployee | _RespEmployee | |||
| _PaymentTerms | _PaymentTerms | |||
| _PaymentMethod | _PaymentMethod | |||
| _SrvcSEPAMandateRelevance | _SrvcSEPAMandateRelevance | |||
| _SalesOrganization | _SalesOrganization | |||
| _DistributionChannel | _DistributionChannel | |||
| _Division | _Division | |||
| _SalesOffice | _SalesOffice | |||
| _SalesGroup | _SalesGroup | |||
| _SrvcDocumentRejectionReason | _SrvcDocumentRejectionReason | |||
| _SalesOrganizationOrgUnit_2 | _SalesOrganizationOrgUnit_2 | |||
| _SalesOfficeOrgUnit_2 | _SalesOfficeOrgUnit_2 | |||
| _SalesGroupOrgUnit_2 | _SalesGroupOrgUnit_2 | |||
| _ServiceOrganizationOrgUnit_2 | _ServiceOrganizationOrgUnit_2 | |||
| _EnterpriseServiceOrg | _EnterpriseServiceOrg | |||
| _SrvcContrStatus | _SrvcContrStatus | |||
| _SrvcDocGTSEmbargoStatus | _SrvcDocGTSEmbargoStatus | |||
| _SrvcDocGTSScreeningStatus | _SrvcDocGTSScreeningStatus | |||
| _SrvcDocGTSLglControlStatus | _SrvcDocGTSLglControlStatus | |||
| _TransactionCurrency | _TransactionCurrency | |||
| _ExtRefServiceContract | _ExtRefServiceContract | |||
| _ExtRefServiceQtan | _ExtRefServiceQtan | |||
| _ExtRefLegalContract | _ExtRefLegalContract | |||
| _ServiceContractCanclnSts | _ServiceContractCanclnSts | |||
| _SrvcContrPartnerTP | _SrvcContrPartnerTP | |||
| _SrvcContrUserStatusTP | _SrvcContrUserStatusTP | |||
| _SrvcContrFUPBillgDocTP | _SrvcContrFUPBillgDocTP | |||
| _SrvcContrFUPSrvcOrdTP | _SrvcContrFUPSrvcOrdTP | |||
| _SrvcContrAppointmentTP | _SrvcContrAppointmentTP | |||
| _SrvcContrDurationTP | _SrvcContrDurationTP | |||
| _SrvcContrLongTextTP | _SrvcContrLongTextTP |
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
@VDM: {
viewType: #TRANSACTIONAL,
lifecycle.contract.type: #SAP_INTERNAL_API
}
@Metadata:
{
ignorePropagatedAnnotations: true
}
@EndUserText.label: 'Service Contract - TP'
@ObjectModel.sapObjectNodeType.name: 'ServiceContract'
@ObjectModel: {
semanticKey: ['ServiceContract'],
representativeKey: 'ServiceContract',
usageType: {dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #L}
}
define root view entity R_ServiceContractTP
as select from I_ServiceDocumentEnhcd
association [0..1] to I_StatusObjectUUIDStatus as _SrvcContrStatus on $projection.ServiceContractUUID = _SrvcContrStatus.StatusObjectUUID
and (
_SrvcContrStatus.StatusCode = 'I1002'
or _SrvcContrStatus.StatusCode = 'I1003'
or _SrvcContrStatus.StatusCode = 'I1004'
or _SrvcContrStatus.StatusCode = 'I1005'
)
and _SrvcContrStatus.StatusIsActive = 'X'
association [0..1] to I_CustMgmtExtRefID as _ExtRefServiceContract on _ExtRefServiceContract.CustMgmtObjectType = 'BUS2000112'
and $projection.ServiceContract = _ExtRefServiceContract.CustMgmtDocument
and _ExtRefServiceContract.CustMgmtExtRefIDType = '0003'
association [0..1] to I_CustMgmtExtRefID as _ExtRefServiceQtan on _ExtRefServiceQtan.CustMgmtObjectType = 'BUS2000112'
and $projection.ServiceContract = _ExtRefServiceQtan.CustMgmtDocument
and _ExtRefServiceQtan.CustMgmtExtRefIDType = '0009'
association [0..1] to I_CustMgmtExtRefID as _ExtRefLegalContract on _ExtRefLegalContract.CustMgmtObjectType = 'BUS2000112'
and $projection.ServiceContract = _ExtRefLegalContract.CustMgmtDocument
and _ExtRefLegalContract.CustMgmtExtRefIDType = '0021'
association [0..1] to I_WBSElementBasicData as _WBSElement on _WBSElement.WBSElementInternalID = I_ServiceDocumentEnhcd.WBSElementInternalID
association [0..1] to R_SrvcDocDocumentFlow as _RefServiceTemplate on $projection.ServiceContractUUID = _RefServiceTemplate.ServiceDocumentUUID
and _RefServiceTemplate.PrdcssrSuccssrDocObjectType = 'BUS2000112'
and _RefServiceTemplate.ServiceObjectType = 'BUS2000112'
and _RefServiceTemplate.ServiceDocumentTemplateType is not initial
//! Extensibility support
association [0..1] to E_ServiceDocument as _Extension on $projection.ServiceObjectType = _Extension.ServiceCategory
and $projection.ServiceContract = _Extension.ServiceOrder
composition [0..*] of R_ServiceContractItemTP as _ServiceContractItemTP
composition [0..*] of R_SrvcContrPartnerTP as _SrvcContrPartnerTP
//composition [0..*] of R_SrvcContrRefObjectTP as _SrvcContrReferenceObjectTP
composition [0..*] of R_SrvcContrPriceElementTP as _SrvcContrPriceElementTP
composition [0..*] of R_SrvcContrUserStatusTP as _SrvcContrUserStatusTP
composition [0..*] of R_SrvcContrAppointmentTP as _SrvcContrAppointmentTP
composition [0..*] of R_SrvcContrDurationTP as _SrvcContrDurationTP
composition [0..*] of R_SrvcContrFUPBillgDocTP as _SrvcContrFUPBillgDocTP
composition [0..*] of R_SrvcContrFUPSrvcOrdTP as _SrvcContrFUPSrvcOrdTP
composition [0..*] of R_SrvcContrLongTextTP as _SrvcContrLongTextTP
//composition [0..*] of R_SrvcContrFUPBusSolnOrdTP as _SrvcContrFUPBusSolnOrdTP
{
// Administrative fields
key ServiceDocument as ServiceContract,
@ObjectModel.foreignKey.association: '_ServiceObjType'
ServiceObjectType,
@ObjectModel.foreignKey.association: '_ServiceDocumentType'
ServiceDocumentType as ServiceContractType,
ServiceDocumentUUID as ServiceContractUUID,
ServiceDocumentDescription as ServiceContractDescription,
Language,
PostingDate,
ServiceDocCreationDateTime,
ServiceDocChangedDateTime,
ServiceDocumentCreatedByUser,
ServiceDocumentChangedByUser,
// Partners
@ObjectModel.foreignKey.association: '_SoldToParty'
SoldToParty,
@ObjectModel.foreignKey.association: '_ShipToParty'
ShipToParty,
@ObjectModel.foreignKey.association: '_BillToParty'
BillToParty,
@ObjectModel.foreignKey.association: '_PayerParty'
PayerParty,
@ObjectModel.foreignKey.association: '_ContactPerson'
ContactPerson as ContactPersonBusinessPartnerId,
@ObjectModel.foreignKey.association: '_RespEmployee'
ResponsibleEmployee as RespEmployeeBusinessPartnerId,
// Billing Relevant Fields
@ObjectModel.foreignKey.association: '_PaymentTerms'
PaymentTerms,
@ObjectModel.foreignKey.association: '_PaymentMethod'
PaymentMethod,
SEPAMandate,
@ObjectModel.foreignKey.association: '_SrvcSEPAMandateRelevance'
SrvcSEPAMandateRelevance,
// Organizational Data
@ObjectModel.foreignKey.association: '_SalesOrganization'
SalesOrganization,
@ObjectModel.foreignKey.association: '_DistributionChannel'
DistributionChannel,
@ObjectModel.foreignKey.association: '_Division'
Division,
@ObjectModel.foreignKey.association: '_SalesOffice'
SalesOffice,
@ObjectModel.foreignKey.association: '_SalesGroup'
SalesGroup,
@ObjectModel.foreignKey.association: '_EnterpriseServiceOrg'
EnterpriseServiceOrganization,
//CRM Org units
//these feilds are only ON PREMISE
@ObjectModel.foreignKey.association: '_SalesOrganizationOrgUnit_2'
SalesOrganizationOrgUnitID,
@ObjectModel.foreignKey.association: '_SalesOfficeOrgUnit_2'
SalesOfficeOrgUnitID,
@ObjectModel.foreignKey.association: '_SalesGroupOrgUnit_2'
SalesGroupOrgUnitID,
@ObjectModel.foreignKey.association: '_ServiceOrganizationOrgUnit_2'
ServiceOrganization,
//Status
cast( case _SrvcContrStatus.StatusCode
when 'I1002' then 'X'
else ' '
end as xfeld preserving type ) as ServiceContractIsNew,
cast( case _SrvcContrStatus.StatusCode
when 'I1003' then 'X'
else ' '
end as xfeld preserving type ) as ServiceContractIsInProcess,
cast( case _SrvcContrStatus.StatusCode
when 'I1004' then 'X'
else ' '
end as xfeld preserving type ) as ServiceContractIsReleased,
cast( case _SrvcContrStatus.StatusCode
when 'I1005' then 'X'
else ' '
end as xfeld preserving type ) as ServiceContractIsCompleted,
ServiceDocumentStatus as ServiceContractStatus,
ServiceDocBillingStatus as SrvcContrBillingStatus,
SrvcDocRejectionStatus,
@Semantics.booleanIndicator
ServiceDocumentHasError as ServiceContractHasError,
SrvcDocTransferStatus,
SrvcDocCreditStatus as SrvcContrCreditStatus,
// GTS Embargo Status
@ObjectModel.foreignKey.association: '_SrvcDocGTSEmbargoStatus'
SrvcDocGTSEmbargoStatus,
// GTS Screening Status
@ObjectModel.foreignKey.association: '_SrvcDocGTSScreeningStatus'
SrvcDocGTSScreeningStatus,
// GTS Legal Control
@ObjectModel.foreignKey.association: '_SrvcDocGTSLglControlStatus'
SrvcDocGTSLglControlStatus,
//Dates and Durations
@Semantics.dateTime:true
ServiceContractStartDateTime,
@Semantics.dateTime:true
ServiceContractEndDateTime,
SrvcContrEarliestStartDateTime,
SrvcContrLatestEndDateTime,
cast( case ServiceDocumentCanclnParty
when '' then 0
else ServiceContractEndDateTime
end as timestamp preserving type ) as SrvcContrCancellationDateTime,
// Pricing Fields
@ObjectModel.foreignKey.association: '_TransactionCurrency'
TransactionCurrency,
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
ServiceDocGrossAmount,
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
ServiceDocNetAmount,
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
ServiceDocTaxAmount,
PricingDocument,
//Cancellation
ServiceDocumentCanclnParty as ServiceContractCanclnParty,
ServiceDocumentCanclnReason as ServiceContrCancellationReason,
@ObjectModel.foreignKey.association: '_ServiceContractCanclnSts'
ServiceContractCanclnSts,
//Sales Fields
PurchaseOrderByCustomer,
CustomerPurchaseOrderDate,
@ObjectModel.foreignKey.association: '_SrvcDocumentRejectionReason'
ServiceDocumentRejectionReason as ServiceContractRejectionReason,
//Reference Documents
_ExtRefServiceContract.CustMgmtExtRefID as SrvcContrExternalReference,
_ExtRefServiceQtan.CustMgmtExtRefID as ServiceQtanExtReference,
_ExtRefLegalContract.CustMgmtExtRefID as LegalContractExtReference,
RefBusinessSolutionOrder,
cast( _RefServiceTemplate.CustMgmtPrdcssrTransactionKey as crmt_object_id_db ) as RefServiceContractTemplate,
_WBSElement.WBSElementExternalID,
//Associations
_ServiceContractItemTP,
_SrvcContrPriceElementTP,
_ServiceDocumentType,
_ServiceObjType,
_SoldToParty,
_ShipToParty,
_BillToParty,
_PayerParty,
_ContactPerson,
_RespEmployee,
_PaymentTerms,
_PaymentMethod,
_SrvcSEPAMandateRelevance,
_SalesOrganization,
_DistributionChannel,
_Division,
_SalesOffice,
_SalesGroup,
_SrvcDocumentRejectionReason,
_SalesOrganizationOrgUnit_2,
_SalesOfficeOrgUnit_2,
_SalesGroupOrgUnit_2,
_ServiceOrganizationOrgUnit_2,
_EnterpriseServiceOrg,
_SrvcContrStatus,
_SrvcDocGTSEmbargoStatus,
_SrvcDocGTSScreeningStatus,
_SrvcDocGTSLglControlStatus,
_TransactionCurrency,
_ExtRefServiceContract,
_ExtRefServiceQtan,
_ExtRefLegalContract,
@ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
_ServiceContractCanclnSts,
_SrvcContrPartnerTP,
// _SrvcContrReferenceObjectTP,
_SrvcContrUserStatusTP,
_SrvcContrFUPBillgDocTP,
_SrvcContrFUPSrvcOrdTP,
_SrvcContrAppointmentTP,
_SrvcContrDurationTP,
_SrvcContrLongTextTP
// _SrvcContrFUPBusSolnOrdTP
}
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