I_OrderComponentBasic

DDL: I_ORDERCOMPONENTBASIC Type: view_entity BASIC

Order Component Basic

I_OrderComponentBasic is a Basic CDS View that provides data about "Order Component Basic" in SAP S/4HANA. It reads from 1 data source (I_ReservationItem) and exposes 146 fields with key fields Reservation, ReservationItem, RecordType. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ReservationItem resb from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_OrderBasic _OrderBasic resb.aufnr = _OrderBasic.OrderID
[1..1] I_LogisticsOrder _LogisticsOrder $projection.OrderID = _LogisticsOrder.OrderID

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Order Component Basic view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #BASIC view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (146)

KeyFieldSource TableSource FieldDescription
KEY Reservation I_ReservationItem rsnum
KEY ReservationItem
KEY RecordType
MaterialGroup I_ReservationItem matkl
Material I_ReservationItem matnr
Plant I_ReservationItem werks
OrderID I_ReservationItem aufnr
OrderItem I_ReservationItem afpos
Sequence I_ReservationItem plnfl
SequenceCategory
OrderOperation
OrderSuboperation
OrderInternalID
OrderOperationInternalID
MatlCompRequirementDate
MatlCompRequirementTime
LatestRequirementDate
ReservationItemCreationCode
ReservationIsFinallyIssued I_ReservationItem kzear
MatlCompIsMarkedForDeletion
MaterialComponentIsMissing I_ReservationItem xfehl
IsBulkMaterialComponent I_ReservationItem schgt
MatlCompIsMarkedForBackflush I_ReservationItem rgekz
MaterialIsCoProduct I_ReservationItem kzkup
MatlCompIsTextItem I_ReservationItem txtps
MaterialPlanningRelevance
MatlCompIsConfigurable I_ReservationItem kfpos
MaterialComponentIsClassified I_ReservationItem clakz
MaterialCompIsIntraMaterial I_ReservationItem inpos
ReservationItemText
MaterialComponentText I_ReservationItem potx1
MaterialComponentSecondText I_ReservationItem potx2
LongTextLanguage
RequirementType
SalesOrder
SalesOrderItem
WBSElementInternalID
ProductConfiguration I_ReservationItem cuobj
ChangeNumber I_ReservationItem aennr
MaterialRevisionLevel
EffectivityParameterVariant I_ReservationItem techs
MaterialComponentSortText I_ReservationItem sortf
ObjectInternalID I_ReservationItem objnr
BillOfMaterialCategory
BillOfMaterialInternalID
BillOfMaterialVariant I_ReservationItem stlal
BOMItem
BillOfMaterialVersion I_ReservationItem bom_versn
BOMItemInternalChangeCount I_ReservationItem stpoz
InheritedBOMItemNode I_ReservationItem stvkn
BOMItemCategory
BillOfMaterialItemNumber
BOMItemDescription I_ReservationItem potx1
BOMItemText2 I_ReservationItem potx2
BOMExplosionDateID
PurchasingInfoRecord
PurchasingGroup
PurchaseRequisition
PurchaseRequisitionItem
PurchaseOrder
PurchaseOrderItem
PurchaseOrderScheduleLine
Supplier I_ReservationItem lifnr
DeliveryDurationInDays
MaterialGoodsReceiptDuration
NumberOfPriceUnits
GoodsMovementIsAllowed I_ReservationItem xwaok
StorageLocation
DebitCreditCode
GoodsMovementType I_ReservationItem bwart
InventorySpecialStockType
InventorySpecialStockValnType
ConsumptionPosting
SupplyArea
GoodsRecipientName
UnloadingPointName I_ReservationItem ablad
StockSegment I_ReservationItem sgt_scat
RequirementSegment I_ReservationItem sgt_rcat
Batch I_ReservationItem charg
BatchSplitType I_ReservationItem splkz
BatchClassification I_ReservationItem chobj
MaterialStaging I_ReservationItem berkz
Warehouse I_ReservationItem lgnum
StorageType I_ReservationItem lgtyp
StorageBin I_ReservationItem lgpla
MaterialCompCostingRelevancy I_ReservationItem sanka
BusinessArea I_ReservationItem gsber
GLAccount I_ReservationItem saknr
FunctionalArea I_ReservationItem fkber
AccountAssignmentCategory
EarmarkedFundsDocument I_ReservationItem kblnr
EarmarkedFundsDocumentItem I_ReservationItem kblpos
FundsCenter
Fund I_ReservationItem geber
CommitmentItem I_ReservationItem fipex
CommitmentItemShortID
MaterialCompIsVariableSized I_ReservationItem rohps
VariableSizeItemQuantity
VariableSizeComponentQuantity
romeiasVariableSizeDimensionUnit
VariableSizeDimension1 I_ReservationItem roms1
VariableSizeDimension2 I_ReservationItem roms2
VariableSizeDimension3 I_ReservationItem roms3
VariableSizeCompFormulaKey I_ReservationItem rform
MaterialCompIsAlternativeItem I_ReservationItem alpos
AlternativeItemGroup
AlternativeItemStrategy
AlternativeItemPriority
UsageProbabilityPercent I_ReservationItem ewahr
MaterialComponentIsPhantomItem
OrderPathValue I_ReservationItem aufwg
OrderLevelValue I_ReservationItem aufst
Assembly I_ReservationItem baugr
AssemblyOrderPathValue I_ReservationItem bauwg
AssemblyOrderLevelValue I_ReservationItem baust
DiscontinuationGroup
MatlCompDiscontinuationType I_ReservationItem kzaus
MatlCompIsFollowUpMaterial
FollowUpGroup
FollowUpMaterial
FollowUpMaterialIsActive
MaterialProvisionType
MatlComponentSparePartType
LeadTimeOffset
OperationLeadTimeOffsetUnit
OperationLeadTimeOffset
CriticalComponentType I_ReservationItem fsh_critical_comp
CriticalComponentLevel I_ReservationItem fsh_critical_level
QuantityIsFixed I_ReservationItem fmeng
IsNetScrap I_ReservationItem netau
ComponentScrapInPercent I_ReservationItem ausch
OperationScrapInPercent I_ReservationItem avoau
MaterialQtyToBaseQtyNmrtr I_ReservationItem umrez
MaterialQtyToBaseQtyDnmntr I_ReservationItem umren
meinsasBaseUnit
RequiredQuantity I_ReservationItem bdmng
WithdrawnQuantity
ConfirmedAvailableQuantity
MaterialCompOriginalQuantity
MaterialComponentUsageQuantity I_ReservationItem esmng
erfmeasEntryUnit
GoodsMovementEntryQty
Currency I_ReservationItem waers
WithdrawnQuantityAmount I_ReservationItem enwrt
_OrderBasic _OrderBasic
_LogisticsOrder _LogisticsOrder
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Order Component Basic'
@Metadata.ignorePropagatedAnnotations: true
@VDM.viewType: #BASIC
@ObjectModel.usageType:{
  serviceQuality: #A,
  sizeCategory: #XL,
  dataClass: #TRANSACTIONAL
}
define view entity I_OrderComponentBasic
  --as select from I_ReservationItem as resb  //currently many fields missing

  as select from           resb  as resb
    left outer to one join tcs03 as tcs03 on tcs03.agb29 = '29'

  association [0..1] to I_OrderBasic     as _OrderBasic     on resb.aufnr = _OrderBasic.OrderID
  association [1..1] to I_LogisticsOrder as _LogisticsOrder on $projection.OrderID = _LogisticsOrder.OrderID
{
      // Key

  key resb.rsnum                                                    as Reservation,
  key cast(resb.rspos as pph_rspos preserving type)                 as ReservationItem,
  key cast(resb.rsart as pph_rsart preserving type)                 as RecordType,

      //Material data

      resb.matkl                                                    as MaterialGroup,
      resb.matnr                                                    as Material,
      resb.werks                                                    as Plant,

      @ObjectModel.foreignKey.association: '_OrderBasic'
      resb.aufnr                                                    as OrderID,
      resb.afpos                                                    as OrderItem,
      resb.plnfl                                                    as Sequence,
      cast(resb.flgat as folgenart preserving type)                 as SequenceCategory,
      cast(resb.vornr as vdm_vornr preserving type)                 as OrderOperation,
      cast(resb.uvorn as vdm_uvorn preserving type)                 as OrderSuboperation, // EAM only

      cast(resb.aufpl as pph_aufpl preserving type)                 as OrderInternalID,
      cast(resb.aplzl as operationinternalid preserving type)       as OrderOperationInternalID,

      // Date and Time

      @Semantics.businessDate.at: true
      cast(resb.bdter as pph_bdter preserving type)                 as MatlCompRequirementDate,
      cast(resb.bdztp as pph_bdztp preserving type)                 as MatlCompRequirementTime,
      cast(resb.sbter as pph_sbter preserving type)                 as LatestRequirementDate,

      // Attributes

      cast(resb.rssta as pph_rssta preserving type)                 as ReservationItemCreationCode,
      resb.kzear                                                    as ReservationIsFinallyIssued,
      cast(resb.xloek as sa_loekz preserving type)                  as MatlCompIsMarkedForDeletion,
      resb.xfehl                                                    as MaterialComponentIsMissing,
      resb.schgt                                                    as IsBulkMaterialComponent,
      resb.rgekz                                                    as MatlCompIsMarkedForBackflush,
      resb.kzkup                                                    as MaterialIsCoProduct,
      resb.txtps                                                    as MatlCompIsTextItem,
      cast(resb.no_disp as vdm_no_disp preserving type)             as MaterialPlanningRelevance,
      resb.kfpos                                                    as MatlCompIsConfigurable,
      resb.clakz                                                    as MaterialComponentIsClassified,
      resb.inpos                                                    as MaterialCompIsIntraMaterial,

      // Text

      @Semantics.text: true
      cast(resb.sgtxt as pph_sgtxt preserving type)                 as ReservationItemText,
      @Semantics.text: true
      resb.potx1                                                    as MaterialComponentText,
      @Semantics.text: true
      resb.potx2                                                    as MaterialComponentSecondText,
      cast(resb.ltxsp as pph_longtextlang preserving type)          as LongTextLanguage,

      // Assignments

      cast(resb.bdart as pph_bdart preserving type)                 as RequirementType,
      cast(resb.kdauf as co_kdauf preserving type)                  as SalesOrder,
      cast(resb.kdpos as co_kdpos preserving type)                  as SalesOrderItem,
      cast(resb.pspel as ps_s4_pspnr preserving type)               as WBSElementInternalID,
      resb.cuobj                                                    as ProductConfiguration,
      resb.aennr                                                    as ChangeNumber,
      cast(resb.revlv as vdm_qm_revlv preserving type)              as MaterialRevisionLevel,
      resb.techs                                                    as EffectivityParameterVariant,
      resb.sortf                                                    as MaterialComponentSortText,
      resb.objnr                                                    as ObjectInternalID,

      // Assignments BOM

      cast(resb.stlty as pph_stlty preserving type)                 as BillOfMaterialCategory,
      cast(resb.stlnr as pph_stnum preserving type)                 as BillOfMaterialInternalID,
      resb.stlal                                                    as BillOfMaterialVariant,
      cast(resb.stlkn as pph_stlkn preserving type)                 as BOMItem,
      resb.bom_versn                                                as BillOfMaterialVersion,
      resb.stpoz                                                    as BOMItemInternalChangeCount,
      resb.stvkn                                                    as InheritedBOMItemNode,
      cast(resb.postp as pph_postp preserving type)                 as BOMItemCategory,
      cast(resb.posnr as vdm_sposn preserving type)                 as BillOfMaterialItemNumber,
      @Semantics.text: true
      resb.potx1                                                    as BOMItemDescription,
      @Semantics.text: true
      resb.potx2                                                    as BOMItemText2,
      cast(resb.sernr as pph_sernr  preserving type)                as BOMExplosionDateID,

      // Assignments Purchasing

      cast(resb.infnr as pph_infnr preserving type)                 as PurchasingInfoRecord,
      cast(resb.ekgrp as pph_ekgrp preserving type)                 as PurchasingGroup,
      cast(resb.banfn as co_banfn  preserving type)                 as PurchaseRequisition,
      cast(resb.bnfpo as co_bnfpo  preserving type)                 as PurchaseRequisitionItem,
      cast(resb.ebeln as vdm_purchaseorder     preserving type)     as PurchaseOrder,
      cast(resb.ebelp as vdm_purchaseorderitem preserving type)     as PurchaseOrderItem,
      cast(resb.ebele as fis_etenr preserving type)                 as PurchaseOrderScheduleLine,
      resb.lifnr                                                    as Supplier,
      cast(resb.lifzt as pph_lifzt preserving type)                 as DeliveryDurationInDays,
      cast(resb.webaz as pph_webaz preserving type)                 as MaterialGoodsReceiptDuration,
      -- Price
      @Semantics.amount.currencyCode: 'Currency'
      cast(resb.gpreis as kblpreis  preserving type)                as ExternalProcessingPrice,
      cast(resb.peinh  as pph_peinh preserving type)                as NumberOfPriceUnits,

      // Goods Movement data

      resb.xwaok                                                    as GoodsMovementIsAllowed,
      cast(resb.lgort as pph_lgort preserving type)                 as StorageLocation,
      cast(resb.shkzg as pph_shkzg preserving type)                 as DebitCreditCode,
      resb.bwart                                                    as GoodsMovementType,
      cast(resb.sobkz as inventoryspecialstocktype preserving type) as InventorySpecialStockType,
      cast(resb.kzbws as pph_kzbws preserving type)                 as InventorySpecialStockValnType,
      cast(resb.kzvbr as pph_kzvbr preserving type)                 as ConsumptionPosting,
      cast(resb.prvbe as pph_prvbe preserving type)                 as SupplyArea,
      @Semantics.text: true
      cast(resb.wempf as pph_wempf  preserving type)                as GoodsRecipientName,
      @Semantics.text: true
      resb.ablad                                                    as UnloadingPointName,
      resb.sgt_scat                                                 as StockSegment,
      resb.sgt_rcat                                                 as RequirementSegment,

      // Batch data

      resb.charg                                                    as Batch,
      --    @ObjectModel.foreignKey.association: '_BatchEntryDetermination'
      cast(resb.kzech as vdm_pp_kzech preserving type)              as BatchEntryDeterminationCode,
      resb.splkz                                                    as BatchSplitType,
      cast(case resb.splkz
        when '' then '0000'
        else resb.splrv
      end as vdm_splrv preserving type)                             as BatchMasterReservationItem,
      resb.chobj                                                    as BatchClassification,

      // Assignments WM

      resb.berkz                                                    as MaterialStaging,
      resb.lgnum                                                    as Warehouse,
      resb.lgtyp                                                    as StorageType,
      resb.lgpla                                                    as StorageBin,

      // Assignments FI/CO

      resb.sanka                                                    as MaterialCompCostingRelevancy,
      resb.gsber                                                    as BusinessArea,
      resb.saknr                                                    as GLAccount,
      resb.fkber                                                    as FunctionalArea,
      cast(resb.knttp as pph_knttp preserving type)                 as AccountAssignmentCategory,
      resb.kblnr                                                    as EarmarkedFundsDocument,
      resb.kblpos                                                   as EarmarkedFundsDocumentItem,
      cast(resb.fistl as bbpfistl preserving type)                  as FundsCenter,
      resb.geber                                                    as Fund,
      resb.fipex                                                    as CommitmentItem,
      cast(resb.fipos as fmis_ci_internalname preserving type)      as CommitmentItemShortID,

      // Variable-size comp. data

      resb.rohps                                                    as MaterialCompIsVariableSized,
      cast(case
             when resb.rohps = 'X' then tcs03.roame
             else resb.rohps
      end as vdm_roame)                                             as VariableSizeItemUnit,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeItemUnit'
      cast(resb.roanz as pph_roanz preserving type)                 as VariableSizeItemQuantity,
      -- Component quantity (ROKME and ROMEN)
      cast(resb.rokme as pph_rokme preserving type)                 as VariableSizeComponentUnit,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeComponentUnit'
      cast(resb.romen as pph_romen preserving type)                 as VariableSizeComponentQuantity,
      -- Dimensions (ROMEI and ROMSn)
      resb.romei                                                    as VariableSizeDimensionUnit,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
      resb.roms1                                                    as VariableSizeDimension1,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
      resb.roms2                                                    as VariableSizeDimension2,
      @Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
      resb.roms3                                                    as VariableSizeDimension3,
      resb.rform                                                    as VariableSizeCompFormulaKey,

      // Alternative item data

      resb.alpos                                                    as MaterialCompIsAlternativeItem,
      cast(resb.alpgr as pph_alpgr preserving type)                 as AlternativeItemGroup,
      cast(resb.alpst as pph_alpst preserving type)                 as AlternativeItemStrategy,
      cast(resb.alprf as pph_alprf preserving type)                 as AlternativeItemPriority,
      resb.ewahr                                                    as UsageProbabilityPercent,
      cast(case resb.alpos
        when 'X' then resb.splrv
        else '0000'
      end as vdm_splrv_alt preserving type)                         as AlternativeMstrReservationItem,

      // Phantom assembly

      cast(resb.dumps as pph_dumps preserving type)                 as MaterialComponentIsPhantomItem,
      resb.aufwg                                                    as OrderPathValue,
      resb.aufst                                                    as OrderLevelValue,
      resb.baugr                                                    as Assembly,
      resb.bauwg                                                    as AssemblyOrderPathValue,
      resb.baust                                                    as AssemblyOrderLevelValue,

      // Discontinuation

      cast(resb.nfeag as pph_nfeag preserving type)                 as DiscontinuationGroup,
      resb.kzaus                                                    as MatlCompDiscontinuationType,
      cast(resb.nfpkz as pph_kznfp preserving type)                 as MatlCompIsFollowUpMaterial,
      cast(resb.nfgrp as pph_nfgrp preserving type)                 as FollowUpGroup,
      cast(resb.nomat as pph_nomat preserving type)                 as FollowUpMaterial,
      cast(resb.nafkz as pph_nafkz preserving type)                 as FollowUpMaterialIsActive,
      cast(case resb.kzaus
        when '5' then resb.splrv
        else '0000'
      end as vdm_splrv_dis preserving type)                         as DiscontinuationMasterResvnItem,

      // Material provision

      @Semantics.booleanIndicator: true
      cast(case
             when resb.beikz <> '' then 'X'
             else resb.beikz
      end as beikz preserving type)                                 as IsMaterialProvision,
      cast(resb.beikz as vdm_beikz preserving type)                 as MaterialProvisionType,

      // Spare part

      @Semantics.booleanIndicator
      cast(case
             when resb.erskz <> '' then 'X'
             else resb.erskz
      end as erskz preserving type)                                 as MaterialComponentIsSparePart,
      cast(resb.erskz as vdm_erskz preserving type)                 as MatlComponentSparePartType,

      // Lead-Time offset

      cast(resb.nlfzt as pph_nlfzt preserving type)                 as LeadTimeOffset,
      cast(resb.nlfmv as pph_nlfmv preserving type)                 as OperationLeadTimeOffsetUnit,
      cast(resb.nlfzv as pph_nlfzv preserving type)                 as OperationLeadTimeOffset,

      // Fashion Manufacturing Fields

      resb.fsh_critical_comp                                        as CriticalComponentType,
      resb.fsh_critical_level                                       as CriticalComponentLevel,

      // Quantities and UoM

      resb.fmeng                                                    as QuantityIsFixed,
      resb.netau                                                    as IsNetScrap,
      resb.ausch                                                    as ComponentScrapInPercent,
      resb.avoau                                                    as OperationScrapInPercent,
      resb.umrez                                                    as MaterialQtyToBaseQtyNmrtr,
      resb.umren                                                    as MaterialQtyToBaseQtyDnmntr,
      -- Base unit
      resb.meins                                                    as BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      resb.bdmng                                                    as RequiredQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      cast(resb.enmng as pph_enmng preserving type)                 as WithdrawnQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      cast(resb.vmeng as pph_vmeng preserving type)                 as ConfirmedAvailableQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      cast(resb.nomng as pph_nomng preserving type)                 as MaterialCompOriginalQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      resb.esmng                                                    as MaterialComponentUsageQuantity,
      -- Entry unit
      resb.erfme                                                    as EntryUnit,
      @Semantics.quantity.unitOfMeasure: 'EntryUnit'
      cast(resb.erfmg as pph_erfmg preserving type)                 as GoodsMovementEntryQty,

      // Amount and Currency

      resb.waers                                                    as Currency,
      @Semantics.amount.currencyCode: 'Currency'
      resb.enwrt                                                    as WithdrawnQuantityAmount,

      // Associations

      _OrderBasic,
      _LogisticsOrder
};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"RESB",
"TCS03"
],
"ASSOCIATED":
[
"I_LOGISTICSORDER",
"I_ORDERBASIC"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/