P_InhReprItmNrOfOpnMaintOrd

DDL: P_INHREPRITMNROFOPNMAINTORD Type: view COMPOSITE

P_InhReprItmNrOfOpnMaintOrd is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_MaintenanceOrder, I_InhRepairTransactionRelation) and exposes 3 fields with key field InHouseRepairItemUUID.

Data Sources (2)

SourceAliasJoin Type
I_MaintenanceOrder MaintenanceOrder inner
I_InhRepairTransactionRelation Relation from

Annotations (12)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #NONE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Metadata.ignorePropagatedAnnotations true view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PIHRNRSDOPNMO view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY InHouseRepairItemUUID I_InhRepairTransactionRelation CustMgmtPrdcssrTransactionUUID
ServiceOrder ServiceDocument ServiceDocument
NumberOfOpenMaintenanceOrders
@VDM: {
  private: true,
  viewType: #COMPOSITE,
  lifecycle.contract.type: #NONE
}
@AccessControl: {
  authorizationCheck: #NOT_REQUIRED
}
@ObjectModel: {
  usageType: {serviceQuality: #D, sizeCategory: #XXL, dataClass: #TRANSACTIONAL}
}
@Metadata: {
  ignorePropagatedAnnotations: true
}
@ClientHandling: {
  algorithm: #SESSION_VARIABLE
}
@AbapCatalog:{
  sqlViewName: 'PIHRNRSDOPNMO',
  compiler.compareFilter: true,
  preserveKey: true
}
define view P_InhReprItmNrOfOpnMaintOrd
  as select from           I_InhRepairTransactionRelation as Relation

    left outer to one join I_ServiceDocument              as ServiceDocument  on Relation.CustMgmtSuccssrTransactionUUID = ServiceDocument.ServiceDocumentUUID

    inner join             I_MaintenanceOrder             as MaintenanceOrder on  MaintenanceOrder.ServiceDocument            =  ServiceDocument.ServiceDocument
                                                                              and MaintenanceOrder.MaintenanceProcessingPhase <> '6'
{
  key Relation.CustMgmtPrdcssrTransactionUUID                                                                    as InHouseRepairItemUUID,
      ServiceDocument.ServiceDocument                                                                            as ServiceOrder,
      cast(count (distinct MaintenanceOrder.MaintenanceOrder) as crms4_repa_nrof_open_maint_ord preserving type) as NumberOfOpenMaintenanceOrders
}
where
      Relation.CustMgmtTransacRelationType   = 'IHR1'
  and Relation.CustMgmtPrdcssrTransacObjType = 'BUS2000257'
group by
  ServiceDocument.ServiceDocument,
  Relation.CustMgmtPrdcssrTransactionUUID
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INHREPAIRTRANSACTIONRELATION",
"I_MAINTENANCEORDER",
"I_SERVICEDOCUMENT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/