P_MaintCallCompltnDateTime

DDL: P_MAINTCALLCOMPLTNDATETIME SQL: PMNTCLCOMPDATTIM Type: view COMPOSITE

P_MaintCallCompltnDateTime is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_MaintenanceCall, P_MaintCallCompletionDate) and exposes 2 fields with key fields MaintenancePlan, MaintenanceCall.

Data Sources (2)

SourceAliasJoin Type
I_MaintenanceCall I_MaintenanceCall from
P_MaintCallCompletionDate P_MaintCallCompletionDate inner

Annotations (7)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName PMNTCLCOMPDATTIM view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.preserveKey true view

Fields (2)

KeyFieldSource TableSource FieldDescription
KEY MaintenancePlan I_MaintenanceCall MaintenancePlan
KEY MaintenanceCall I_MaintenanceCall MaintenanceCall
@VDM.private: true
@VDM.viewType:#COMPOSITE
@AbapCatalog.sqlViewName: 'PMNTCLCOMPDATTIM'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey: true

@ObjectModel.representativeKey: [ 'MaintenanceCall' ] 

define view P_MaintCallCompltnDateTime
  as select from I_MaintenanceCall
    inner join   P_MaintCallCompletionDate on  P_MaintCallCompletionDate.MaintenanceCall               = I_MaintenanceCall.MaintenanceCall
                                           and P_MaintCallCompletionDate.MaintenancePlan               = I_MaintenanceCall.MaintenancePlan
                                           and P_MaintCallCompletionDate.MaintCallCmpltdObjCompltnDate = I_MaintenanceCall.CompletionDate
{
  key I_MaintenanceCall.MaintenancePlan,
  key I_MaintenanceCall.MaintenanceCall,
      max (case P_MaintCallCompletionDate.MaintCallObjLowestCompltnDate
                when '00000000' then '000000'
                else CompletionTime
            end) as CompletionTime,
      max (case P_MaintCallCompletionDate.MaintCallObjLowestCompltnDate
                when '00000000' then '00000000'
                else CompletionDate
            end) as CompletionDate
}
group by
  I_MaintenanceCall.MaintenancePlan,
  I_MaintenanceCall.MaintenanceCall
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MAINTENANCECALL",
"P_MAINTCALLCOMPLETIONDATE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/