R_SrvcContrTmplItemTP

DDL: R_SRVCCONTRTMPLITEMTP Type: view_entity TRANSACTIONAL

Service Contract Template Item - TP

R_SrvcContrTmplItemTP is a Transactional CDS View that provides data about "Service Contract Template Item - TP" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentItemEnhcd) and exposes 52 fields with key fields ServiceContractTemplate, ServiceContractTemplateItem. It has 11 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentItemEnhcd I_ServiceDocumentItemEnhcd from

Associations (11)

CardinalityTargetAliasCondition
[0..1] R_SrvcContrTmplItemDurationTP _SrvcContrTmpItmDurationTP $projection.ServiceContractTemplate = _SrvcContrTmpItmDurationTP.ServiceContractTemplate and $projection.ServiceContractTemplateItem = _SrvcContrTmpItmDurationTP.ServiceContractTemplateItem and _SrvcContrTmpItmDurationTP.SrvcDocDurationType = 'CONTDURA'
[0..1] I_StatusObjectUUIDStatus _SrvcContrTmpItmStatus $projection.SrvcContrTmplItemUUID = _SrvcContrTmpItmStatus.StatusObjectUUID and _SrvcContrTmpItmStatus.StatusCode between 'I1002' and 'I1005' and _SrvcContrTmpItmStatus.StatusIsActive = 'X'
[0..1] I_CustMgmtExtRefID _ExtRefServiceContract _ExtRefServiceContract.CustMgmtObjectType = 'BUS2000112' and $projection.ServiceContractTemplate = _ExtRefServiceContract.CustMgmtDocument and $projection.ServiceContractTemplateItem = _ExtRefServiceContract.CustMgmtDocumentItem and _ExtRefServiceContract.CustMgmtExtRefIDType = '0003'
[0..1] I_CustMgmtExtRefID _ExtRefServiceContractItem _ExtRefServiceContractItem.CustMgmtObjectType = 'BUS2000112' and $projection.ServiceContractTemplate = _ExtRefServiceContractItem.CustMgmtDocument and $projection.ServiceContractTemplateItem = _ExtRefServiceContractItem.CustMgmtDocumentItem and _ExtRefServiceContractItem.CustMgmtExtRefIDType = '0004'
[0..1] I_CustMgmtDateRule _SettlementPeriodRule $projection.SettlementPeriodRuleUUID = _SettlementPeriodRule.CustMgmtDateRuleUUID
[0..1] I_CustMgmtDateRule _BillingPlanBillingDateRule $projection.BillingPlanBillingDateRuleUUID = _BillingPlanBillingDateRule.CustMgmtDateRuleUUID
[0..1] I_UnitOfMeasure _SrvcContrTmplItmDurnUnit $projection.SrvcContrItmDurnUnitSAPCode = _SrvcContrTmplItmDurnUnit.UnitOfMeasure
[0..1] E_ServiceDocumentItem _ServiceDocumentItemExt $projection.ServiceObjectType = _ServiceDocumentItemExt.ServiceCategory and $projection.ServiceContractTemplate = _ServiceDocumentItemExt.ServiceOrderItem and $projection.ServiceContractTemplateItem = _ServiceDocumentItemExt.ServiceLineExternalID
[0..*] R_SrvcContrTmplItmRefObjectTP _SrvcContrTmpItemRefObjectTP
[0..*] R_SrvcContrTmplItemProductTP _SrvcContrTmpItemProductTP
[0..*] R_SrvcContrTmplItemLongTextTP _SrvcContrTmpItemLongTextTP

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.representativeKey ServiceContractTemplateItem view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
EndUserText.label Service Contract Template Item - TP view

Fields (52)

KeyFieldSource TableSource FieldDescription
KEY ServiceContractTemplate ServiceDocument
KEY ServiceContractTemplateItem ServiceDocumentItem
ServiceObjectType ServiceObjectType
ParServiceContractTemplateItem _ParentServiceDocItem_2 ServiceDocumentItem
SrvcContrTmplItemCategory ServiceDocItemCategory
SrvcContrTmplItemUUID ServiceDocumentItemUUID
SrvcContrTmplItemDescription ServiceDocumentItemDescription
Language Language
ServiceDocItemCreationDateTime ServiceDocItemCreationDateTime
ServiceDocItemChangedDateTime ServiceDocItemChangedDateTime
ServiceDocItemCreatedByUser ServiceDocItemCreatedByUser
ServiceDocItemChangedByUser ServiceDocItemChangedByUser
Product Product
Quantity ServiceDocumentItemQuantity
QuantityUnit ServiceDocItemQuantityUnit
RespEmployeeBusinessPartnerId ResponsibleEmployee
SrvcContrTmplItemStatus ServiceDocumentItemStatus
SrvcContrItemDuration _SrvcContrTmpItmDurationTP SrvcDocDurationValue
SrvcContrItemDurationUnit _SrvcContrTmpItmDurationTP SrvcDocDurationUnit
SrvcContrItmDurnUnitSAPCode _SrvcContrTmpItmDurationTP SrvcDocDurationUnitSAPCode
SrvcContrItemRnwlDuration SrvcContrItemRnwlDuration
SrvcContrItemRnwlDurationUnit SrvcContrItemRnwlDurationUnit
SrvcContrItemExtensionDuration SrvcContrItemExtensionDuration
SrvcContrItemExtnDurationUnit SrvcContrItemExtnDurationUnit
ResponseProfile ResponseProfile
ServiceProfile ServiceProfile
SettlementPeriodRuleUUID SettlementPeriodRuleUUID
SettlementPeriodRule _SettlementPeriodRule CustMgmtDateRuleName
BillingPlanBillingDateRuleUUID BillingPlanBillingDateRuleUUID
SrvcMgmtBillgPlanBillgDateRule _BillingPlanBillingDateRule CustMgmtDateRuleName
BillingPlanPriceDateRule BillingPlanPriceDateRule
BillingPlanIsFinalized BillingPlanIsFinalized
SrvcContrExternalReference _ExtRefServiceContract CustMgmtExtRefID
SrvcContrItmExternalReference _ExtRefServiceContractItem CustMgmtExtRefID
SrvcDocItmPartReferenceItem SrvcDocItmPartReferenceItem
SrvcDocItmApptRefObjectUUID SrvcDocItmApptRefObjectUUID
SrvcDocItmApptReferenceItem SrvcDocItmApptReferenceItem
_ServiceDocument _ServiceDocument
_ServiceContractTemplate _ServiceContractTemplate
_ServiceObjType _ServiceObjType
_ExtRefServiceContract _ExtRefServiceContract
_ExtRefServiceContractItem _ExtRefServiceContractItem
_Product _Product
_RespEmployee _RespEmployee
_SrvcContrTmpItmDurationTP _SrvcContrTmpItmDurationTP
_SrvcContrTmpItemRefObjectTP _SrvcContrTmpItemRefObjectTP
_SrvcContrTmpItemProductTP _SrvcContrTmpItemProductTP
_BaseUnit _BaseUnit
_SrvcContrTmplItmDurnUnit _SrvcContrTmplItmDurnUnit
_SrvcContrItemExtnDurationUnit _SrvcContrItemExtnDurationUnit
_SrvcContrItemRnwlDurationUnit _SrvcContrItemRnwlDurationUnit
_SrvcContrTmpItemLongTextTP _SrvcContrTmpItemLongTextTP
@AccessControl: {
  authorizationCheck: #MANDATORY,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@VDM: {
  viewType: #TRANSACTIONAL,
  lifecycle.contract.type: #SAP_INTERNAL_API
}
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel: {
  semanticKey: ['ServiceContractTemplateItem'],
  representativeKey: 'ServiceContractTemplateItem',
  usageType: {dataClass:      #TRANSACTIONAL,
              serviceQuality: #C,
              sizeCategory:   #L}
}
@EndUserText.label: 'Service Contract Template Item - TP'
define view entity R_SrvcContrTmplItemTP
  as select from I_ServiceDocumentItemEnhcd

  association        to parent R_ServiceContractTemplateTP as _ServiceContractTemplate    on  $projection.ServiceContractTemplate = _ServiceContractTemplate.ServiceContractTemplate

  association [0..1] to R_SrvcContrTmplItemDurationTP      as _SrvcContrTmpItmDurationTP  on  $projection.ServiceContractTemplate     = _SrvcContrTmpItmDurationTP.ServiceContractTemplate
                                                                                          and $projection.ServiceContractTemplateItem = _SrvcContrTmpItmDurationTP.ServiceContractTemplateItem
                                                                                          and _SrvcContrTmpItmDurationTP.SrvcDocDurationType = 'CONTDURA'

  association [0..1] to I_StatusObjectUUIDStatus           as _SrvcContrTmpItmStatus      on  $projection.SrvcContrTmplItemUUID = _SrvcContrTmpItmStatus.StatusObjectUUID
                                                                                          and _SrvcContrTmpItmStatus.StatusCode between 'I1002' and 'I1005'
                                                                                          and _SrvcContrTmpItmStatus.StatusIsActive           = 'X'

  association [0..1] to I_CustMgmtExtRefID                 as _ExtRefServiceContract      on  _ExtRefServiceContract.CustMgmtObjectType   = 'BUS2000112'
                                                                                          and $projection.ServiceContractTemplate         = _ExtRefServiceContract.CustMgmtDocument
                                                                                          and $projection.ServiceContractTemplateItem     = _ExtRefServiceContract.CustMgmtDocumentItem
                                                                                          and _ExtRefServiceContract.CustMgmtExtRefIDType = '0003'

  association [0..1] to I_CustMgmtExtRefID                 as _ExtRefServiceContractItem  on  _ExtRefServiceContractItem.CustMgmtObjectType   = 'BUS2000112'
                                                                                          and $projection.ServiceContractTemplate             = _ExtRefServiceContractItem.CustMgmtDocument
                                                                                          and $projection.ServiceContractTemplateItem         = _ExtRefServiceContractItem.CustMgmtDocumentItem
                                                                                          and _ExtRefServiceContractItem.CustMgmtExtRefIDType = '0004'

  association [0..1] to I_CustMgmtDateRule                 as _SettlementPeriodRule       on  $projection.SettlementPeriodRuleUUID = _SettlementPeriodRule.CustMgmtDateRuleUUID

  association [0..1] to I_CustMgmtDateRule                 as _BillingPlanBillingDateRule on  $projection.BillingPlanBillingDateRuleUUID = _BillingPlanBillingDateRule.CustMgmtDateRuleUUID
  
  association [0..1] to I_UnitOfMeasure                    as _SrvcContrTmplItmDurnUnit   on  $projection.SrvcContrItmDurnUnitSAPCode = _SrvcContrTmplItmDurnUnit.UnitOfMeasure
  
  association [0..1] to E_ServiceDocumentItem              as _ServiceDocumentItemExt     on  $projection.ServiceObjectType           = _ServiceDocumentItemExt.ServiceCategory
                                                                                          and $projection.ServiceContractTemplate     = _ServiceDocumentItemExt.ServiceOrderItem
                                                                                          and $projection.ServiceContractTemplateItem = _ServiceDocumentItemExt.ServiceLineExternalID
  
  composition [0..*] of R_SrvcContrTmplItmRefObjectTP      as _SrvcContrTmpItemRefObjectTP
  composition [0..*] of R_SrvcContrTmplItemProductTP       as _SrvcContrTmpItemProductTP
  composition [0..*] of R_SrvcContrTmplItemLongTextTP      as _SrvcContrTmpItemLongTextTP

{
      // Administrative fields

      @ObjectModel.foreignKey.association: '_ServiceDocument'
  key ServiceDocument                                       as ServiceContractTemplate,
  key ServiceDocumentItem                                   as ServiceContractTemplateItem,
      @ObjectModel.foreignKey.association: '_ServiceObjType'
      ServiceObjectType,
      _ParentServiceDocItem_2.ServiceDocumentItem           as ParServiceContractTemplateItem,
      ServiceDocItemCategory                                as SrvcContrTmplItemCategory,
      ServiceDocumentItemUUID                               as SrvcContrTmplItemUUID,
      ServiceDocumentItemDescription                        as SrvcContrTmplItemDescription,
      Language,
      
      // Administrative

      ServiceDocItemCreationDateTime,
      ServiceDocItemChangedDateTime,
      ServiceDocItemCreatedByUser,
      ServiceDocItemChangedByUser,

      // Item Fields

      @ObjectModel.foreignKey.association: '_Product'
      Product,
      @Semantics.quantity.unitOfMeasure: 'QuantityUnit'
      ServiceDocumentItemQuantity                           as Quantity,
      ServiceDocItemQuantityUnit                            as QuantityUnit,

      // Partners

      @ObjectModel.foreignKey.association: '_RespEmployee'
      ResponsibleEmployee                                   as RespEmployeeBusinessPartnerId,

      // Status

      cast( case _SrvcContrTmpItmStatus.StatusCode
              when 'I1002' then 'X' else ' '
            end as xfeld preserving type )                  as SrvcContrTmplItemIsNew,
      cast( case _SrvcContrTmpItmStatus.StatusCode
              when 'I1003' then 'X' else ' '
            end as xfeld preserving type )                  as SrvcContrTmplItemIsInProcess,
      cast( case _SrvcContrTmpItmStatus.StatusCode
              when 'I1004' then 'X' else ' '
            end as xfeld preserving type )                  as SrvcContrTmplItemIsReleased,
      cast( case _SrvcContrTmpItmStatus.StatusCode
              when 'I1005' then 'X' else ' '
            end as xfeld preserving type )                  as SrvcContrTmplItemIsCompleted,
      ServiceDocumentItemStatus                             as SrvcContrTmplItemStatus,
      cast( ServiceDocumentItemHasError
          as xfeld preserving type )                        as SrvcContrTmplItemHasError,

      // Duration

      _SrvcContrTmpItmDurationTP.SrvcDocDurationValue       as SrvcContrItemDuration,
      _SrvcContrTmpItmDurationTP.SrvcDocDurationUnit        as SrvcContrItemDurationUnit,
      _SrvcContrTmpItmDurationTP.SrvcDocDurationUnitSAPCode as SrvcContrItmDurnUnitSAPCode,
      @Semantics: { quantity : {unitOfMeasure: 'SrvcContrItemRnwlDurationUnit'} }
      SrvcContrItemRnwlDuration                             as SrvcContrItemRnwlDuration,
      SrvcContrItemRnwlDurationUnit                         as SrvcContrItemRnwlDurationUnit,
      @Semantics: { quantity : {unitOfMeasure: 'SrvcContrItemExtnDurationUnit'} }
      SrvcContrItemExtensionDuration                        as SrvcContrItemExtensionDuration,
      SrvcContrItemExtnDurationUnit                         as SrvcContrItemExtnDurationUnit,

      // Billing

      ResponseProfile,
      ServiceProfile,
      SettlementPeriodRuleUUID,
      _SettlementPeriodRule.CustMgmtDateRuleName            as SettlementPeriodRule,
      BillingPlanBillingDateRuleUUID,
      _BillingPlanBillingDateRule.CustMgmtDateRuleName      as SrvcMgmtBillgPlanBillgDateRule,
      BillingPlanPriceDateRule,
      BillingPlanIsFinalized,

      // Reference Documents

      _ExtRefServiceContract.CustMgmtExtRefID               as SrvcContrExternalReference,
      _ExtRefServiceContractItem.CustMgmtExtRefID           as SrvcContrItmExternalReference,

      //Inheritance of Complex set in RAP

      SrvcDocItmPartReferenceItem, //For Item Partner

      SrvcDocItmApptRefObjectUUID, //For Item Appointment UUID

      SrvcDocItmApptReferenceItem, //For Appointment and Duration


      //Associations

      _ServiceDocument,
      _ServiceContractTemplate,
      _ServiceObjType,

      _ExtRefServiceContract,
      _ExtRefServiceContractItem,

      _Product,
      _RespEmployee,
      _SrvcContrTmpItmDurationTP,
      _SrvcContrTmpItemRefObjectTP,
      _SrvcContrTmpItemProductTP,
      
      _BaseUnit,
      _SrvcContrTmplItmDurnUnit,
      _SrvcContrItemExtnDurationUnit,
      _SrvcContrItemRnwlDurationUnit,
      
      _SrvcContrTmpItemLongTextTP
}
where
  ServiceObjectType = 'BUS2000112' //Service Contract

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTMGMTDATERULE",
"I_CUSTMGMTEXTREFID",
"I_SERVICEDOCUMENTITEMENHCD",
"I_STATUSOBJECTUUIDSTATUS",
"R_SRVCCONTRTMPLITEMDURATIONTP"
],
"ASSOCIATED":
[
"I_BUSINESSPARTNER",
"I_CUSTMGMTBUSOBJTYPE",
"I_CUSTMGMTEXTREFID",
"I_PRODUCT",
"I_SERVICEDOCUMENTENHCD",
"I_UNITOFMEASURE",
"R_SERVICECONTRACTTEMPLATETP",
"R_SRVCCONTRTMPLITEMDURATIONTP",
"R_SRVCCONTRTMPLITEMLONGTEXTTP",
"R_SRVCCONTRTMPLITEMPRODUCTTP",
"R_SRVCCONTRTMPLITMREFOBJECTTP"
],
"BASE":
[
"I_SERVICEDOCUMENTITEMENHCD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/