I_ORDERSEQUENCE

CDS View

Order Sequence

I_ORDERSEQUENCE is a CDS View in S/4HANA. Order Sequence. It contains 39 fields. 7 CDS views read from this table.

CDS Views using this table (7)

ViewTypeJoinVDMDescription
I_MfgOrderSequence view from COMPOSITE Manufacturing Order Sequence
I_MfgOrderSequenceBasic view from BASIC Manufacturing Order Sequence Basic View
I_MfgOrderSequenceLongText view_entity inner COMPOSITE Manufacturing Order Sequence - Text
I_OrderSequenceBySemKey view from BASIC Order Sequence by Semantic Key
P_DemandDrivenOpAggr view left_outer CONSUMPTION Latest Operation in Expedite
P_MfgOrderHasParallelSequence view from COMPOSITE
P_OperationSequence view_entity from CONSUMPTION View to retrieve the sequence category branch to and from

Fields (39)

KeyField CDS FieldsUsed in Views
KEY OrderID ManufacturingOrder,OrderID 3
KEY OrderInternalID OrderInternalBillOfOperations,OrderInternalID 5
KEY Sequence Sequence 2
KEY SequenceInternalID OrderIntBillOfOperationsItem,SequenceInternalID 5
_BillOfOperationsGroup _BillOfOperationsGroup 2
_BillOfOperationsType _BillOfOperationsType 3
_BillOfOperationsUnit _BillOfOperationsUnit 3
_BillOfOperationsVariant _BillOfOperationsVariant 3
_Language _Language 3
_LongText _LongText 2
_Order _Order 1
_OrderCategory _OrderCategory 1
_OrderInternalID _OrderInternalID 3
_OrderType _OrderType 1
_Plant _Plant 3
_ProductionSupervisor _ProductionSupervisor 1
_ReferenceSequence _ReferenceSequence 1
_SequenceCategory _SequenceCategory 4
_SequenceSchedulingAlignment _SequenceSchedulingAlignment 3
BillOfOperations BillOfOperations 2
BillOfOperationsGroup BillOfOperationsGroup 3
BillOfOperationsType BillOfOperationsType 3
BillOfOperationsUnit BillOfOperationsUnit 3
BillOfOperationsVariant BillOfOperations,BillOfOperationsVariant 3
BranchOperationInternalID BranchOperationInternalID 3
Language Language 3
MaximumLotSizeQuantity MaximumLotSizeQuantity 3
MinimumLotSizeQuantity MinimumLotSizeQuantity 3
ObjectInternalID ObjectInternalID 3
OrderCategory OrderCategory 2
OrderType OrderType 1
ProductionPlant ProductionPlant 3
ProductionSupervisor ProductionSupervisor 2
ReferenceSequence ReferenceSequence 2
ReturnOperationInternalID ReturnOperationInternalID 3
SequenceCategory MfgOrderSequenceCategory,SequenceCategory 4
SequenceHasLongText SequenceHasLongText 1
SequenceSchedulingAlignment SequenceSchedulingAlignment 3
SequenceText MfgOrderSequenceText,SequenceText 2
@AbapCatalog.sqlViewName: 'IORDERSEQUENCE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.privilegedAssociations: ['_LongText']
@Analytics.dataCategory: #DIMENSION
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #NONE
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.representativeKey: 'SequenceInternalID'
@ObjectModel.semanticKey: ['OrderID', 'Sequence']
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Order Sequence'
// Category-independent basic view on Sequences without determining branch and return operations


/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view I_OrderSequence
  as select from affl  as affl
    inner join   caufv as aufv on aufv.aufpl = affl.aufpl

  association [1..1] to I_LogisticsOrder              as _Order                       on  $projection.OrderID = _Order.OrderID
  association [1..1] to I_OrderCategory               as _OrderCategory               on  $projection.OrderCategory = _OrderCategory.OrderCategory
  association [1..1] to I_OrderType                   as _OrderType                   on  $projection.OrderType= _OrderType.OrderType
  association [0..1] to I_OrderSequenceBySemKey       as _ReferenceSequence           on  $projection.OrderID           = _ReferenceSequence.OrderID
                                                                                      and $projection.ReferenceSequence = _ReferenceSequence.Sequence
  association [1..1] to I_SequenceCategory            as _SequenceCategory            on  $projection.SequenceCategory = _SequenceCategory.SequenceCategory
  association [0..1] to I_SequenceSchedulingAlignment as _SequenceSchedulingAlignment on  $projection.SequenceSchedulingAlignment = _SequenceSchedulingAlignment.SequenceSchedulingAlignment
  association [1..1] to I_OrderInternalID             as _OrderInternalID             on  $projection.OrderInternalID = _OrderInternalID.OrderInternalID
  association [1..1] to I_Plant                       as _Plant                       on  $projection.ProductionPlant = _Plant.Plant
  association [0..1] to I_ProductionSupervisor        as _ProductionSupervisor        on  $projection.ProductionPlant      = _ProductionSupervisor.Plant
                                                                                      and $projection.ProductionSupervisor = _ProductionSupervisor.ProductionSupervisor
  association [0..1] to I_BillOfOperationsType        as _BillOfOperationsType        on  $projection.BillOfOperationsType = _BillOfOperationsType.BillOfOperationsType
  association [0..1] to I_BillOfOperationsGroup       as _BillOfOperationsGroup       on  $projection.BillOfOperationsType  = _BillOfOperationsGroup.BillOfOperationsType 
                                                                                      and $projection.BillOfOperationsGroup = _BillOfOperationsGroup.BillOfOperationsGroup
  association [0..1] to I_BillOfOperations            as _BillOfOperationsVariant     on  $projection.BillOfOperationsType    = _BillOfOperationsVariant.BillOfOperationsType
                                                                                      and $projection.BillOfOperationsGroup   = _BillOfOperationsVariant.BillOfOperationsGroup
                                                                                      and $projection.BillOfOperationsVariant = _BillOfOperationsVariant.BillOfOperationsVariant
  association [0..1] to I_UnitOfMeasure               as _BillOfOperationsUnit        on  $projection.BillOfOperationsUnit = _BillOfOperationsUnit.UnitOfMeasure
  association [0..1] to I_Language                    as _Language                    on  $projection.Language = _Language.Language
  association [0..1] to I_OrderSequenceLongText       as _LongText                    on  $projection.OrderInternalID    = _LongText.OrderInternalID
                                                                                      and $projection.SequenceInternalID = _LongText.SequenceInternalID
  {
    // Technical Key

    @ObjectModel.foreignKey.association: '_OrderInternalID'
    key cast(affl.aufpl as pph_aufpl preserving type) as OrderInternalID,
    -- representative key
    key cast(affl.aplzl as pph_flgzl preserving type) as SequenceInternalID,
  
    // Semantical key

    @ObjectModel.foreignKey.association: '_Order'
    aufv.aufnr as OrderID,
    @ObjectModel.text.element: ['SequenceText']
    affl.plnfl as Sequence,

    // Text

    @Semantics.text: true
    affl.ltxa1                       as SequenceText,
    cast(case 
           when affl.txtsp <> '' then 'X'
           else affl.txtsp
    end as aufltext preserving type) as SequenceHasLongText,
    @ObjectModel.foreignKey.association: '_Language'
    affl.txtsp                       as Language,

    // Assignments

    @ObjectModel.foreignKey.association: '_OrderCategory'
    cast(aufv.autyp as pph_autyp preserving type)               as OrderCategory,
    @ObjectModel.foreignKey.association: '_OrderType'
    cast(aufv.auart as aufart preserving type)                  as OrderType,
    @ObjectModel.foreignKey.association: '_SequenceCategory'
    affl.flgat                                                  as SequenceCategory,
    @ObjectModel.foreignKey.association: '_Plant'
    cast(aufv.werks as pwwrk preserving type)                   as ProductionPlant,
    @ObjectModel.foreignKey.association: '_ProductionSupervisor'
    cast(aufv.fevor as pph_fevor preserving type)               as ProductionSupervisor,
    @ObjectModel.foreignKey.association: '_BillOfOperationsType'
    cast(affl.plnty as billofoperationstype    preserving type) as BillOfOperationsType,
    @VDM.lifecycle.status: #DEPRECATED       // default data element change -> deprecated to avoid RTT2 error in ATC

    @VDM.lifecycle.successor: 'BillOfOperationsGroup'
    cast(affl.plnnr as billofoperations        preserving type) as BillOfOperations,
    @ObjectModel.foreignKey.association: '_BillOfOperationsGroup'
    cast(affl.plnnr as billofoperationsgroup   preserving type) as BillOfOperationsGroup,
    @ObjectModel.foreignKey.association: '_BillOfOperationsVariant'
    cast(affl.plnal as billofoperationsvariant preserving type) as BillOfOperationsVariant,
    @ObjectModel.foreignKey.association: '_SequenceSchedulingAlignment'   
    affl.auschl as SequenceSchedulingAlignment,
    @ObjectModel.foreignKey.association: '_ReferenceSequence'
    affl.bezfl  as ReferenceSequence,
    affl.objnr  as ObjectInternalID,
    affl.bknt1  as BranchOperationInternalID,
    affl.bknt2  as ReturnOperationInternalID,

    // Quantities and UoM

    @Semantics.unitOfMeasure: true
    aufv.plnme  as BillOfOperationsUnit,
    @Semantics.quantity.unitOfMeasure: 'BillOfOperationsUnit'
    @Aggregation.default: #SUM
    affl.losvn  as MinimumLotSizeQuantity,
    @Semantics.quantity.unitOfMeasure: 'BillOfOperationsUnit'
    @Aggregation.default: #SUM
    affl.losbs  as MaximumLotSizeQuantity,

    // Associations

    _Order,
    _OrderCategory,
    _OrderType,
    _SequenceCategory,
    _ReferenceSequence,
    _SequenceSchedulingAlignment,
    _OrderInternalID,
    _Plant,
    _ProductionSupervisor,
    _BillOfOperationsType,
    _BillOfOperationsGroup,
    _BillOfOperationsVariant,
    _BillOfOperationsUnit,
    _LongText,
    _Language
  };
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"AFFL",
"CAUFV"
],
"ASSOCIATED":
[
"I_BILLOFOPERATIONS",
"I_BILLOFOPERATIONSGROUP",
"I_BILLOFOPERATIONSTYPE",
"I_LANGUAGE",
"I_LOGISTICSORDER",
"I_ORDERCATEGORY",
"I_ORDERINTERNALID",
"I_ORDERSEQUENCEBYSEMKEY",
"I_ORDERSEQUENCELONGTEXT",
"I_ORDERTYPE",
"I_PLANT",
"I_PRODUCTIONSUPERVISOR",
"I_SEQUENCECATEGORY",
"I_SEQUENCESCHEDULINGALIGNMENT",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/