I_PRODUCTIONMODEL

CDS View

Production Model Header

I_PRODUCTIONMODEL is a CDS View in S/4HANA. Production Model Header. It contains 8 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
I_ProdnModRefChangeRecord view_entity inner COMPOSITE Reference Change Records
R_ProductionModelTP view_entity from TRANSACTIONAL Production Model Header

Fields (8)

KeyField CDS FieldsUsed in Views
KEY BillOfOperationsVersion BillOfOperationsVersion 1
KEY ProductionModelUUID ProductionModelUUID 1
BillOfMaterialCategory BillOfMaterialCategory 1
BillOfMaterialVariantUsage BillOfMaterialVariantUsage 1
BillOfOperationsGroup BillOfOperationsGroup 1
BillOfOperationsType BillOfOperationsType 1
BillOfOperationsVariant BillOfOperationsVariant 1
Plant Plant 1
@EndUserText.label: 'Production Model Header'
@AccessControl.authorizationCheck: #MANDATORY
@VDM.viewType: #COMPOSITE
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #C,
  sizeCategory: #L,
  dataClass: #TRANSACTIONAL
}
define view entity I_ProductionModel
  as select from I_ProductionModelBasic     as ProductionModel

    inner join   I_ProdnModBOOVersBOMAssgmt as BooVersionBOMAssgmt on  BooVersionBOMAssgmt.BillOfOperationsType    = ProductionModel.BillOfOperationsType
                                                                   and BooVersionBOMAssgmt.BillOfOperationsGroup   = ProductionModel.BillOfOperationsGroup
                                                                   and BooVersionBOMAssgmt.BillOfOperationsVariant = ProductionModel.BillOfOperationsVariant
                                                           //        and BooVersionBOMAssgmt.BillOfOperationsVersion = BooLatestVersion.BillOfOperationsVersion

    left outer to one join   P_ProdnModLatestBOOVersion as BooLatestVersion    on  BooLatestVersion.BillOfOperationsType    = ProductionModel.BillOfOperationsType
                                                                               and BooLatestVersion.BillOfOperationsGroup   = ProductionModel.BillOfOperationsGroup
                                                                               and BooLatestVersion.BillOfOperationsVariant = ProductionModel.BillOfOperationsVariant
                                                                               and BooLatestVersion.BillOfOperationsVersion = BooVersionBOMAssgmt.BillOfOperationsVersion
    left outer to one join   P_ProdnModActiveBOOVersion as BooActiveVersion    on  BooActiveVersion.BillOfOperationsType    = ProductionModel.BillOfOperationsType
                                                                               and BooActiveVersion.BillOfOperationsGroup   = ProductionModel.BillOfOperationsGroup
                                                                               and BooActiveVersion.BillOfOperationsVariant = ProductionModel.BillOfOperationsVariant
                                                                               and BooActiveVersion.BillOfOperationsVersion = BooVersionBOMAssgmt.BillOfOperationsVersion
  association [0..*] to I_ProductionModelComponent as _HeaderComponent       on  $projection.ProductionModelUUID = _HeaderComponent.ProductionModelUUID
                                                                             and $projection.BillOfOperationsVersion = _HeaderComponent.BillOfOperationsVersion
  association [0..*] to I_ProductionModelOperation as _Operation             on  $projection.ProductionModelUUID = _Operation.ProductionModelUUID
                                                                             and $projection.BillOfOperationsVersion = _Operation.BillOfOperationsVersion
  association [0..1] to I_Plant                    as _Plant                 on  $projection.Plant = _Plant.Plant
                                                                             and _Plant.Language   = $session.system_language
  association [0..1] to I_MaterialText             as _MaterialText          on  $projection.Material   = _MaterialText.Material
                                                                             and _MaterialText.Language = $session.system_language
  association [0..1] to I_VersionStatus            as _BOMVersStatusText     on  $projection.BOMVersionStatus = _BOMVersStatusText.BOMVersionStatus
                                                                             and _BOMVersStatusText.Language  = $session.system_language
  association [0..1] to I_BOOVersionStatusText     as _BOOVersionStatusText  on  $projection.BillOfOperationsVersionStatus = _BOOVersionStatusText.BillOfOperationsVersionStatus
                                                                             and _BOOVersionStatusText.Language            = $session.system_language
  association [0..1] to I_BillOfMaterialUsage      as _BOMUsageText          on  $projection.BillOfMaterialVariantUsage = _BOMUsageText.BillOfMaterialVariantUsage
                                                                             and _BOMUsageText.Language                 = $session.system_language
  association [0..1] to I_BillOfOperationsTypeText as _BOOTypeText           on  $projection.BillOfOperationsType = _BOOTypeText.BillOfOperationsType
                                                                             and _BOOTypeText.Language            = $session.system_language
  association [0..1] to I_SalesDocumentItem        as _SalesDocumentItemText on  $projection.SalesOrder     = _SalesDocumentItemText.SalesDocument
                                                                             and $projection.SalesOrderItem = _SalesDocumentItemText.SalesDocumentItem
{

  key ProductionModel.ProductionModelUUID,
  key BooVersionBOMAssgmt.BillOfOperationsVersion,
      ProductionModel.ProductionModelProcessType,
      ProductionModel.ProdnModComplexAssemblyType,
      ProductionModel.Material,
      ProductionModel.BillOfMaterial,
      ProductionModel.BillOfMaterialVariant,
      ProductionModel.BillOfMaterialCategory,
      ProductionModel.BillOfMaterialVariantUsage,
      BooVersionBOMAssgmt.BillOfMaterialVersion,
      BooVersionBOMAssgmt.BOMVersionStatus,
      ProductionModel.Plant,
      ProductionModel.BillOfOperationsType,
      ProductionModel.BillOfOperationsGroup,
      ProductionModel.BillOfOperationsVariant,
      ProductionModel.SalesOrder,
      ProductionModel.SalesOrderItem,
      @ObjectModel.text.association: '_BOOVersionStatusText'
      BooVersionBOMAssgmt.BillOfOperationsVersionStatus,
      cast ( case
      when BooLatestVersion.BillOfOperationsVersion is not initial
      then 'X'
      else ''
      end as boole_d preserving type ) as ProdnModelVersionIsLatest,

      cast ( case
      when BooActiveVersion.BillOfOperationsVersion is not initial
      then 'X'
      when BooActiveVersion.BillOfOperationsVersion is null and BooLatestVersion.BillOfOperationsVersion = '0001' and BooVersionBOMAssgmt.BillOfOperationsVersionStatus = '30'
      then 'X'
      else ''
      end as boole_d preserving type ) as ProdnModelVersionIsActive,

      @Semantics.booleanIndicator: true
      BooVersionBOMAssgmt.IsLatestBOOVersion,
      ProductionModel.ProdnModelCreationDateTime,
      ProductionModel.ProductionModelCreatedByUser,
      ProductionModel.ProdnModelChangedDateTime,
      ProductionModel.ProductionModelChangedByUser,
      _HeaderComponent,
      _Operation,
      _Plant,
      _MaterialText,
      _BOOVersionStatusText,
      _BOMVersStatusText,
      _BOMUsageText,
      _BOOTypeText,
      _SalesDocumentItemText
}