R_SrvcOrdPartnerTP

DDL: R_SRVCORDPARTNERTP Type: view_entity TRANSACTIONAL

Service Order Partner - TP

R_SrvcOrdPartnerTP is a Transactional CDS View that provides data about "Service Order Partner - TP" in SAP S/4HANA. It reads from 2 data sources (I_ServiceDocument, I_CustMgmtPartner) and exposes 9 fields with key fields ServiceOrder, CustMgmtPartnerFunction, CustMgmtBusinessPartner. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_ServiceDocument ServiceOrder inner
I_CustMgmtPartner ServicePartner from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_CustMgmtPartnerFuncText _PartnerFunction $projection.CustMgmtPartnerFunction = _PartnerFunction.PartnerFunction and _PartnerFunction.Language = $session.system_language
[0..1] I_BusinessPartner _BusinessPartner $projection.CustMgmtBusinessPartner = _BusinessPartner.BusinessPartner
[0..*] R_SrvcOrdPartnerAddressTP _SrvcOrdPartnerAddressTP

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Service Order Partner - TP view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY ServiceOrder I_CustMgmtPartner CustMgmtDocument
KEY CustMgmtPartnerFunction I_CustMgmtPartner CustMgmtPartnerFunction
KEY CustMgmtBusinessPartner I_CustMgmtPartner CustMgmtBusinessPartner
CustMgmtPartnerIsMainPartner I_CustMgmtPartner CustMgmtPartnerIsMainPartner
CustMgmtPartFunctionCategory I_CustMgmtPartner CustMgmtPartFunctionCategory
_PartnerFunction _PartnerFunction
_BusinessPartner _BusinessPartner
_ServiceOrderTP _ServiceOrderTP
_SrvcOrdPartnerAddressTP _SrvcOrdPartnerAddressTP
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@VDM: {
  viewType: #TRANSACTIONAL,
  lifecycle.contract.type: #SAP_INTERNAL_API
}
@Metadata:
{
  ignorePropagatedAnnotations: true
}
@EndUserText.label: 'Service Order Partner - TP'
@ObjectModel: {
   usageType: {dataClass:      #TRANSACTIONAL,
                serviceQuality: #B,
                sizeCategory:   #L}
}


define view entity R_SrvcOrdPartnerTP
  as select from I_CustMgmtPartner as ServicePartner 
//      inner join   R_ServiceOrderTP  as ServiceOrder on  ServicePartner.CustMgmtDocument = ServiceOrder.ServiceOrder

//                                                     and ServicePartner.CustMgmtObjectType = ServiceOrder.ServiceObjectType

//                                                     and ServicePartner.CustMgmtDocumentItem = '000000'

      inner join   I_ServiceDocument  as ServiceOrder on  ServicePartner.CustMgmtDocument     = ServiceOrder.ServiceDocument
                                                      and ServicePartner.CustMgmtObjectType   = ServiceOrder.ServiceObjectType     
                                                      and ServicePartner.CustMgmtDocumentItem = '000000'
                                                      and ServiceOrder.ServiceObjectType      = 'BUS2000116'
                                                      and ServiceOrder.ServiceDocumentIsQuotation  is initial
                                                      and ServiceOrder.ServiceDocumentTemplateType is initial
                                                                                                           
  association   to parent R_ServiceOrderTP   as _ServiceOrderTP  on  $projection.ServiceOrder      = _ServiceOrderTP.ServiceOrder
  
  association [0..1] to I_CustMgmtPartnerFuncText as _PartnerFunction on  $projection.CustMgmtPartnerFunction = _PartnerFunction.PartnerFunction
                                                                      and _PartnerFunction.Language           = $session.system_language
  association [0..1] to I_BusinessPartner         as _BusinessPartner on  $projection.CustMgmtBusinessPartner = _BusinessPartner.BusinessPartner

  composition [0..*] of R_SrvcOrdPartnerAddressTP as _SrvcOrdPartnerAddressTP
{

       @ObjectModel.foreignKey.association: '_ServiceOrderTP'
  key  ServicePartner.CustMgmtDocument   as ServiceOrder,

  key  ServicePartner.CustMgmtPartnerFunction,

  key  ServicePartner.CustMgmtBusinessPartner,
  
       ServicePartner.CustMgmtPartnerIsMainPartner,

       ServicePartner.CustMgmtPartFunctionCategory,

       //Association

       _PartnerFunction,
       _BusinessPartner,
       _ServiceOrderTP,
       _SrvcOrdPartnerAddressTP
}

//where ServicePartner.CustMgmtObjectType   = 'BUS2000116' // Service Process

//  and ServicePartner.CustMgmtDocumentItem is initial

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTMGMTPARTNER",
"I_SERVICEDOCUMENT"
],
"ASSOCIATED":
[
"I_BUSINESSPARTNER",
"I_CUSTMGMTPARTNERFUNCTEXT",
"R_SERVICEORDERTP",
"R_SRVCORDPARTNERADDRESSTP"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/