P_EventBasedOrder

DDL: P_EVENTBASEDORDER SQL: PFIEBORD Type: view BASIC Package: FINS_PCC_RTPC

Event-based Order

P_EventBasedOrder is a Basic CDS View that provides data about "Event-based Order" in SAP S/4HANA. It reads from 1 data source (aufk) and exposes 19 fields with key field OrderID. Part of development package FINS_PCC_RTPC.

Data Sources (1)

SourceAliasJoin Type
aufk aufk from

Parameters (1)

NameTypeDefault
P_ToFiscalYearPeriod fins_fyearperiod

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PFIEBORD view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #BASIC view
VDM.private true view
ObjectModel.representativeKey OrderID view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY OrderID aufk aufnr SettlementOrder
OrderDescription
ControllingObject aufk objnr Val. Obj. No.
OrderType aufk auart Sales Doc. Type
OrderCategory aufk autyp Order category
ControllingArea aufk kokrs Org. Value
CompanyCode aufk bukrs Value
Material afpo matnr Vehicle Model
Plant aufk werks Receiving Plant
ProfitCenter aufk prctr Profit Centers
ResultsAnalysisKey aufk abgsl Results analysis key
ProductionUnit afpo amein Order Un
DeliveryDate afpo ltrmi Delivery Date
TechCompDate aufk idat2 Tech.Completion
StatusCodeelseI0002endasStatusCode
LogNumber LogNumber UUID
LogHandle LogHandle LogsHandle
LogMessageText LogMessageText
Severity Severity Thresh.Val. Severity

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_EventBasedOrder.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PFIEBORD
-- Parameters: P_ToFiscalYearPeriod : fins_fyearperiod

CREATE VIEW P_EventBasedOrder AS
SELECT
  aufk.aufnr AS OrderID,
  cast(aufk.ktext as fis_order_text) AS OrderDescription,
  aufk.objnr AS ControllingObject,
  aufk.auart AS OrderType,
  aufk.autyp AS OrderCategory,
  aufk.kokrs AS ControllingArea,
  aufk.bukrs AS CompanyCode,
  afpo.matnr AS Material,
  aufk.werks AS Plant,
  aufk.prctr AS ProfitCenter,
  aufk.abgsl AS ResultsAnalysisKey,
  afpo.amein AS ProductionUnit,
  afpo.ltrmi AS DeliveryDate,
  aufk.idat2 AS TechCompDate,
  max( case when _ObjectStatus.StatusCode = 'I0012' and afpo.ltrmi <= _PeriodForCC.FiscalPeriodEndDate then _ObjectStatus.StatusCode when _ObjectStatus.StatusCode = 'I0045' and aufk.idat2 <= _PeriodForCC.FiscalPeriodEndDate then _ObjectStatus.StatusCode else 'I0002' end ) as StatusCode AS StatusCodeelseI0002endasStatusCode,
  LogNumber,
  LogHandle,
  LogMessageText,
  Severity
FROM aufk
;