P_EventBasedOrder
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)
| Source | Alias | Join Type |
|---|---|---|
| aufk | aufk | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_ToFiscalYearPeriod | fins_fyearperiod |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA