P_VersEngBOMAcrossAllProdnPlnt

DDL: P_VERSENGBOMACROSSALLPRODNPLNT SQL: PVERSEBOMALLPLNT Type: view COMPOSITE Package: MPE_PLAN_MEC

Version Controlled Eng BOM Across All Production Plants

P_VersEngBOMAcrossAllProdnPlnt is a Composite CDS View that provides data about "Version Controlled Eng BOM Across All Production Plants" in SAP S/4HANA. It reads from 2 data sources (I_Plant, P_VersEngBillOfMaterial) and exposes 46 fields with key fields BillOfMaterialCategory, BillOfMaterial, BillOfMaterialVariant, Material, Plant. Part of development package MPE_PLAN_MEC.

Data Sources (2)

SourceAliasJoin Type
I_Plant ProductionPlant cross
P_VersEngBillOfMaterial VersEngBOM from

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PVERSEBOMALLPLNT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MASTER view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (46)

KeyFieldSource TableSource FieldDescription
KEY BillOfMaterialCategory P_VersEngBillOfMaterial BillOfMaterialCategory
KEY BillOfMaterial P_VersEngBillOfMaterial BillOfMaterial
KEY BillOfMaterialVariant P_VersEngBillOfMaterial BillOfMaterialVariant
KEY Material P_VersEngBillOfMaterial Material
KEY Plant P_VersEngBillOfMaterial Plant
KEY BillOfMaterialVersion P_VersEngBillOfMaterial BillOfMaterialVersion
KEY ProductionPlant
BOMAlternativeText P_VersEngBillOfMaterial BOMAlternativeText
BOMGroup P_VersEngBillOfMaterial BOMGroup
BOMHeaderBaseUnit P_VersEngBillOfMaterial BOMHeaderBaseUnit
BOMHeaderInternalChangeCount P_VersEngBillOfMaterial BOMHeaderInternalChangeCount
BOMHeaderQuantityInBaseUnit P_VersEngBillOfMaterial BOMHeaderQuantityInBaseUnit
BOMHeaderText P_VersEngBillOfMaterial BOMHeaderText
BOMIsToBeDeleted P_VersEngBillOfMaterial BOMIsToBeDeleted
EBOMType P_VersEngBillOfMaterial EBOMType
BOMPrioritizedVersion P_VersEngBillOfMaterial BOMPrioritizedVersion
BOMTechnicalType P_VersEngBillOfMaterial BOMTechnicalType
BOMUsagePriority P_VersEngBillOfMaterial BOMUsagePriority
BOMVersionStatus P_VersEngBillOfMaterial BOMVersionStatus
BillOfMaterialAuthsnGrp P_VersEngBillOfMaterial BillOfMaterialAuthsnGrp
BillOfMaterialHeaderUUID P_VersEngBillOfMaterial BillOfMaterialHeaderUUID
BillOfMaterialStatus P_VersEngBillOfMaterial BillOfMaterialStatus
BillOfMaterialUUID P_VersEngBillOfMaterial BillOfMaterialUUID
BillOfMaterialVariantUsage P_VersEngBillOfMaterial BillOfMaterialVariantUsage
ChgToEngineeringChgDocument P_VersEngBillOfMaterial ChgToEngineeringChgDocument
CreatedByUser P_VersEngBillOfMaterial CreatedByUser
DocumentIsCreatedByCAD P_VersEngBillOfMaterial DocumentIsCreatedByCAD
EngineeringChangeDocument P_VersEngBillOfMaterial EngineeringChangeDocument
HeaderValidityEndDate P_VersEngBillOfMaterial HeaderValidityEndDate
HeaderValidityStartDate P_VersEngBillOfMaterial HeaderValidityStartDate
IsALE P_VersEngBillOfMaterial IsALE
IsConfiguredMaterial P_VersEngBillOfMaterial IsConfiguredMaterial
IsLatestBOMVersion P_VersEngBillOfMaterial IsLatestBOMVersion
IsMarkedForDeletion P_VersEngBillOfMaterial IsMarkedForDeletion
IsMultipleBOMAlt P_VersEngBillOfMaterial IsMultipleBOMAlt
LaboratoryOrDesignOffice P_VersEngBillOfMaterial LaboratoryOrDesignOffice
LastChangeDateendasLastChangeDate
IsMaterialUnitized P_VersEngBillOfMaterial IsMaterialUnitized
RecordCreationDate P_VersEngBillOfMaterial RecordCreationDate
LastChangedByUser P_VersEngBillOfMaterial LastChangedByUser
MatFromLotSizeQuantity P_VersEngBillOfMaterial MatFromLotSizeQuantity
IsVersionBillOfMaterial P_VersEngBillOfMaterial IsVersionBillOfMaterial
MaterialToLotSizeQuantity P_VersEngBillOfMaterial MaterialToLotSizeQuantity
_BillOfMaterialItem P_VersEngBillOfMaterial _BillOfMaterialItem
_BillOfMaterialVariantUsage P_VersEngBillOfMaterial _BillOfMaterialVariantUsage
_UnitOfMeasure P_VersEngBillOfMaterial _UnitOfMeasure
/*

This Private view is a cartesian product of an EBOM with all plants present in the system.The Catesian product is done
because the EBOM shouls have the possiblity of handover to any manufacturing plant Hence the Plant after join has been
renamed as Production Plant

*/

@AbapCatalog.sqlViewName: 'PVERSEBOMALLPLNT'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType: {serviceQuality:#X, sizeCategory: #XXL, dataClass: #MASTER}
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE

define view P_VersEngBOMAcrossAllProdnPlnt
  as select from P_VersEngBillOfMaterial as VersEngBOM
    cross join   I_Plant                 as ProductionPlant
{
  key  VersEngBOM.BillOfMaterialCategory,
  key  VersEngBOM.BillOfMaterial,
  key  VersEngBOM.BillOfMaterialVariant,
  key  VersEngBOM.Material,
  key  VersEngBOM.Plant,
  key  VersEngBOM.BillOfMaterialVersion,
  key  cast(ProductionPlant.Plant as mpe_mec_prodn_plnt preserving type)                                                 as ProductionPlant,
       VersEngBOM.BOMAlternativeText,
       VersEngBOM.BOMGroup,
       VersEngBOM.BOMHeaderBaseUnit,
       VersEngBOM.BOMHeaderInternalChangeCount,
       VersEngBOM.BOMHeaderQuantityInBaseUnit,
       VersEngBOM.BOMHeaderText,
       VersEngBOM.BOMIsToBeDeleted,
       VersEngBOM.EBOMType,
       VersEngBOM.BOMPrioritizedVersion,
       VersEngBOM.BOMTechnicalType,
       VersEngBOM.BOMUsagePriority,
       VersEngBOM.BOMVersionStatus,
       VersEngBOM.BillOfMaterialAuthsnGrp,
       VersEngBOM.BillOfMaterialHeaderUUID,
       VersEngBOM.BillOfMaterialStatus,
       VersEngBOM.BillOfMaterialUUID,
       VersEngBOM.BillOfMaterialVariantUsage,
       VersEngBOM.ChgToEngineeringChgDocument,
       VersEngBOM.CreatedByUser,
       VersEngBOM.DocumentIsCreatedByCAD,
       VersEngBOM.EngineeringChangeDocument,
       VersEngBOM.HeaderValidityEndDate,
       VersEngBOM.HeaderValidityStartDate,
       VersEngBOM.IsALE,
       VersEngBOM.IsConfiguredMaterial,
       VersEngBOM.IsLatestBOMVersion,
       VersEngBOM.IsMarkedForDeletion,
       VersEngBOM.IsMultipleBOMAlt,
       VersEngBOM.LaboratoryOrDesignOffice,

       // Last Change Date should be calclulated based on header and item both

//              case when VersEngBOM.BOMItemLastChangeDate > VersEngBOM.LastChangeDate

//                   then

//                        VersEngBOM.BOMItemLastChangeDate

//                   else

//                        VersEngBOM.LastChangeDate

//              end                                                               as LastChangeDate,

       case when VersEngBOM.LastChangeDate is null 
       then VersEngBOM.RecordCreationDate 
       else VersEngBOM.LastChangeDate end as LastChangeDate,

       // Unitization Flag

       VersEngBOM.IsMaterialUnitized,

       VersEngBOM.RecordCreationDate,
       VersEngBOM.LastChangedByUser,
       VersEngBOM.MatFromLotSizeQuantity,
       VersEngBOM.IsVersionBillOfMaterial,
       VersEngBOM.MaterialToLotSizeQuantity,

       VersEngBOM._BillOfMaterialItem,
       VersEngBOM._BillOfMaterialVariantUsage,
       VersEngBOM._UnitOfMeasure
}