I_ORDERBASIC

CDS View

Order Header Basic

I_ORDERBASIC is a CDS View in S/4HANA. Order Header Basic. It contains 77 fields. 24 CDS views read from this table.

CDS Views using this table (24)

ViewTypeJoinVDMDescription
C_IntOrdSettlmtRuleNtwkActyVH view_entity inner CONSUMPTION Internal Order Settlement Rule Network activity
FINOC_RULE_POI_BASE view inner Orgl Change-Rule: Purch. Order Item Base
I_LogisticsOrder view from BASIC Logistics Order
I_ManufacturingOrderLongText view_entity inner COMPOSITE Manufacturing Order - Text
I_ManufacturingOrderStatus view_entity from COMPOSITE Manufacturing Order Status
I_MfgOrderForExtraction view from BASIC Manufacturing Order for Extraction
I_Order view from BASIC Order Header
I_OrderBasicVH view_entity from COMPOSITE Order Header
I_OrderComponent view inner BASIC Order Component
I_OrderConfirmation view inner BASIC Order Confirmation
I_ProductionOrderItem view_entity inner BASIC Production Order Item
I_ProductionOrderLongText view_entity inner COMPOSITE Production Order - Text
I_QualityCostCollector view from COMPOSITE QM Order
P_APIOrderStatus view_entity from COMPOSITE Production Order Status
P_CnsldtnOrder view from COMPOSITE Consolidation Combined Order
P_CnsldtnOrderT view from COMPOSITE Consolidation Combined Order - Text
P_EBRRInternalOrderWlItm view_entity from CONSUMPTION Worklist Rev. Rec. Issues - Int. Orders
P_EventBasedOrderPostingRule view_entity inner COMPOSITE Event-Based Posting Rule
P_MfgOperAORList view_entity inner COMPOSITE Operations matching the assigned AORs
P_MfgOperationsList view_entity inner COMPOSITE Operations matching the assigned AORs
P_MfgOrdAorFinalList view_entity inner COMPOSITE Orders and Operations List For AORs
P_MfgOrderAORList view_entity from COMPOSITE Orders matching the assigned _AORs
P_MfgOrderAORList view_entity inner COMPOSITE Orders matching the assigned _AORs
P_MfgOrderAORList view_entity union COMPOSITE Orders matching the assigned _AORs

Fields (77)

KeyField CDS FieldsUsed in Views
KEY LongTextLanguage LongTextLanguage 4
KEY OrderID ManufacturingOrder,OrderID 4
_BusinessArea _BusinessArea 1
_CompanyCode _CompanyCode 2
_ControllingArea _ControllingArea 1
_ControllingObjectClass _ControllingObjectClass 1
_CostCenter _CostCenter 1
_Currency _Currency 1
_FunctionalArea _FunctionalArea 1
_LongText _LongText 1
_OrderCategory _OrderCategory 2
_OrderHierarchyNode _OrderHierarchyNode 1
_OrderType _OrderType 2
_ProductCostCtrlgOrder _ProductCostCtrlgOrder 1
_ProfitCenter _ProfitCenter 1
_ResponsibleCostCenter _ResponsibleCostCenter 1
BusinessArea BusinessArea 3
CompanyCode CompanyCode 7
ConditionApplication ConditionApplication 2
ControllingArea ControllingArea 5
ControllingObjectClass ControllingObjectClass 1
CostCenter CostCenter 2
CostElement CostElement 2
CostingSheet CostingSheet 1
CreatedByUser CreatedByUser 2
CreationDate CreationDate 2
CreationTime CreationTime 2
Currency CompanyCodeCurrency,Currency 3
EnvironmentalInvestmentReason EnvironmentalInvestmentReason 1
EstimatedTotalOrderCost EstimatedTotalOrderCost 1
EventBasedPostingMethod EventBasedPostingMethod,OrderIsEventBasedPosting 2
EventBasedProcessingKey EventBasedProcessingKey 2
ExternalOrder ExternalOrder 1
FunctionalArea FunctionalArea 2
GLAccount GLAccount 2
InvestmentReason InvestmentReason 1
IsMarkedForDeletion IsMarkedForDeletion 3
IsStatisticalOrder IsStatisticalOrder 2
JointVenture JointVenture 1
JointVentureClass JointVentureClass 1
JointVentureObjectType JointVentureObjectType 1
JointVentureOriginalCostObject JointVentureOriginalCostObject 1
JointVentureSubClass JointVentureSubClass 1
LastChangeDate LastChangeDate 3
LastChangedByUser LastChangedByUser 2
LastChangeTime LastChangeTime 3
LocationPlant LocationPlant 1
MaintenanceObjectLocation MaintenanceObjectLocation 1
MainWorkCenter MainWorkCenter 1
MainWorkCenterPlant MainWorkCenterPlant 1
ObjectInternalID ObjectInternalID,OrderObjectInternalID 4
OrderCategory ManufacturingOrderCategory,OrderCategory 9
OrderDescription ManufacturingOrderText,OrderDescription,ProductionOrderText 4
OrderHasLongText ManufacturingOrderHasLongText,OrderHasLongText 3
OrderHasMultipleItems MfgOrderHasMultipleItems 1
OrderIsRefurbishmentOrder OrderIsRefurbishmentOrder 1
OrderProcessingGroup OrderProcessingGroup 1
OrderSettlementTriggerType OrderSettlementTriggerType 2
OrderType ManufacturingOrderType,OrderType 6
OverheadCode OverheadCode 1
PlannedCompletionDate PlannedCompletionDate 1
Plant Plant 2
ProductCostCollector ProductCostCollector 2
ProfitCenter ProfitCenter 3
ProjInterestCalcProfile ProjInterestCalcProfile 1
ReferenceOrder ReferenceOrder 2
RequestingCompanyCode RequestingCompanyCode 1
RequestingCostCenter RequestingCostCenter 1
ResponsibleCostCenter ResponsibleCostCenter 2
ResultAnalysisInternalID ResultAnalysisInternalID 2
SalesOrder SalesOrder 1
SalesOrderItem SalesOrderItem 1
TaxJurisdiction TaxJurisdiction 1
TechnicalCompletionDate MfgOrderActualCompletionDate,TechnicalCompletionDate 2
VarianceKey VarianceKey 1
WBSElementInternalID WBSElementInternalID 1
WBSElementInternalID_2 WBSElementInternalID_2 1
@AbapCatalog.sqlViewName: 'IORDERBASIC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_CreatedByUser', '_LastChangedByUser', '_LongText']
@Analytics.dataCategory: #DIMENSION
@Analytics.internalName: #LOCAL 
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.representativeKey: 'OrderID'
@ObjectModel.semanticKey: ['OrderID']
@ObjectModel.usageType: {serviceQuality: #A, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Order Header Basic'
// Basic view selecting from order header table AUFK only - without restriction on any category

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

   
/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view I_OrderBasic
  as select from aufk as aufk
    
  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_OrderLongText           as _LongText               on  $projection.OrderID = _LongText.OrderID
  association [1..1] to I_Order                   as _ReferenceOrder         on  $projection.ReferenceOrder= _ReferenceOrder.OrderID
  association [1..1] to I_LogisticsOrderBasic     as _LogisticsOrder         on  $projection.OrderID = _LogisticsOrder.OrderID
  association [0..*] to I_OrderHierarchyNode      as _OrderHierarchyNode     on  $projection.OrderID = _OrderHierarchyNode.OrderID
  association [1..1] to I_User                    as _CreatedByUser          on  $projection.CreatedByUser = _CreatedByUser.UserID
  association [0..1] to I_User                    as _LastChangedByUser      on  $projection.LastChangedByUser = _LastChangedByUser.UserID
  association [0..1] to I_Currency                as _Currency               on  $projection.Currency = _Currency.Currency
  association [0..1] to I_Language                as _LongTextLanguage       on  $projection.LongTextLanguage = _LongTextLanguage.Language
  association [1..1] to I_Plant                   as _Plant                  on  $projection.Plant = _Plant.Plant
  association [0..1] to I_Plant                   as _MainWorkCenterPlant    on  $projection.MainWorkCenterPlant = _MainWorkCenterPlant.Plant
  association [0..1] to I_Plant                   as _LocationPlant          on  $projection.LocationPlant = _LocationPlant.Plant
  association [0..1] to I_WorkCenterBySemanticKey as _MainWorkCenter         on  $projection.MainWorkCenter      = _MainWorkCenter.WorkCenter
                                                                             and $projection.MainWorkCenterPlant = _MainWorkCenter.Plant
  association [0..1] to I_Location                as _MaintenanceObjectLocation  on  $projection.LocationPlant             = _MaintenanceObjectLocation.Plant
                                                                                 and $projection.MaintenanceObjectLocation = _MaintenanceObjectLocation.Location
  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_WBSElementBasicData     as _WBSElementBasicData    on  $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
  association [0..1] to I_WBSElementBasicData     as _WBSElementBasicData2   on  $projection.WBSElementInternalID_2 = _WBSElementBasicData2.WBSElementInternalID
  association [1..1] to I_StatusObject            as _StatusObject           on  $projection.ObjectInternalID = _StatusObject.StatusObject
  association [0..1] to I_CompanyCode             as _CompanyCode            on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [0..1] to I_CompanyCode             as _RequestingCompanyCode  on  $projection.RequestingCompanyCode = _RequestingCompanyCode.CompanyCode
  association [0..1] to I_BusinessArea            as _BusinessArea           on  $projection.BusinessArea = _BusinessArea.BusinessArea
  association [0..*] to I_ProfitCenter            as _ProfitCenter           on  $projection.ControllingArea = _ProfitCenter.ControllingArea
                                                                             and $projection.ProfitCenter    = _ProfitCenter.ProfitCenter
  association [0..*] to I_CostCenter              as _CostCenter             on  $projection.ControllingArea = _CostCenter.ControllingArea
                                                                             and $projection.CostCenter      = _CostCenter.CostCenter
  association [0..*] to I_CostCenter              as _ResponsibleCostCenter  on  $projection.ControllingArea       = _ResponsibleCostCenter.ControllingArea
                                                                             and $projection.ResponsibleCostCenter = _ResponsibleCostCenter.CostCenter
  association [0..*] to I_CostCenter              as _RequestingCostCenter   on  $projection.RequestingCostCenter = _RequestingCostCenter.CostCenter
                                                                             and $projection.ControllingArea      = _RequestingCostCenter.ControllingArea
  association [0..1] to I_ProductCostCtrlgOrder   as _ProductCostCtrlgOrder  on  $projection.ProductCostCollector = _ProductCostCtrlgOrder.OrderID
  association [0..1] to I_GLAccount               as _GLAccount              on  $projection.GLAccount   = _GLAccount.GLAccount
                                                                             and $projection.CompanyCode = _GLAccount.CompanyCode
  association [0..1] to I_CostElement             as _CostElement            on  $projection.ControllingArea = _CostElement.ControllingArea
                                                                             and $projection.CostElement     = _CostElement.CostElement
  association [0..1] to I_ControllingArea         as _ControllingArea        on  $projection.ControllingArea = _ControllingArea.ControllingArea
  association [0..1] to I_ControllingObjectClass  as _ControllingObjectClass on  $projection.ControllingObjectClass = _ControllingObjectClass.ControllingObjectClass
  association [0..1] to I_FunctionalArea          as _FunctionalArea         on  $projection.FunctionalArea = _FunctionalArea.FunctionalArea
  association [0..1] to I_ConditionUsage          as _ConditionUsage         on  $projection.ConditionUsage = _ConditionUsage.ConditionUsage
  association [0..1] to I_ConditionApplication    as _ConditionApplication   on  $projection.ConditionApplication = _ConditionApplication.ConditionApplication
  association [0..1] to I_CostingSheetProcedure   as _CostingSheetProcedure  on  $projection.ConditionUsage       = _CostingSheetProcedure.ConditionUsage
                                                                             and $projection.ConditionApplication = _CostingSheetProcedure.ConditionApplication
                                                                             and $projection.CostingSheet         = _CostingSheetProcedure.CostingSheetProcedure
  association [0..1] to I_OrderProcessingGroup    as _OrderProcessingGroup   on  $projection.ControllingArea = _OrderProcessingGroup.ControllingArea
                                                                             and $projection.OrderProcessingGroup = _OrderProcessingGroup.OrderProcessingGroup   
{
      // Key

      @ObjectModel.text.element: ['OrderDescription']
  key aufk.aufnr                                        as OrderID,

      // Category and Type

      @ObjectModel.foreignKey.association: '_OrderCategory'
      cast(aufk.autyp as pph_autyp preserving type)     as OrderCategory,
      @ObjectModel.foreignKey.association: '_OrderType'
      cast(aufk.auart as aufart    preserving type)     as OrderType,

      // Text

      @Semantics.text: true
      cast(aufk.ktext as pph_auftext preserving type)   as OrderDescription,
      cast(case 
             when aufk.ltext is not initial then 'X'
             else ''
           end as aufltext preserving type)             as OrderHasLongText,
      @ObjectModel.foreignKey.association: '_LongTextLanguage'
      cast(aufk.ltext as pph_longtextlang)              as LongTextLanguage,
      
      // Attributes

      aufk.loekz                                        as IsMarkedForDeletion,
      aufk.astkz                                        as IsStatisticalOrder,
      @Semantics.booleanIndicator 
      aufk.flg_mltps                                    as OrderHasMultipleItems,
      aufk.rsord                                        as OrderIsRefurbishmentOrder,
      cast(aufk.plint as fco_plint preserving type )    as OrdIsUsedInIntegratedPlanning,

      // Admin

      @Semantics.systemDate.createdAt: true
      cast(aufk.erdat   as ordercreationdate preserving type) as CreationDate,
      @Semantics.systemTime.createdAt: true
      cast(aufk.erfzeit as ordercreationtime preserving type) as CreationTime,
      @Semantics.user.createdBy: true
      aufk.ernam                                        as CreatedByUser,
      @Semantics.systemDate.lastChangedAt: true
      aufk.aedat                                        as LastChangeDate,
      @Semantics.systemTime.lastChangedAt: true
      aufk.aezeit                                       as LastChangeTime,
      @Semantics.user.lastChangedBy: true
      aufk.aenam                                        as LastChangedByUser,

      // Assignments

      @ObjectModel.foreignKey.association: '_ReferenceOrder'
      cast(aufk.refnr as fis_aufrefnr preserving type)  as ReferenceOrder,
      @ObjectModel.foreignKey.association: '_Plant'
      aufk.werks                                        as Plant,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WrkCtrBySemanticKeyStdVH', element: 'WorkCenter' } } ]
      @ObjectModel.foreignKey.association: '_MainWorkCenter'
      aufk.vaplz                                        as MainWorkCenter,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlantStdVH', element: 'Plant' } } ]
      @ObjectModel.foreignKey.association: '_MainWorkCenterPlant'
      aufk.wawrk                                        as MainWorkCenterPlant,
      @ObjectModel.foreignKey.association: '_MaintenanceObjectLocation'
      aufk.stort                                        as MaintenanceObjectLocation,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlantStdVH', element: 'Plant' } } ]
      @ObjectModel.foreignKey.association: '_LocationPlant'
      aufk.sowrk                                        as LocationPlant,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderStdVH', element: 'SalesOrder' } } ]
      @ObjectModel.foreignKey.association: '_SalesOrder'
      aufk.kdauf                                        as SalesOrder,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesOrderItemStdVH', element: 'SalesOrderItem' } } ]  
      @ObjectModel.foreignKey.association: '_SalesOrderItem'
      aufk.kdpos                                        as SalesOrderItem,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'WBSElementInternalID_2'
      @ObjectModel.foreignKey.association: '_WBSElementBasicData'
      aufk.pspel                                        as WBSElementInternalID,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WBSElementBasicDataStdVH', element: 'WBSElementInternalID' } } ]  
      @ObjectModel.foreignKey.association: '_WBSElementBasicData2'
      cast(aufk.pspel as ps_s4_pspnr preserving type)   as WBSElementInternalID_2,  // w/o conversion exit

      @ObjectModel.foreignKey.association: '_StatusObject'
      cast(aufk.objnr as pph_objnr preserving type)     as ObjectInternalID,
      aufk.zschm                                        as ProjInterestCalcProfile,
      aufk.aufex                                        as ExternalOrder,
      
      // Assignments FI/CO

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_BusinessAreaStdVH', element: 'BusinessArea' } } ]
      @ObjectModel.foreignKey.association: '_BusinessArea'
      aufk.gsber                                        as BusinessArea,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CompanyCodeStdVH', element: 'CompanyCode' } } ]
      @ObjectModel.foreignKey.association: '_CompanyCode'
      aufk.bukrs                                        as CompanyCode,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CompanyCodeStdVH', element: 'CompanyCode' } } ]
      @ObjectModel.foreignKey.association: '_RequestingCompanyCode'
      aufk.abukr                                        as RequestingCompanyCode,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ControllingAreaStdVH', element: 'ControllingArea' } } ] 
      @ObjectModel.foreignKey.association: '_ControllingArea'
      aufk.kokrs                                        as ControllingArea,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProfitCenterStdVH', element: 'ProfitCenter' } } ]
      aufk.prctr                                        as ProfitCenter,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CostCenterStdVH', element: 'CostCenter' } } ]
      aufk.kostl                                        as CostCenter,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CostCenterStdVH', element: 'CostCenter' } } ]
      aufk.akstl                                        as RequestingCostCenter,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CostCenterStdVH', element: 'CostCenter' } } ]
      cast(aufk.kostv as pph_kostl preserving type)     as ResponsibleCostCenter,
      @ObjectModel.foreignKey.association: '_CostElement'
      cast(aufk.kstar as pph_kstar preserving type)     as CostElement,
      @ObjectModel.foreignKey.association: '_GLAccount'
      aufk.saknr                                        as GLAccount,
      @ObjectModel.foreignKey.association: '_ProductCostCtrlgOrder'      
      aufk.pkosa                                        as ProductCostCollector,
      @ObjectModel.foreignKey.association: '_ConditionUsage'
      aufk.kvewe                                        as ConditionUsage,
      @ObjectModel.foreignKey.association: '_ConditionApplication'
      aufk.kappl                                        as ConditionApplication,
      @ObjectModel.foreignKey.association: '_CostingSheetProcedure'
      aufk.kalsm                                        as CostingSheet,
      @ObjectModel.foreignKey.association: '_ControllingObjectClass'
      cast(aufk.scope as pph_scope preserving type)     as ControllingObjectClass,
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      aufk.func_area                                    as FunctionalArea,
      @ObjectModel.foreignKey.association: '_OrderProcessingGroup'
      cast(aufk.abkrs as fco_aufabkrs preserving type)  as OrderProcessingGroup,
      cast(aufk.zschl as fco_aufzschl preserving type)  as OverheadCode,
      cast(aufk.cycle as fins_st_kostl preserving type) as ActualPostedCostCenter,
      cast(aufk.txjcd as fis_txjcd preserving type)     as TaxJurisdiction,
      cast(aufk.abgsl as fco_abgr_schl preserving type) as ResultAnalysisInternalID,
      aufk.awsls                                        as VarianceKey,
      aufk.eb_post                                      as EventBasedPostingMethod,
      aufk.eb_post_type                                 as OrderSettlementTriggerType,
      aufk.ebw_key                                      as EventBasedProcessingKey,
      aufk.vname                                        as JointVenture,
      aufk.jv_jibcl                                     as JointVentureClass,
      aufk.jv_jibsa                                     as JointVentureSubClass,
      aufk.jv_oco                                       as JointVentureOriginalCostObject,
      aufk.otype                                        as JointVentureObjectType,
      aufk.izwek                                        as InvestmentReason,
      aufk.umwkz                                        as EnvironmentalInvestmentReason,
      
      // Dates

      aufk.pdat1                                        as PlannedReleaseDate,
      aufk.pdat2                                        as PlannedCompletionDate,
      aufk.idat2                                        as TechnicalCompletionDate,

      // Amount and Currency

      @ObjectModel.foreignKey.association: '_Currency'
      @Semantics.currencyCode: true
      aufk.waers                                        as Currency,
      @Aggregation.default: #SUM
      @Semantics.amount.currencyCode: 'Currency'
      aufk.user4                                        as EstimatedTotalOrderCost,

      // Associations

      _OrderCategory,
      _OrderType,
      _ReferenceOrder,
      _LogisticsOrder,
      _OrderHierarchyNode,
      _CreatedByUser,
      _LastChangedByUser,
      _LongText,
      _LongTextLanguage,
      _Currency,
      _Plant,
      _LocationPlant,
      _MainWorkCenter,
      _MainWorkCenterPlant,
      _MaintenanceObjectLocation,
      _SalesOrder,
      _SalesOrderItem,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_WBSElementBasicData2' 
      _WBSElementBasicData,
      _WBSElementBasicData2,
      _StatusObject,
      _CompanyCode,
      _RequestingCompanyCode,
      _BusinessArea,
      _ProfitCenter,
      _CostCenter,
      _RequestingCostCenter,
      _ResponsibleCostCenter,
      _ProductCostCtrlgOrder,
      _CostElement,
      _GLAccount,
      _ControllingArea,
      _ControllingObjectClass,
      _FunctionalArea,
      _ConditionUsage,
      _ConditionApplication,
      _CostingSheetProcedure,
      _OrderProcessingGroup
};