P_MFGORDERCOMPASSYWTHOUTINSTCE

CDS View

Assembly Qty at SFI@OA per RESB, Matl, SerialNr and Batch

P_MFGORDERCOMPASSYWTHOUTINSTCE is a CDS View in S/4HANA. Assembly Qty at SFI@OA per RESB, Matl, SerialNr and Batch. It contains 14 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
P_AssldReltdCompSFINoInstce view inner COMPOSITE Assembled Related Component SFI without Instance
P_AssldReltdSerialNumberBatch view inner COMPOSITE Assembled Related Serial Number and/or Batch

Fields (14)

KeyField CDS FieldsUsed in Views
KEY AssemblyShopFloorItem AssemblyShopFloorItem 2
KEY Batch Batch 2
KEY Material Material 2
KEY Plant Plant 2
KEY ShopFloorItem ShopFloorItem 2
_BatchDistinct _BatchDistinct 2
_Material _Material 1
_MaterialBaseUnit _MaterialBaseUnit 1
_ParentShopFloorItem _ParentShopFloorItem 2
_Plant _Plant 1
_ShopFloorItem _ShopFloorItem 2
EntryUnit EntryUnit 1
MaterialBaseUnit MaterialBaseUnit 2
MaterialComponentQuantity AssembledQuantity,MaterialComponentQuantity 2
@AbapCatalog.sqlViewName: 'PMPECOMPASMAGGNI'
@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
// Used in C_SHOPFLOORITEMATOPACTYCOMP to get number of assembled materials per component

define view P_MfgOrderCompAssyWthoutInstce
  as select from I_MfgOrderComponentAssembly as MfgOrderComponentAssembly
  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,

      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,
      @Semantics.unitOfMeasure: true
      cast(max(MfgOrderComponentAssembly.EntryUnit) as erfme preserving type)                 as EntryUnit,

      MfgOrderComponentAssembly._OpActyNtwkInstance,
      MfgOrderComponentAssembly._OperationActivityInstance,
      MfgOrderComponentAssembly._ShopFloorItem,
      MfgOrderComponentAssembly._ParentShopFloorItem,
      MfgOrderComponentAssembly._BatchDistinct,
      MfgOrderComponentAssembly._Material,
      MfgOrderComponentAssembly._Plant,
      MfgOrderComponentAssembly._Reservation,
      _MaterialBaseUnit
}
group by
  MfgOrderComponentAssembly.Reservation,
  MfgOrderComponentAssembly.ReservationItem,
  MfgOrderComponentAssembly.RecordType,
  MfgOrderComponentAssembly.OpActyNtwkInstance,
  MfgOrderComponentAssembly.OpActyNtwkElement,
  MfgOrderComponentAssembly.AssemblyShopFloorItem,
  MfgOrderComponentAssembly.ShopFloorItem,
  MfgOrderComponentAssembly.Batch,
  MfgOrderComponentAssembly.Material,
  MfgOrderComponentAssembly.Plant,
  MfgOrderComponentAssembly.DebitCreditCode