I_OrderSequence
Order Sequence
I_OrderSequence is a Basic CDS View (Dimension) that provides data about "Order Sequence" in SAP S/4HANA. It reads from 2 data sources (affl, caufv) and exposes 38 fields with key field OrderInternalID. It has 16 associations to related views. Part of development package VDM_PP_SFC.
Associations (16)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_LogisticsOrder | _Order | $projection.OrderID = _Order.OrderID |
| [1..1] | I_OrderCategory | _OrderCategory | $projection.OrderCategory = _OrderCategory.OrderCategory |
| [1..1] | I_OrderType | _OrderType | $projection.OrderType= _OrderType.OrderType |
| [0..1] | I_OrderSequenceBySemKey | _ReferenceSequence | $projection.OrderID = _ReferenceSequence.OrderID and $projection.ReferenceSequence = _ReferenceSequence.Sequence |
| [1..1] | I_SequenceCategory | _SequenceCategory | $projection.SequenceCategory = _SequenceCategory.SequenceCategory |
| [0..1] | I_SequenceSchedulingAlignment | _SequenceSchedulingAlignment | $projection.SequenceSchedulingAlignment = _SequenceSchedulingAlignment.SequenceSchedulingAlignment |
| [1..1] | I_OrderInternalID | _OrderInternalID | $projection.OrderInternalID = _OrderInternalID.OrderInternalID |
| [1..1] | I_Plant | _Plant | $projection.ProductionPlant = _Plant.Plant |
| [0..1] | I_ProductionSupervisor | _ProductionSupervisor | $projection.ProductionPlant = _ProductionSupervisor.Plant and $projection.ProductionSupervisor = _ProductionSupervisor.ProductionSupervisor |
| [0..1] | I_BillOfOperationsType | _BillOfOperationsType | $projection.BillOfOperationsType = _BillOfOperationsType.BillOfOperationsType |
| [0..1] | I_BillOfOperationsGroup | _BillOfOperationsGroup | $projection.BillOfOperationsType = _BillOfOperationsGroup.BillOfOperationsType and $projection.BillOfOperationsGroup = _BillOfOperationsGroup.BillOfOperationsGroup |
| [0..1] | I_BillOfOperations | _BillOfOperationsVariant | $projection.BillOfOperationsType = _BillOfOperationsVariant.BillOfOperationsType and $projection.BillOfOperationsGroup = _BillOfOperationsVariant.BillOfOperationsGroup and $projection.BillOfOperationsVariant = _BillOfOperationsVariant.BillOfOperationsVariant |
| [0..1] | I_UnitOfMeasure | _BillOfOperationsUnit | $projection.BillOfOperationsUnit = _BillOfOperationsUnit.UnitOfMeasure |
| [1..1] | I_StatusObject | _StatusObject | $projection.ObjectInternalID = _StatusObject.StatusObject |
| [0..1] | I_Language | _Language | $projection.Language = _Language.Language |
| [0..1] | I_OrderSequenceLongText | _LongText | $projection.OrderInternalID = _LongText.OrderInternalID and $projection.SequenceInternalID = _LongText.SequenceInternalID |
Annotations (15)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IORDERSEQUENCE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.allowExtensions | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.modelingPattern | #NONE | view | |
| ObjectModel.representativeKey | SequenceInternalID | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| VDM.viewType | #BASIC | view | |
| EndUserText.label | Order Sequence | view |
Fields (38)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | OrderInternalID | |||
| OrderID | caufv | aufnr | ||
| Sequence | affl | plnfl | ||
| SequenceText | affl | ltxa1 | ||
| Language | affl | txtsp | ||
| OrderCategory | ||||
| OrderType | ||||
| SequenceCategory | affl | flgat | ||
| ProductionPlant | ||||
| ProductionSupervisor | ||||
| BillOfOperationsType | ||||
| BillOfOperations | ||||
| BillOfOperationsGroup | ||||
| BillOfOperationsVariant | ||||
| SequenceSchedulingAlignment | affl | auschl | ||
| ReferenceSequence | affl | bezfl | ||
| ObjectInternalID | affl | objnr | ||
| BranchOperationInternalID | affl | bknt1 | ||
| ReturnOperationInternalID | affl | bknt2 | ||
| BillOfOperationsUnit | caufv | plnme | ||
| MinimumLotSizeQuantity | affl | losvn | ||
| MaximumLotSizeQuantity | affl | losbs | ||
| _Order | _Order | |||
| _OrderCategory | _OrderCategory | |||
| _OrderType | _OrderType | |||
| _SequenceCategory | _SequenceCategory | |||
| _ReferenceSequence | _ReferenceSequence | |||
| _SequenceSchedulingAlignment | _SequenceSchedulingAlignment | |||
| _OrderInternalID | _OrderInternalID | |||
| _Plant | _Plant | |||
| _ProductionSupervisor | _ProductionSupervisor | |||
| _BillOfOperationsType | _BillOfOperationsType | |||
| _BillOfOperationsGroup | _BillOfOperationsGroup | |||
| _BillOfOperationsVariant | _BillOfOperationsVariant | |||
| _BillOfOperationsUnit | _BillOfOperationsUnit | |||
| _StatusObject | _StatusObject | |||
| _LongText | _LongText | |||
| _Language | _Language |
@AbapCatalog.sqlViewName: 'IORDERSEQUENCE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.privilegedAssociations: ['_ProductionSupervisor', '_StatusObject', '_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
// Due to the high number of consumers, this CDS view is protected against incompatible changes
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 [1..1] to I_StatusObject as _StatusObject on $projection.ObjectInternalID = _StatusObject.StatusObject
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,
@ObjectModel.foreignKey.association: '_StatusObject'
affl.objnr as ObjectInternalID,
affl.bknt1 as BranchOperationInternalID,
affl.bknt2 as ReturnOperationInternalID,
// Quantities and UoM
@ObjectModel.foreignKey.association: '_BillOfOperationsUnit'
@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,
_StatusObject,
_LongText,
_Language
};
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA