I_OrderItem

DDL: I_ORDERITEM SQL: IORDERITEM Type: view BASIC

Order Item

I_OrderItem is a Basic CDS View (Dimension) that provides data about "Order Item" in SAP S/4HANA. It reads from 1 data source (afpo) and exposes 114 fields with key fields OrderID, OrderItem. It has 38 associations to related views.

Data Sources (1)

SourceAliasJoin Type
afpo afpo from

Associations (38)

CardinalityTargetAliasCondition
[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
[1..1] I_Plant _ProductionPlant $projection.ProductionPlant = _ProductionPlant.Plant
[0..1] I_Plant _MRPPlant $projection.MRPPlant = _MRPPlant.Plant
[0..1] I_PlannedOrder _PlannedOrder $projection.PlannedOrder = _PlannedOrder.PlannedOrder
[0..1] I_Material _Material $projection.Material = _Material.Material
[0..1] I_Product _Product $projection.Material = _Product.Product
[0..1] I_MRPArea _MRPArea $projection.MRPArea = _MRPArea.MRPArea
[0..1] I_ProductionVersion _ProductionVersion $projection.Material = _ProductionVersion.Material and $projection.ProductionPlant = _ProductionVersion.Plant and $projection.ProductionVersion = _ProductionVersion.ProductionVersion
[0..1] I_StorageLocation _StorageLocation $projection.ProductionPlant = _StorageLocation.Plant and $projection.StorageLocation = _StorageLocation.StorageLocation
[0..1] I_Batch _Batch $projection.ProductionPlant = _Batch.Plant and $projection.Material = _Batch.Material and $projection.Batch = _Batch.Batch
[0..1] I_InventorySpecialStockType _InventorySpecialStockType $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
[0..1] I_InventoryValuationType _InventoryValuationType $projection.InventoryValuationType = _InventoryValuationType.InventoryValuationType
[0..1] I_InvtrySpecialStockValnType _InventorySpecialStockValnType $projection.InventorySpecialStockValnType = _InventorySpecialStockValnType.InventorySpecialStockValnType
[0..1] I_StockType_2 _InventoryUsabilityCode $projection.InventoryUsabilityCode = _InventoryUsabilityCode.StockType
[0..1] I_SerialNumberProfile _SerialNumberProfile $projection.SerialNumberAssgmtProfile = _SerialNumberProfile.SerialNumberProfile
[0..1] I_SalesOrder _SalesOrder $projection.SalesOrder = _SalesOrder.SalesOrder
[0..1] I_SalesOrderItem _SalesOrderItem $projection.SalesOrder = _SalesOrderItem.SalesOrder and $projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem
[0..1] I_SalesOrderScheduleLine _SalesOrderScheduleLine $projection.SalesOrder = _SalesOrderScheduleLine.SalesOrder and $projection.SalesOrderItem = _SalesOrderScheduleLine.SalesOrderItem and $projection.SalesOrderScheduleLine = _SalesOrderScheduleLine.ScheduleLine
[0..1] I_WBSElementByInternalKey _WBSElement $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
[0..1] I_WBSElementBasicData _WBSElementBasicData $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
[0..1] I_WBSElementBasicData _WBSElementBasicData2 $projection.WBSElementInternalID_2 = _WBSElementBasicData2.WBSElementInternalID
[0..1] I_PurgQuotaArrgmt _QuotaArrangement $projection.QuotaArrangement = _QuotaArrangement.QuotaArrangement
[0..1] I_PurgQuotaArrgmtItem _QuotaArrangementItem $projection.QuotaArrangement = _QuotaArrangementItem.QuotaArrangement and $projection.QuotaArrangementItem = _QuotaArrangementItem.QuotaArrangementItem
[0..1] I_ReservationDocumentHeader _SettlementReservation $projection.SettlementReservation = _SettlementReservation.Reservation
[0..1] I_ReservationDocumentItem _SettlementReservationItem $projection.SettlementReservation = _SettlementReservationItem.Reservation and $projection.SettlementReservationItem = _SettlementReservationItem.ReservationItem and _SettlementReservationItem.RecordType = ''
[0..1] I_ReservationDocumentHeader _CoProductReservation $projection.CoProductReservation = _CoProductReservation.Reservation
[0..1] I_ReservationDocumentItem _CoProductReservationItem $projection.CoProductReservation = _CoProductReservationItem.Reservation and $projection.CoProductReservationItem = _CoProductReservationItem.ReservationItem and _CoProductReservationItem.RecordType = ''
[0..1] I_MatlProcurementCategory _MatlProcurementCategory $projection.MaterialProcurementCategory = _MatlProcurementCategory.MaterialProcurementCategory
[0..1] I_MatlProcurementType _MatlProcurementType $projection.MaterialProcurementType = _MatlProcurementType.MaterialProcurementType
[0..1] I_BOMExplosionDate _BOMExplosionDate $projection.BOMExplosionDateID = _BOMExplosionDate.BOMExplosionDateID
[1..1] I_UnitOfMeasure _BaseUnit $projection.BaseUnit = _BaseUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _ProductionUnit $projection.ProductionUnit = _ProductionUnit.UnitOfMeasure
[0..1] I_BusinessArea _BusinessArea $projection.BusinessArea = _BusinessArea.BusinessArea
[0..1] I_ConsumptionPosting _ConsumptionPosting $projection.ConsumptionPosting = _ConsumptionPosting.ConsumptionPosting
[0..1] I_AccountAssignmentCategory _AccountAssignmentCategory $projection.AccountAssignmentCategory = _AccountAssignmentCategory.AccountAssignmentCategory
[0..1] I_Indicator _DeliveryCompletedIndicator $projection.IsCompletelyDelivered = _DeliveryCompletedIndicator.IndicatorValue

Annotations (16)

NameValueLevelField
AbapCatalog.sqlViewName IORDERITEM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.dataCategory #DIMENSION view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #NONE view
ObjectModel.representativeKey OrderItem view
ObjectModel.usageType.serviceQuality #A 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 Item view

Fields (114)

KeyFieldSource TableSource FieldDescription
KEY OrderID afpo aufnr
KEY OrderItem
OrderCategory
OrderType
IsMarkedForDeletion afpo xloek
dfreiendasOrderIsReleased
OrderItemIsNotRelevantForMRP afpo dnrel
Material
ProductionPlant
MRPPlant afpo pwerk
ProductionVersion afpo verid
MRPArea afpo berid
SalesOrder afpo kdauf
SalesOrderItem afpo kdpos
SalesOrderScheduleLine
WBSElementInternalID
WBSElementInternalID_2
SettlementReservation
SettlementReservationItem
CoProductReservation
CoProductReservationItem
MaterialProcurementCategory
MaterialProcurementType
BOMExplosionDateID
NumberOfSerialNumbers
MfgOrderItemReplnmtElmntType afpo kbnkz
ProductConfiguration
ObjectInternalID
QuantityDistributionKey afpo verto
OriginalEffctyParameterVariant
GoodsReceiptIsExpected
GoodsReceiptIsNonValuated
MaterialGoodsReceiptDuration afpo webaz
UnderdelivTolrtdLmtRatioInPct afpo untto
OverdelivTolrtdLmtRatioInPct afpo uebto
UnlimitedOverdeliveryIsAllowed afpo uebtk
IsCompletelyDelivered afpo elikz
StorageLocation
Batch afpo charg
InventoryValuationType
InventoryValuationCategory
InventoryUsabilityCode
InventorySpecialStockType
InventorySpecialStockValnType
GoodsRecipientName
UnloadingPointName
StockSegment afpo sgt_scat
PlannedEndDate afpo dgltp
ScheduledBasicEndDate afpo dglts
PlannedDeliveryDate afpo ltrmp
ActualDeliveryDate afpo ltrmi
TotalCommitmentDate afpo gsbtr
PlannedOrder afpo plnum
PlndOrderPlannedStartDate afpo strmp
PlannedOrderOpeningDate afpo etrmp
BaseUnit afpo meins
OrderPlannedTotalQty afpo pgmng
OrderPlannedScrapQty afpo pamng
MaterialQtyToBaseQtyNmrtr afpo umrez
MaterialQtyToBaseQtyDnmntr afpo umren
ProductionUnit
ItemQuantity afpo psmng
MfgOrderItemPlannedScrapQty afpo psamg
MfgOrderItemGoodsReceiptQty afpo wemng
MfgOrderItemActualDeviationQty afpo iamng
MfgOrderItemOpenYieldQty
CompanyCodeCurrency
GoodsReceiptAmountInCoCodeCrcy
BusinessArea afpo gsber
CostEstimate afpo kalnr
AccountAssignmentCategory
ConsumptionPosting afpo kzvbr
ProductSeasonYear afpo fsh_season_year
ProductSeason afpo fsh_season
ProductCollection afpo fsh_collection
ProductTheme afpo fsh_theme
_Order _Order
_OrderCategory _OrderCategory
_OrderType _OrderType
_ProductionPlant _ProductionPlant
_MRPPlant _MRPPlant
_MRPArea _MRPArea
_PlannedOrder _PlannedOrder
_Material _Material
_Product _Product
_ProductionVersion _ProductionVersion
_BaseUnit _BaseUnit
_ProductionUnit _ProductionUnit
_StorageLocation _StorageLocation
_Batch _Batch
_InventorySpecialStockType _InventorySpecialStockType
_InventorySpecialStockValnType _InventorySpecialStockValnType
_InventoryValuationType _InventoryValuationType
_InventoryUsabilityCode _InventoryUsabilityCode
_SerialNumberProfile _SerialNumberProfile
_SalesOrder _SalesOrder
_SalesOrderItem _SalesOrderItem
_SalesOrderScheduleLine _SalesOrderScheduleLine
_WBSElement _WBSElement
_WBSElementBasicData _WBSElementBasicData
_WBSElementBasicData2 _WBSElementBasicData2
_QuotaArrangement _QuotaArrangement
_QuotaArrangementItem _QuotaArrangementItem
_SettlementReservation _SettlementReservation
_SettlementReservationItem _SettlementReservationItem
_CoProductReservation _CoProductReservation
_CoProductReservationItem _CoProductReservationItem
_MatlProcurementCategory _MatlProcurementCategory
_MatlProcurementType _MatlProcurementType
_BOMExplosionDate _BOMExplosionDate
_BusinessArea _BusinessArea
_ConsumptionPosting _ConsumptionPosting
_AccountAssignmentCategory _AccountAssignmentCategory
_DeliveryCompletedIndicator _DeliveryCompletedIndicator
@AbapCatalog.sqlViewName: 'IORDERITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@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: 'OrderItem'
@ObjectModel.semanticKey: ['OrderID', 'OrderItem']
@ObjectModel.usageType: {serviceQuality: #A, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Order Item'
// basic view for order items of any category (AUFTYP)

// Due to the high number of consumers, this CDS view is protected against incompatible changes


/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view I_OrderItem
  as select from afpo as afpo

  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 [1..1] to I_Plant                      as _ProductionPlant           on  $projection.ProductionPlant = _ProductionPlant.Plant
  association [0..1] to I_Plant                      as _MRPPlant                  on  $projection.MRPPlant = _MRPPlant.Plant
  association [0..1] to I_PlannedOrder               as _PlannedOrder              on  $projection.PlannedOrder = _PlannedOrder.PlannedOrder
  association [0..1] to I_Material                   as _Material                  on  $projection.Material = _Material.Material
  association [0..1] to I_Product                    as _Product                   on  $projection.Material = _Product.Product
  association [0..1] to I_MRPArea                    as _MRPArea                   on  $projection.MRPArea = _MRPArea.MRPArea
  association [0..1] to I_ProductionVersion          as _ProductionVersion         on  $projection.Material          = _ProductionVersion.Material
                                                                                   and $projection.ProductionPlant   = _ProductionVersion.Plant
                                                                                   and $projection.ProductionVersion = _ProductionVersion.ProductionVersion
  association [0..1] to I_StorageLocation            as _StorageLocation           on  $projection.ProductionPlant = _StorageLocation.Plant
                                                                                   and $projection.StorageLocation = _StorageLocation.StorageLocation
  association [0..1] to I_Batch                      as _Batch                     on  $projection.ProductionPlant = _Batch.Plant
                                                                                   and $projection.Material        = _Batch.Material
                                                                                   and $projection.Batch           = _Batch.Batch
  association [0..1] to I_InventorySpecialStockType  as _InventorySpecialStockType on  $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
  association [0..1] to I_InventoryValuationType     as _InventoryValuationType    on  $projection.InventoryValuationType = _InventoryValuationType.InventoryValuationType
  association [0..1] to I_InvtrySpecialStockValnType as _InventorySpecialStockValnType on $projection.InventorySpecialStockValnType = _InventorySpecialStockValnType.InventorySpecialStockValnType
  association [0..1] to I_StockType_2                as _InventoryUsabilityCode    on  $projection.InventoryUsabilityCode = _InventoryUsabilityCode.StockType
  association [0..1] to I_SerialNumberProfile        as _SerialNumberProfile       on  $projection.SerialNumberAssgmtProfile = _SerialNumberProfile.SerialNumberProfile
  association [0..1] to I_SalesOrder                 as _SalesOrder                on  $projection.SalesOrder = _SalesOrder.SalesOrder
  association [0..1] to I_SalesOrderItem             as _SalesOrderItem            on  $projection.SalesOrder     = _SalesOrderItem.SalesOrder
                                                                                   and $projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem
  association [0..1] to I_SalesOrderScheduleLine     as _SalesOrderScheduleLine    on  $projection.SalesOrder             = _SalesOrderScheduleLine.SalesOrder
                                                                                   and $projection.SalesOrderItem         = _SalesOrderScheduleLine.SalesOrderItem
                                                                                   and $projection.SalesOrderScheduleLine = _SalesOrderScheduleLine.ScheduleLine
  association [0..1] to I_WBSElementByInternalKey    as _WBSElement                on  $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
  association [0..1] to I_WBSElementBasicData        as _WBSElementBasicData       on  $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
  association [0..1] to I_WBSElementBasicData        as _WBSElementBasicData2      on  $projection.WBSElementInternalID_2 = _WBSElementBasicData2.WBSElementInternalID
  association [0..1] to I_PurgQuotaArrgmt            as _QuotaArrangement          on  $projection.QuotaArrangement = _QuotaArrangement.QuotaArrangement
  association [0..1] to I_PurgQuotaArrgmtItem        as _QuotaArrangementItem      on  $projection.QuotaArrangement     = _QuotaArrangementItem.QuotaArrangement
                                                                                   and $projection.QuotaArrangementItem = _QuotaArrangementItem.QuotaArrangementItem
  association [0..1] to I_ReservationDocumentHeader  as _SettlementReservation     on  $projection.SettlementReservation = _SettlementReservation.Reservation
  association [0..1] to I_ReservationDocumentItem    as _SettlementReservationItem on  $projection.SettlementReservation     = _SettlementReservationItem.Reservation
                                                                                   and $projection.SettlementReservationItem = _SettlementReservationItem.ReservationItem
                                                                                   and _SettlementReservationItem.RecordType = ''
  association [0..1] to I_ReservationDocumentHeader  as _CoProductReservation      on  $projection.CoProductReservation = _CoProductReservation.Reservation
  association [0..1] to I_ReservationDocumentItem    as _CoProductReservationItem  on  $projection.CoProductReservation     = _CoProductReservationItem.Reservation
                                                                                   and $projection.CoProductReservationItem = _CoProductReservationItem.ReservationItem
                                                                                   and _CoProductReservationItem.RecordType = ''
  association [0..1] to I_MatlProcurementCategory    as _MatlProcurementCategory   on  $projection.MaterialProcurementCategory = _MatlProcurementCategory.MaterialProcurementCategory
  association [0..1] to I_MatlProcurementType        as _MatlProcurementType       on  $projection.MaterialProcurementType = _MatlProcurementType.MaterialProcurementType
  association [0..1] to I_BOMExplosionDate           as _BOMExplosionDate          on  $projection.BOMExplosionDateID = _BOMExplosionDate.BOMExplosionDateID
  association [1..1] to I_UnitOfMeasure              as _BaseUnit                  on  $projection.BaseUnit = _BaseUnit.UnitOfMeasure
  association [1..1] to I_UnitOfMeasure              as _ProductionUnit            on  $projection.ProductionUnit = _ProductionUnit.UnitOfMeasure
  association [0..1] to I_BusinessArea               as _BusinessArea              on  $projection.BusinessArea = _BusinessArea.BusinessArea
  association [0..1] to I_ConsumptionPosting         as _ConsumptionPosting        on  $projection.ConsumptionPosting = _ConsumptionPosting.ConsumptionPosting
  association [0..1] to I_AccountAssignmentCategory  as _AccountAssignmentCategory on  $projection.AccountAssignmentCategory = _AccountAssignmentCategory.AccountAssignmentCategory
  association [0..1] to I_Indicator                  as _DeliveryCompletedIndicator on $projection.IsCompletelyDelivered = _DeliveryCompletedIndicator.IndicatorValue
{
      // Key

      @ObjectModel.foreignKey.association: '_Order'
  key afpo.aufnr                                                    as OrderID,
  key cast(afpo.posnr as pph_posnr preserving type)                 as OrderItem,

      // Category and Type

      @ObjectModel.foreignKey.association: '_OrderCategory'
      cast(afpo.dauty as pph_autyp preserving type)                 as OrderCategory,
      @ObjectModel.foreignKey.association: '_OrderType'
      cast(afpo.dauat as aufart preserving type)                    as OrderType,

      // Status

      afpo.xloek                                                    as IsMarkedForDeletion,
      @Semantics.booleanIndicator
      case
        when afpo.dfrei <> '' then 'X'
        else afpo.dfrei
      end                                                           as OrderIsReleased,
      @Semantics.booleanIndicator
      afpo.dnrel                                                    as OrderItemIsNotRelevantForMRP,

      // Assignments

      @ObjectModel.foreignKey.association: '_Material'
      cast(afpo.matnr as co_matnr preserving type)                  as Material,
      @ObjectModel.foreignKey.association: '_ProductionPlant'
      cast(afpo.dwerk as pwwrk preserving type)                     as ProductionPlant,
      @ObjectModel.foreignKey.association: '_MRPPlant'
      afpo.pwerk                                                    as MRPPlant,
      @ObjectModel.foreignKey.association: '_ProductionVersion'
      afpo.verid                                                    as ProductionVersion,
      @ObjectModel.foreignKey.association: '_MRPArea'
      afpo.berid                                                    as MRPArea,
      @ObjectModel.foreignKey.association: '_SalesOrder'
      afpo.kdauf                                                    as SalesOrder,
      @ObjectModel.foreignKey.association: '_SalesOrderItem'
      afpo.kdpos                                                    as SalesOrderItem,
      @ObjectModel.foreignKey.association: '_SalesOrderScheduleLine'
      cast(afpo.kdein as fac_kdein preserving type)                 as SalesOrderScheduleLine,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'WBSElementInternalID_2'
      @ObjectModel.foreignKey.association: '_WBSElement'
      cast(afpo.projn as pph_pspel preserving type)                 as WBSElementInternalID,
      @ObjectModel.foreignKey.association: '_WBSElementBasicData2'
      cast(afpo.projn as ps_s4_pspnr preserving type)               as WBSElementInternalID_2,
--    @ObjectModel.foreignKey.association: '_QuotaArrangement'
      cast(afpo.qunum as pph_qunum preserving type)                 as QuotaArrangement,
--    @ObjectModel.foreignKey.association: '_QuotaArrangementItem'
      cast(afpo.qupos as pph_qupos preserving type)                 as QuotaArrangementItem,
      @ObjectModel.foreignKey.association: '_SettlementReservation'
      cast(afpo.arsnr as pph_arsnr preserving type)                 as SettlementReservation,
      @ObjectModel.foreignKey.association: '_SettlementReservationItem'
      cast(afpo.arsps as pph_arsps preserving type)                 as SettlementReservationItem,
      @ObjectModel.foreignKey.association: '_CoProductReservation'
      cast(afpo.krsnr as pph_krsnr preserving type)                 as CoProductReservation,
      @ObjectModel.foreignKey.association: '_CoProductReservationItem'
      cast(afpo.krsps as pph_krsps preserving type)                 as CoProductReservationItem,
      @ObjectModel.foreignKey.association: '_MatlProcurementCategory'
      cast(afpo.beskz as pph_beskz preserving type)                 as MaterialProcurementCategory,
      @ObjectModel.foreignKey.association: '_MatlProcurementType'
      cast(afpo.psobs as pph_sobes preserving type)                 as MaterialProcurementType,
      @ObjectModel.foreignKey.association: '_BOMExplosionDate'
      cast(afpo.sernr as pph_sernr preserving type)                 as BOMExplosionDateID,
--    @ObjectModel.foreignKey.association: '_SerialNumberProfile'
      cast(afpo.sernp as pph_sernp preserving type)                 as SerialNumberAssgmtProfile,
      cast(afpo.anzsn as pph_anzsn preserving type)                 as NumberOfSerialNumbers,
      afpo.kbnkz                                                    as MfgOrderItemReplnmtElmntType,
      cast(afpo.cuobj as product_configuration preserving type)     as ProductConfiguration,
      cast(afpo.objnp as pph_objnr preserving type)                 as ObjectInternalID,
      afpo.verto                                                    as QuantityDistributionKey,
      cast(case
        when afpo.techs_copy = '' then afpo.techs
        else afpo.techs_copy
      end as vdm_techs preserving type)                             as EffectivityParameterVariant,
      cast(afpo.techs as vdm_techs_orig preserving type )           as OriginalEffctyParameterVariant,

      // Goods Receipt data

      cast(afpo.wepos as pph_wepos preserving type)                 as GoodsReceiptIsExpected,
      cast(afpo.weunb as pph_weunb preserving type)                 as GoodsReceiptIsNonValuated,
      afpo.webaz                                                    as MaterialGoodsReceiptDuration,
      afpo.untto                                                    as UnderdelivTolrtdLmtRatioInPct,
      afpo.uebto                                                    as OverdelivTolrtdLmtRatioInPct,
      afpo.uebtk                                                    as UnlimitedOverdeliveryIsAllowed,
      @ObjectModel.foreignKey.association: '_DeliveryCompletedIndicator'
      afpo.elikz                                                    as IsCompletelyDelivered,
      @ObjectModel.foreignKey.association: '_StorageLocation'
      cast(afpo.lgort as pph_lgort preserving type)                 as StorageLocation,
      @ObjectModel.foreignKey.association: '_Batch'
      afpo.charg                                                    as Batch,
      @ObjectModel.foreignKey.association: '_InventoryValuationType'
      cast(afpo.bwtar as pph_bwtar  preserving type)                as InventoryValuationType,
      cast(afpo.bwtty as bwtty_d preserving type)                   as InventoryValuationCategory,
      @ObjectModel.foreignKey.association: '_InventoryUsabilityCode'
      cast(afpo.insmk as inventoryusabilitycode preserving type)    as InventoryUsabilityCode,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockType'
      cast(afpo.sobkz as inventoryspecialstocktype preserving type) as InventorySpecialStockType,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockValnType'
      cast(afpo.kzbws as pph_kzbws preserving type)                 as InventorySpecialStockValnType,
      @Semantics.text: true
      cast(afpo.wempf as pph_wempf  preserving type)                as GoodsRecipientName,
      @Semantics.text: true
      cast(afpo.ablad as ablad preserving type)                     as UnloadingPointName,
      afpo.sgt_scat                                                 as StockSegment,

      // Order Item Dates

      afpo.dgltp                                                    as PlannedEndDate,
      afpo.dglts                                                    as ScheduledBasicEndDate,
      afpo.ltrmp                                                    as PlannedDeliveryDate,
      afpo.ltrmi                                                    as ActualDeliveryDate,
      afpo.gsbtr                                                    as TotalCommitmentDate,

      // Planned Order data

      @ObjectModel.foreignKey.association: '_PlannedOrder'
      afpo.plnum                                                    as PlannedOrder,
      afpo.strmp                                                    as PlndOrderPlannedStartDate,
      afpo.etrmp                                                    as PlannedOrderOpeningDate,
      @Semantics.unitOfMeasure: true
      afpo.meins                                                    as BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      afpo.pgmng                                                    as OrderPlannedTotalQty,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @Aggregation.default: #SUM
      afpo.pamng                                                    as OrderPlannedScrapQty,

      // Quantities and UoM

      afpo.umrez                                                    as MaterialQtyToBaseQtyNmrtr,
      afpo.umren                                                    as MaterialQtyToBaseQtyDnmntr,
      @Semantics.unitOfMeasure: true
      cast(afpo.amein as productionunit preserving type)            as ProductionUnit,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      afpo.psmng                                                    as ItemQuantity,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      afpo.psamg                                                    as MfgOrderItemPlannedScrapQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      afpo.wemng                                                    as MfgOrderItemGoodsReceiptQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      afpo.iamng                                                    as MfgOrderItemActualDeviationQty,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @Aggregation.default: #SUM
      (afpo.psmng - afpo.psamg - afpo.iamng - afpo.wemng)           as MfgOrderItemOpenYieldQty,

      // Amount and Currency

      cast('   ' as waers)                                          as CompanyCodeCurrency, // dummy currency

      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      @Aggregation.default: #SUM
      cast(afpo.wewrt as vdm_pp_wewrt preserving type)              as GoodsReceiptAmountInCoCodeCrcy,

      // Assignments FI/CO

      @ObjectModel.foreignKey.association: '_BusinessArea'
      afpo.gsber                                                    as BusinessArea,
      afpo.kalnr                                                    as CostEstimate,
      @ObjectModel.foreignKey.association: '_AccountAssignmentCategory'
      cast(afpo.knttp as pph_knttp preserving type)                 as AccountAssignmentCategory,
      @ObjectModel.foreignKey.association: '_ConsumptionPosting'
      afpo.kzvbr                                                    as ConsumptionPosting,

      // Fashion Manufacturing

      afpo.fsh_season_year                                          as ProductSeasonYear,
      afpo.fsh_season                                               as ProductSeason,
      afpo.fsh_collection                                           as ProductCollection,
      afpo.fsh_theme                                                as ProductTheme,

      // Associations

      _Order,
      _OrderCategory,
      _OrderType,
      _ProductionPlant,
      _MRPPlant,
      _MRPArea,
      _PlannedOrder,
      _Material,
      _Product,
      _ProductionVersion,
      _BaseUnit,
      _ProductionUnit,
      _StorageLocation,
      _Batch,
      _InventorySpecialStockType,
      _InventorySpecialStockValnType,
      _InventoryValuationType,
      _InventoryUsabilityCode,
      _SerialNumberProfile,
      _SalesOrder,
      _SalesOrderItem,
      _SalesOrderScheduleLine,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_WBSElementBasicData2'
      _WBSElement,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_WBSElementBasicData2'
      _WBSElementBasicData,
      _WBSElementBasicData2,
      _QuotaArrangement,
      _QuotaArrangementItem,
      _SettlementReservation,
      _SettlementReservationItem,
      _CoProductReservation,
      _CoProductReservationItem,
      _MatlProcurementCategory,
      _MatlProcurementType,
      _BOMExplosionDate,
      _BusinessArea,
      _ConsumptionPosting,
      _AccountAssignmentCategory,
      _DeliveryCompletedIndicator
};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"AFPO"
],
"ASSOCIATED":
[
"I_ACCOUNTASSIGNMENTCATEGORY",
"I_BATCH",
"I_BOMEXPLOSIONDATE",
"I_BUSINESSAREA",
"I_CONSUMPTIONPOSTING",
"I_INDICATOR",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_INVENTORYVALUATIONTYPE",
"I_INVTRYSPECIALSTOCKVALNTYPE",
"I_LOGISTICSORDER",
"I_MATERIAL",
"I_MATLPROCUREMENTCATEGORY",
"I_MATLPROCUREMENTTYPE",
"I_MRPAREA",
"I_ORDERCATEGORY",
"I_ORDERTYPE",
"I_PLANNEDORDER",
"I_PLANT",
"I_PRODUCT",
"I_PRODUCTIONVERSION",
"I_PURGQUOTAARRGMT",
"I_PURGQUOTAARRGMTITEM",
"I_RESERVATIONDOCUMENTHEADER",
"I_RESERVATIONDOCUMENTITEM",
"I_SALESORDER",
"I_SALESORDERITEM",
"I_SALESORDERSCHEDULELINE",
"I_SERIALNUMBERPROFILE",
"I_STOCKTYPE_2",
"I_STORAGELOCATION",
"I_UNITOFMEASURE",
"I_WBSELEMENTBASICDATA",
"I_WBSELEMENTBYINTERNALKEY"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/