I_ChgRecdRefRoutingVersion

DDL: I_CHGRECDREFROUTINGVERSION SQL: ICRREFRTGVERS Type: view COMPOSITE Package: VDM_PLMB_CR_O

Change Record Routing with max version

I_ChgRecdRefRoutingVersion is a Composite CDS View that provides data about "Change Record Routing with max version" in SAP S/4HANA. It reads from 2 data sources (I_ProductionRoutingVersion, I_ChgRecdRefRoutingBsc) and exposes 6 fields with key field ChangeRecordUUID. It has 1 association to related views. Part of development package VDM_PLMB_CR_O.

Data Sources (2)

SourceAliasJoin Type
I_ProductionRoutingVersion Routing left_outer
I_ChgRecdRefRoutingBsc routingReference from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_BillOfOperationsVersion _BOOVersion $projection.BillOfOperationsGroup = _BOOVersion.BillOfOperationsGroup and $projection.BillOfOperationsType = _BOOVersion.BillOfOperationsType and $projection.BillOfOperationsVariant = _BOOVersion.BillOfOperationsVariant and $projection.BillOfOperationsVersion = _BOOVersion.BillOfOperationsVersion

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName ICRREFRTGVERS view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MASTER view
EndUserText.label Change Record Routing with max version view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY ChangeRecordUUID I_ChgRecdRefRoutingBsc ChangeRecordUUID
OrderID I_ProductionRoutingVersion OrderID
BillOfOperationsGroup I_ProductionRoutingVersion BillOfOperationsGroup
BillOfOperationsType I_ProductionRoutingVersion BillOfOperationsType
BillOfOperationsVariant I_ProductionRoutingVersion BillOfOperationsVariant
_BOOVersion _BOOVersion
@AbapCatalog.sqlViewName: 'ICRREFRTGVERS'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType: { serviceQuality: #C, sizeCategory: #L, dataClass: #MASTER }
@EndUserText.label: 'Change Record Routing with max version'

define view I_ChgRecdRefRoutingVersion
  as select from    I_ChgRecdRefRoutingBsc     as routingReference
    left outer join I_ProductionRoutingVersion as Routing on  routingReference.ChgRecRefInternalKey1 = Routing.BillOfOperationsGroup
                                                          and routingReference.ChgRecRefInternalKey2 = Routing.BillOfOperationsType
                                                          and routingReference.ChgRecRefInternalKey3 = Routing.BillOfOperationsVariant
                                                          and routingReference.ChgRecRefInternalKey4 = Routing.BillOfOperationsVersion
  association [0..1] to I_BillOfOperationsVersion as _BOOVersion on  $projection.BillOfOperationsGroup   = _BOOVersion.BillOfOperationsGroup
                                                                 and $projection.BillOfOperationsType    = _BOOVersion.BillOfOperationsType
                                                                 and $projection.BillOfOperationsVariant = _BOOVersion.BillOfOperationsVariant
                                                                 and $projection.BillOfOperationsVersion = _BOOVersion.BillOfOperationsVersion


{
  key routingReference.ChangeRecordUUID,
      Routing.OrderID,
      Routing.BillOfOperationsGroup,
      Routing.BillOfOperationsType,
      Routing.BillOfOperationsVariant,
      --Get the maximum/latest routing version
      cast(max(Routing.BillOfOperationsVersion) as plnversn preserving type ) as BillOfOperationsVersion,
      _BOOVersion
}
group by
  routingReference.ChangeRecordUUID,
  Routing.OrderID,
  Routing.BillOfOperationsType,
  Routing.BillOfOperationsGroup,
  Routing.BillOfOperationsVariant