I_ProductionOrderSequence

DDL: I_PRODUCTIONORDERSEQUENCE Type: view_entity COMPOSITE Package: VDM_PP_SFC

Production Order Sequence

I_ProductionOrderSequence is a Composite CDS View (Fact) that provides data about "Production Order Sequence" in SAP S/4HANA. It reads from 1 data source (I_OrderSequenceBySemKey) and exposes 40 fields with key fields ProductionOrder, ProductionOrderSequence. It has 9 associations to related views. Part of development package VDM_PP_SFC.

Data Sources (1)

SourceAliasJoin Type
I_OrderSequenceBySemKey affl from

Associations (9)

CardinalityTargetAliasCondition
[1..1] I_ProductionOrderType _ProductionOrderType $projection.ProductionOrderType = _ProductionOrderType.ProductionOrderType
[0..1] I_MfgBillOfOperations _BillOfOperationsVariant $projection.BillOfOperationsType = _BillOfOperationsVariant.BillOfOperationsType and $projection.BillOfOperationsGroup = _BillOfOperationsVariant.BillOfOperationsGroup and $projection.BillOfOperationsVariant = _BillOfOperationsVariant.BillOfOperationsVariant
[0..1] I_MfgBillOfOperationsSequence _BillOfOperationsSequence $projection.BillOfOperationsType = _BillOfOperationsSequence.BillOfOperationsType and $projection.BillOfOperationsGroup = _BillOfOperationsSequence.BillOfOperationsGroup and $projection.BillOfOperationsVariant = _BillOfOperationsSequence.BillOfOperationsVariant and $projection.BillOfOperationsSequence = _BillOfOperationsSequence.BillOfOperationsSequence
[1..1] I_StatusObject _StatusObject $projection.ObjectInternalID = _StatusObject.StatusObject
[1..1] I_ProductionOrder _ProductionOrderText $projection.ProductionOrder = _ProductionOrderText.ProductionOrder
[1..1] I_Plant _ProductionPlantText $projection.ProductionPlant = _ProductionPlantText.Plant
[1..1] I_StatusObject _StatusObjectText $projection.ObjectInternalID = _StatusObjectText.StatusObject
[0..*] I_ProductionOrderOperation_2 _ProductionOrderOperation
[0..*] I_ProdnOrderSequenceLongText _LongText

Annotations (14)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.dataCategory #FACT view
Analytics.dataExtraction.enabled true view
Analytics.technicalName IPRODNORDERSEQ view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #NONE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.sapObjectNodeType.name ProductionOrderSequence view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
VDM.viewType #COMPOSITE view
EndUserText.label Production Order Sequence view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY ProductionOrder
KEY ProductionOrderSequence
OrderInternalID I_OrderSequenceBySemKey OrderInternalID
SequenceInternalID I_OrderSequenceBySemKey SequenceInternalID
SequenceCategory I_OrderSequenceBySemKey SequenceCategory
ProductionOrderType
ProductionOrderSequenceText
SequenceHasLongText I_OrderSequenceBySemKey SequenceHasLongText
LongTextLanguage
SequenceBranchOperation
SequenceReturnOperation
ProductionPlant I_OrderSequenceBySemKey ProductionPlant
BillOfOperationsType I_OrderSequenceBySemKey BillOfOperationsType
BillOfOperationsGroup I_OrderSequenceBySemKey BillOfOperationsGroup
BillOfOperationsVariant I_OrderSequenceBySemKey BillOfOperations
BillOfOperationsSequence I_OrderSequenceBySemKey ReferenceSequence
SequenceSchedulingAlignment I_OrderSequenceBySemKey SequenceSchedulingAlignment
ObjectInternalID I_OrderSequenceBySemKey ObjectInternalID
BillOfOperationsUnit I_OrderSequenceBySemKey BillOfOperationsUnit
MinimumLotSizeQuantity I_OrderSequenceBySemKey MinimumLotSizeQuantity
MaximumLotSizeQuantity I_OrderSequenceBySemKey MaximumLotSizeQuantity
_ProductionOrderType _ProductionOrderType
_StatusObject _StatusObject
_OrderInternalID I_OrderSequenceBySemKey _OrderInternalID
_SequenceInternalID I_OrderSequenceBySemKey _OrderSequence
_SequenceCategory I_OrderSequenceBySemKey _SequenceCategory
_SequenceSchedulingAlignment I_OrderSequenceBySemKey _SequenceSchedulingAlignment
_Plant I_OrderSequenceBySemKey _Plant
_BillOfOperationsType I_OrderSequenceBySemKey _BillOfOperationsType
_BillOfOperationsGroup I_OrderSequenceBySemKey _BillOfOperationsGroup
_BillOfOperationsVariant _BillOfOperationsVariant
_BillOfOperationsSequence _BillOfOperationsSequence
_BillOfOperationsUnit I_OrderSequenceBySemKey _BillOfOperationsUnit
_Language I_OrderSequenceBySemKey _Language
Compositions_ProductionOrderHeader
_ProductionOrderOperation _ProductionOrderOperation
_LongText _LongText
Newtextrelations_ProductionOrderText
_ProductionPlantText _ProductionPlantText
_StatusObjectText _StatusObjectText
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_StatusObject', '_StatusObjectText']
@Analytics.dataCategory: #FACT
@Analytics.dataExtraction.enabled: true
@Analytics.technicalName: 'IPRODNORDERSEQ'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #NONE
@ObjectModel.supportedCapabilities: [#CDS_MODELING_DATA_SOURCE, #EXTRACTION_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@ObjectModel.sapObjectNodeType.name: 'ProductionOrderSequence'
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Production Order Sequence'

define view entity I_ProductionOrderSequence
  as select from           I_OrderSequenceBySemKey as affl
    left outer to one join I_OrderOperationBasic   as vornr1 on  vornr1.OrderInternalID          = affl.OrderInternalID           // Branching Operation

                                                             and vornr1.OrderOperationInternalID = affl.BranchOperationInternalID
    left outer to one join I_OrderOperationBasic   as vornr2 on  vornr2.OrderInternalID          = affl.OrderInternalID           // Returning Operation

                                                             and vornr2.OrderOperationInternalID = affl.ReturnOperationInternalID                   


  association [1..1] to I_ProductionOrderType         as _ProductionOrderType      on  $projection.ProductionOrderType = _ProductionOrderType.ProductionOrderType
  association [0..1] to I_MfgBillOfOperations         as _BillOfOperationsVariant  on  $projection.BillOfOperationsType    = _BillOfOperationsVariant.BillOfOperationsType
                                                                                   and $projection.BillOfOperationsGroup   = _BillOfOperationsVariant.BillOfOperationsGroup
                                                                                   and $projection.BillOfOperationsVariant = _BillOfOperationsVariant.BillOfOperationsVariant
  association [0..1] to I_MfgBillOfOperationsSequence as _BillOfOperationsSequence on  $projection.BillOfOperationsType      = _BillOfOperationsSequence.BillOfOperationsType
                                                                                   and $projection.BillOfOperationsGroup     = _BillOfOperationsSequence.BillOfOperationsGroup
                                                                                   and $projection.BillOfOperationsVariant   = _BillOfOperationsSequence.BillOfOperationsVariant
                                                                                   and $projection.BillOfOperationsSequence  = _BillOfOperationsSequence.BillOfOperationsSequence
  association [1..1] to I_StatusObject                as _StatusObject             on  $projection.ObjectInternalID = _StatusObject.StatusObject

  // SOT relations

  association to parent I_ProductionOrder             as _ProductionOrderHeader    on  $projection.ProductionOrder = _ProductionOrderHeader.ProductionOrder
  composition [0..*] of I_ProductionOrderOperation_2  as _ProductionOrderOperation
  composition [0..*] of I_ProdnOrderSequenceLongText  as _LongText

  -- start new associations for full coverage of text relations
  association [1..1] to I_ProductionOrder             as _ProductionOrderText      on  $projection.ProductionOrder = _ProductionOrderText.ProductionOrder
  association [1..1] to I_Plant                       as _ProductionPlantText      on  $projection.ProductionPlant = _ProductionPlantText.Plant
  association [1..1] to I_StatusObject                as _StatusObjectText         on  $projection.ObjectInternalID = _StatusObjectText.StatusObject

  {
    // Semantic key

    @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionOrderStdVH', element: 'ProductionOrder' } } ]
    @ObjectModel.foreignKey.association: '_ProductionOrderHeader'
    key cast(affl.OrderID  as vdm_manufacturingorder preserving type) as ProductionOrder,
    @ObjectModel.text.element: ['ProductionOrderSequenceText']
    key cast(affl.Sequence as vdm_prodnordersequence preserving type) as ProductionOrderSequence,

    // Technical Key

    @ObjectModel.foreignKey.association: '_OrderInternalID'
    affl.OrderInternalID,
    @ObjectModel.foreignKey.association: '_SequenceInternalID' 
    @ObjectModel.text.element: ['ProductionOrderSequenceText']
    affl.SequenceInternalID,

    // Category and Type

    @ObjectModel.foreignKey.association: '_SequenceCategory'
    affl.SequenceCategory,
    @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionOrderTypeStdVH', element: 'ProductionOrderType' } } ]
    @ObjectModel.foreignKey.association: '_ProductionOrderType'
    cast(affl.OrderType     as vdm_prodnordertype preserving type)     as ProductionOrderType,

    // Short Text

    @Semantics.text: true
    cast(affl.SequenceText  as vdm_flgtext preserving type)           as ProductionOrderSequenceText,
    affl.SequenceHasLongText,
    @ObjectModel.foreignKey.association: '_Language'
    cast(affl.Language      as pph_longtextlang preserving type)      as LongTextLanguage,

    // Branch and Return Operation

    @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionOrderOperationVH', element: 'ProductionOrderOperation' } } ]
    cast(vornr1.Operation_2 as vdm_vornr1 preserving type)            as SequenceBranchOperation,
    @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductionOrderOperationVH', element: 'ProductionOrderOperation' } } ]
    cast(vornr2.Operation_2 as vdm_vornr2 preserving type)            as SequenceReturnOperation,

    // Assignments

    @Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlantStdVH', element: 'Plant' } } ]
    @ObjectModel.foreignKey.association: '_Plant'
    affl.ProductionPlant,
    @ObjectModel.foreignKey.association: '_BillOfOperationsType'
    affl.BillOfOperationsType,
    @ObjectModel.foreignKey.association: '_BillOfOperationsGroup'
    affl.BillOfOperationsGroup,
    @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgBillOfOperationsStdVH', element: 'BillOfOperationsVariant' } } ]
    @ObjectModel.foreignKey.association: '_BillOfOperationsVariant'
    affl.BillOfOperations  as BillOfOperationsVariant,
    @ObjectModel.foreignKey.association: '_BillOfOperationsSequence'    
    affl.ReferenceSequence as BillOfOperationsSequence,
    @ObjectModel.foreignKey.association: '_SequenceSchedulingAlignment'  
    affl.SequenceSchedulingAlignment,
    @ObjectModel.foreignKey.association: '_StatusObject'
    affl.ObjectInternalID,

    // Quantities and UoM

    @ObjectModel.foreignKey.association: '_BillOfOperationsUnit'
    affl.BillOfOperationsUnit,
    @Semantics.quantity.unitOfMeasure: 'BillOfOperationsUnit'
    @Aggregation.default: #MIN
    affl.MinimumLotSizeQuantity,
    @Semantics.quantity.unitOfMeasure: 'BillOfOperationsUnit'
    @Aggregation.default: #MAX
    affl.MaximumLotSizeQuantity,

    // Associations

    _ProductionOrderType,
    _StatusObject,
    @Consumption.hidden: true
    affl._OrderInternalID,
    affl._OrderSequence as _SequenceInternalID,
    affl._SequenceCategory,
    affl._SequenceSchedulingAlignment, 
    affl._Plant,
    affl._BillOfOperationsType,
    affl._BillOfOperationsGroup,
    _BillOfOperationsVariant,
    _BillOfOperationsSequence,
    affl._BillOfOperationsUnit,
    affl._Language,
    -- Compositions
    _ProductionOrderHeader,
    _ProductionOrderOperation,
    _LongText,
    -- New text relations
    _ProductionOrderText,
    _ProductionPlantText,    
    _StatusObjectText
  }
  where
    affl.OrderCategory = '10'; //Production orders only