P_MfgProcgExecBatchPlant

DDL: P_MFGPROCGEXECBATCHPLANT SQL: PMPEBATCHPLANT Type: view COMPOSITE

P_MfgProcgExecBatchPlant is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_Plant) and exposes 12 fields with key fields ShopFloorItem, Material, Batch, Plant, SerialNumber. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_Plant Plant cross

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_ProductPlant _ProductPlant $projection.Material = _ProductPlant.Product and $projection.Plant = _ProductPlant.Plant

Annotations (7)

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

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY ShopFloorItem
KEY Material BatchDistinct Material
KEY Batch BatchDistinct Batch
KEY Plant I_Plant Plant
KEY SerialNumber
_Material _Material
KEY Material BatchDistinct Material
KEY Batch BatchDistinct Batch
KEY Plant BatchDistinct Plant
KEY SerialNumber
_Material _Material
_ProductPlant _ProductPlant
@AbapCatalog.sqlViewName: 'PMPEBATCHPLANT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view P_MfgProcgExecBatchPlant
  as

  -- Plant-independent Batches (enhanced for all plants)
  select distinct from I_BatchDistinct as BatchDistinct
    cross join         I_Plant         as Plant
  association [0..1] to I_ProductPlant as _ProductPlant on  $projection.Material = _ProductPlant.Product
                                                        and $projection.Plant    = _ProductPlant.Plant
{
  key cast(0 as mpe_sfi_id)                               as ShopFloorItem,
      @ObjectModel.foreignKey.association: '_Material'
  key BatchDistinct.Material,
  key BatchDistinct.Batch,
  key Plant.Plant,
  key cast('                  ' as gernr preserving type) as SerialNumber,

      _Material,
      _ProductPlant
}
where
      BatchIsMarkedForDeletion    = ' '
  and MatlBatchIsInRstrcdUseStock = ' '
  and BatchDistinct.Plant         = '    '

union all

-- Plant-dependent Batches
select distinct from I_BatchDistinct as BatchDistinct
association [0..1] to I_ProductPlant as _ProductPlant on  $projection.Material = _ProductPlant.Product
                                                      and $projection.Plant    = _ProductPlant.Plant
{
  key cast(0 as mpe_sfi_id)                               as ShopFloorItem,
      @ObjectModel.foreignKey.association: '_Material'
  key BatchDistinct.Material,
  key BatchDistinct.Batch,
  key BatchDistinct.Plant,
  key cast('                  ' as gernr preserving type) as SerialNumber,

      _Material,
      _ProductPlant
}
where
      BatchIsMarkedForDeletion    =  ' '
  and MatlBatchIsInRstrcdUseStock =  ' '
  and BatchDistinct.Plant         <> '    '
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BATCHDISTINCT",
"I_PLANT"
],
"ASSOCIATED":
[
"I_MATERIAL",
"I_PRODUCTPLANT"
],
"BASE":
[
"I_BATCHDISTINCT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/