P_MfgOrderCompAssemblyAggrgn

DDL: P_MFGORDERCOMPASSEMBLYAGGRGN SQL: PMPECOMPASMAGG Type: view COMPOSITE

P_MfgOrderCompAssemblyAggrgn is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_MfgOrderComponentAssembly) and exposes 28 fields with key fields Reservation, ReservationItem, RecordType, OpActyNtwkInstance, OpActyNtwkElement. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MfgOrderComponentAssembly MfgOrderComponentAssembly from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_OpActyCompInstceAssignment _OpActyCompInstceAssignment $projection.Reservation = _OpActyCompInstceAssignment.Reservation and $projection.ReservationItem = _OpActyCompInstceAssignment.ReservationItem and $projection.RecordType = _OpActyCompInstceAssignment.RecordType and $projection.OpActyNtwkInstance = _OpActyCompInstceAssignment.OpActyNtwkInstance and $projection.OpActyNtwkElement = _OpActyCompInstceAssignment.OpActyNtwkElement and $projection.OriglDgtlMockUpCharcsUUID = _OpActyCompInstceAssignment.OriglDgtlMockUpCharcsUUID
[0..1] I_UnitOfMeasure _MaterialBaseUnit $projection.MaterialBaseUnit = _MaterialBaseUnit.UnitOfMeasure

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PMPECOMPASMAGG view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (28)

KeyFieldSource TableSource FieldDescription
KEY Reservation I_MfgOrderComponentAssembly Reservation
KEY ReservationItem I_MfgOrderComponentAssembly ReservationItem
KEY RecordType I_MfgOrderComponentAssembly RecordType
KEY OpActyNtwkInstance I_MfgOrderComponentAssembly OpActyNtwkInstance
KEY OpActyNtwkElement I_MfgOrderComponentAssembly OpActyNtwkElement
KEY AssemblyShopFloorItem I_MfgOrderComponentAssembly AssemblyShopFloorItem
KEY ShopFloorItem I_MfgOrderComponentAssembly ShopFloorItem
KEY Batch I_MfgOrderComponentAssembly Batch
KEY Material I_MfgOrderComponentAssembly Material
KEY Plant I_MfgOrderComponentAssembly Plant
KEY OriglDgtlMockUpCharcsUUID MfgOrderCompInstceAssembly OriglDgtlMockUpCharcsUUID
DgtlMockUpCharcsUUID OpActyCompInstceAssignment DgtlMockUpCharcsUUID
ReferenceDesignatorValue InstanceReferenceDesignator ReferenceDesignatorValue
DebitCreditCode I_MfgOrderComponentAssembly DebitCreditCode
MaterialComponentQuantity
MaterialBaseUnit
QuantityInEntryUnit
EntryUnit
_OpActyNtwkInstance I_MfgOrderComponentAssembly _OpActyNtwkInstance
_OperationActivityInstance I_MfgOrderComponentAssembly _OperationActivityInstance
_ShopFloorItem I_MfgOrderComponentAssembly _ShopFloorItem
_ParentShopFloorItem I_MfgOrderComponentAssembly _ParentShopFloorItem
_BatchDistinct I_MfgOrderComponentAssembly _BatchDistinct
_Material I_MfgOrderComponentAssembly _Material
_Plant I_MfgOrderComponentAssembly _Plant
_Reservation I_MfgOrderComponentAssembly _Reservation
_OpActyCompInstceAssignment _OpActyCompInstceAssignment
_MaterialBaseUnit _MaterialBaseUnit
@AbapCatalog.sqlViewName: 'PMPECOMPASMAGG'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view P_MfgOrderCompAssemblyAggrgn
  as select from            I_MfgOrderComponentAssembly   as MfgOrderComponentAssembly
  -- If assemblies are done instance-based, one line per instance assembly that was neither reversed nor is a reversal
    left outer to many join I_MfgOrderCompInstceAssembly  as MfgOrderCompInstceAssembly  on  MfgOrderCompInstceAssembly.AssemblyDocument     = MfgOrderComponentAssembly.AssemblyDocument
                                                                                         and MfgOrderCompInstceAssembly.AssemblyDocumentItem = MfgOrderComponentAssembly.AssemblyDocumentItem
                                                                                         and MfgOrderCompInstceAssembly.IsReversed           = ''
                                                                                         and MfgOrderCompInstceAssembly.IsReversal           = ''
    left outer to one join  I_OpActyCompInstceAssignment  as OpActyCompInstceAssignment  on  OpActyCompInstceAssignment.Reservation               = MfgOrderComponentAssembly.Reservation
                                                                                         and OpActyCompInstceAssignment.ReservationItem           = MfgOrderComponentAssembly.ReservationItem
                                                                                         and OpActyCompInstceAssignment.RecordType                = MfgOrderComponentAssembly.RecordType
                                                                                         and OpActyCompInstceAssignment.OpActyNtwkInstance        = MfgOrderComponentAssembly.OpActyNtwkInstance
                                                                                         and OpActyCompInstceAssignment.OpActyNtwkElement         = MfgOrderComponentAssembly.OpActyNtwkElement
                                                                                         and OpActyCompInstceAssignment.OriglDgtlMockUpCharcsUUID = MfgOrderCompInstceAssembly.OriglDgtlMockUpCharcsUUID
    left outer to one join  I_InstanceReferenceDesignator as InstanceReferenceDesignator on  InstanceReferenceDesignator.DgtlMockUpCharcsUUID  = OpActyCompInstceAssignment.DgtlMockUpCharcsUUID

  association [1..1] to I_OpActyCompInstceAssignment as _OpActyCompInstceAssignment on  $projection.Reservation               = _OpActyCompInstceAssignment.Reservation
                                                                                    and $projection.ReservationItem           = _OpActyCompInstceAssignment.ReservationItem
                                                                                    and $projection.RecordType                = _OpActyCompInstceAssignment.RecordType
                                                                                    and $projection.OpActyNtwkInstance        = _OpActyCompInstceAssignment.OpActyNtwkInstance
                                                                                    and $projection.OpActyNtwkElement         = _OpActyCompInstceAssignment.OpActyNtwkElement
                                                                                    and $projection.OriglDgtlMockUpCharcsUUID = _OpActyCompInstceAssignment.OriglDgtlMockUpCharcsUUID
  association [0..1] to I_UnitOfMeasure              as _MaterialBaseUnit           on  $projection.MaterialBaseUnit = _MaterialBaseUnit.UnitOfMeasure
{
      @ObjectModel.foreignKey.association: '_Reservation'
  key MfgOrderComponentAssembly.Reservation,
  key MfgOrderComponentAssembly.ReservationItem,
  key MfgOrderComponentAssembly.RecordType,
      @ObjectModel.foreignKey.association: '_OpActyNtwkInstance'
  key MfgOrderComponentAssembly.OpActyNtwkInstance,
      @ObjectModel.foreignKey.association: '_OperationActivityInstance'
  key MfgOrderComponentAssembly.OpActyNtwkElement,
      @ObjectModel.foreignKey.association: '_ParentShopFloorItem'
  key MfgOrderComponentAssembly.AssemblyShopFloorItem,
      @ObjectModel.foreignKey.association: '_ShopFloorItem'
  key MfgOrderComponentAssembly.ShopFloorItem,

  key MfgOrderComponentAssembly.Batch,
      @ObjectModel.foreignKey.association: '_Material'
  key MfgOrderComponentAssembly.Material,
      @ObjectModel.foreignKey.association: '_Plant'
  key MfgOrderComponentAssembly.Plant,
  key MfgOrderCompInstceAssembly.OriglDgtlMockUpCharcsUUID,

      OpActyCompInstceAssignment.DgtlMockUpCharcsUUID,
      InstanceReferenceDesignator.ReferenceDesignatorValue,
      MfgOrderComponentAssembly.DebitCreditCode,
      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      cast(sum(MfgOrderComponentAssembly.MaterialComponentQuantity) as kmpmg preserving type) as MaterialComponentQuantity,
      @Semantics.unitOfMeasure: true
      cast(max(MfgOrderComponentAssembly.MaterialBaseUnit) as meins preserving type)          as MaterialBaseUnit,
      @Semantics.quantity.unitOfMeasure: 'EntryUnit'
      cast(sum(MfgOrderComponentAssembly.QuantityInEntryUnit) as erfmgv preserving type)      as QuantityInEntryUnit,
      cast(max(MfgOrderComponentAssembly.EntryUnit) as erfme preserving type)                 as EntryUnit,
      //    @Semantics.systemDateTime.createdAt: true

      //    max(CreationDateTime)  as CreationDateTime,

      //    @Semantics.user.createdBy: true

      //    max(CreatedByUserName) as CreatedByUserName,


      MfgOrderComponentAssembly._OpActyNtwkInstance,
      MfgOrderComponentAssembly._OperationActivityInstance,
      MfgOrderComponentAssembly._ShopFloorItem,
      MfgOrderComponentAssembly._ParentShopFloorItem,
      MfgOrderComponentAssembly._BatchDistinct,
      MfgOrderComponentAssembly._Material,
      MfgOrderComponentAssembly._Plant,
      MfgOrderComponentAssembly._Reservation,
      _OpActyCompInstceAssignment,
      _MaterialBaseUnit
}
group by
  MfgOrderComponentAssembly.Reservation,
  MfgOrderComponentAssembly.ReservationItem,
  MfgOrderComponentAssembly.RecordType,
  MfgOrderComponentAssembly.OpActyNtwkInstance,
  MfgOrderComponentAssembly.OpActyNtwkElement,
  MfgOrderComponentAssembly.AssemblyShopFloorItem,
  MfgOrderComponentAssembly.ShopFloorItem,
  MfgOrderComponentAssembly.Batch,
  MfgOrderComponentAssembly.Material,
  MfgOrderComponentAssembly.Plant,
  MfgOrderCompInstceAssembly.OriglDgtlMockUpCharcsUUID,
  OpActyCompInstceAssignment.DgtlMockUpCharcsUUID,
  ReferenceDesignatorValue,
  MfgOrderComponentAssembly.DebitCreditCode
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INSTANCEREFERENCEDESIGNATOR",
"I_MFGORDERCOMPINSTCEASSEMBLY",
"I_MFGORDERCOMPONENTASSEMBLY",
"I_OPACTYCOMPINSTCEASSIGNMENT"
],
"ASSOCIATED":
[
"I_BATCHDISTINCT",
"I_MATERIAL",
"I_OPACTYCOMPINSTCEASSIGNMENT",
"I_OPACTYNTWKINSTANCE",
"I_OPERATIONACTIVITYINSTANCE",
"I_PLANT",
"I_RESERVATIONDOCUMENTHEADER",
"I_SHOPFLOORITEM",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_MFGORDERCOMPONENTASSEMBLY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/