P_ASSLDRELTDSERIALNUMBERBATCH

CDS View

Assembled Related Serial Number and/or Batch

P_ASSLDRELTDSERIALNUMBERBATCH is a CDS View in S/4HANA. Assembled Related Serial Number and/or Batch. It contains 19 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_AssldReltdSerialNumberBatch view from COMPOSITE Assembled Related Serial Number and/or Batch

Fields (19)

KeyField CDS FieldsUsed in Views
KEY AssemblyShopFloorItem AssemblyShopFloorItem 1
KEY Batch Batch 1
KEY Material Material 1
KEY OpActyNtwkElement OpActyNtwkElement 1
KEY OpActyNtwkInstance OpActyNtwkInstance 1
KEY Plant Plant 1
KEY RecordType RecordType 1
KEY Reservation Reservation 1
KEY ReservationItem ReservationItem 1
KEY ShopFloorItem ShopFloorItem 1
_Material _Material 1
_OpActyNtwkInstance _OpActyNtwkInstance 1
_OperationActivityInstance _OperationActivityInstance 1
_ParentShopFloorItem _ParentShopFloorItem 1
_Plant _Plant 1
_ReservationHeader _ReservationHeader 1
_ShopFloorItem _ShopFloorItem 1
MaterialBaseUnit MaterialBaseUnit 1
MaterialComponentQuantity MaterialComponentQuantity 1
@AbapCatalog.sqlViewName: 'PMPEASSRLTDSRNB'
@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_AssldReltdSerialNumberBatch
  as select from           I_OpActyComponentAssignment    as OpActyComponentAssignment
  -- Join the assembled serial numbers of the related reservation
    inner join             P_MfgOrderCompAssyWthoutInstce as RelatedCompAssyWthoutInstce on  RelatedCompAssyWthoutInstce.Reservation        = OpActyComponentAssignment.RelatedReservation
                                                                                         and RelatedCompAssyWthoutInstce.ReservationItem    = OpActyComponentAssignment.RelatedReservationItem
                                                                                         and RelatedCompAssyWthoutInstce.RecordType         = OpActyComponentAssignment.RelatedRecordType
                                                                                         and RelatedCompAssyWthoutInstce.OpActyNtwkInstance = OpActyComponentAssignment.RelatedOpActyNtwkInstance
                                                                                         and RelatedCompAssyWthoutInstce.OpActyNtwkElement  = OpActyComponentAssignment.RelatedOpActyNtwkElement
  --Join the already assembled
    left outer to one join P_MfgOrderCompAssyWthoutInstce as OwnCompAssyWthoutInstce     on  OwnCompAssyWthoutInstce.Reservation           = OpActyComponentAssignment.Reservation
                                                                                         and OwnCompAssyWthoutInstce.ReservationItem       = OpActyComponentAssignment.ReservationItem
                                                                                         and OwnCompAssyWthoutInstce.RecordType            = OpActyComponentAssignment.RecordType
                                                                                         and OwnCompAssyWthoutInstce.OpActyNtwkInstance    = OpActyComponentAssignment.OpActyNtwkInstance
                                                                                         and OwnCompAssyWthoutInstce.OpActyNtwkElement     = OpActyComponentAssignment.OpActyNtwkElement
                                                                                         and OwnCompAssyWthoutInstce.AssemblyShopFloorItem = RelatedCompAssyWthoutInstce.AssemblyShopFloorItem
                                                                                         and OwnCompAssyWthoutInstce.ShopFloorItem         = RelatedCompAssyWthoutInstce.ShopFloorItem
                                                                                         and OwnCompAssyWthoutInstce.Batch                 = RelatedCompAssyWthoutInstce.Batch
                                                                                         and OwnCompAssyWthoutInstce.Material              = RelatedCompAssyWthoutInstce.Material
                                                                                         and OwnCompAssyWthoutInstce.Plant                 = RelatedCompAssyWthoutInstce.Plant
{
  key OpActyComponentAssignment.Reservation,
  key OpActyComponentAssignment.ReservationItem,
  key OpActyComponentAssignment.RecordType,
  key OpActyComponentAssignment.OpActyNtwkInstance,
  key OpActyComponentAssignment.OpActyNtwkElement,
  key RelatedCompAssyWthoutInstce.AssemblyShopFloorItem,
  key RelatedCompAssyWthoutInstce.ShopFloorItem,
  key RelatedCompAssyWthoutInstce.Batch,
  key RelatedCompAssyWthoutInstce.Material,
  key RelatedCompAssyWthoutInstce.Plant,
      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      RelatedCompAssyWthoutInstce.MaterialComponentQuantity                                         as AssembledQuantity,
      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      cast(coalesce(OwnCompAssyWthoutInstce.MaterialComponentQuantity, 0) as kmpmg preserving type) as AlreadyDisassembledQuantity,
      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      cast(RelatedCompAssyWthoutInstce.MaterialComponentQuantity - coalesce(OwnCompAssyWthoutInstce.MaterialComponentQuantity, 0)
           as kmpmg)                                                                                as MaterialComponentQuantity,
      RelatedCompAssyWthoutInstce.MaterialBaseUnit,
      @Semantics.quantity.unitOfMeasure: 'EntryUnit'
      cast(RelatedCompAssyWthoutInstce.QuantityInEntryUnit - coalesce(OwnCompAssyWthoutInstce.QuantityInEntryUnit, 0)
           as erfmgv)                                                                               as QuantityInEntryUnit,
      RelatedCompAssyWthoutInstce.EntryUnit,
      OpActyComponentAssignment._OpActyNtwkInstance,
      OpActyComponentAssignment._OperationActivityInstance,
      OpActyComponentAssignment._ReservationHeader,
      RelatedCompAssyWthoutInstce._ShopFloorItem,
      RelatedCompAssyWthoutInstce._ParentShopFloorItem,
      RelatedCompAssyWthoutInstce._BatchDistinct,
      RelatedCompAssyWthoutInstce._Material,
      RelatedCompAssyWthoutInstce._Plant
}
where
       OpActyComponentAssignment.RelatedReservation <> '0000000000'
  and(
       RelatedCompAssyWthoutInstce.ShopFloorItem    <> 0
    or RelatedCompAssyWthoutInstce.Batch            <> ''
  )