P_APIOrderStatus

DDL: P_APIORDERSTATUS Type: view_entity COMPOSITE

P_APIOrderStatus is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_OrderBasic, I_StatusObjectStatusBasic) and exposes 7 fields with key fields ManufacturingOrder, StatusCode. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_OrderBasic _order from
I_StatusObjectStatusBasic _StatusBasic inner

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_SystemStatusText _SystemStatusText $projection.StatusCode = _SystemStatusText.SystemStatus and _SystemStatusText.Language = $session.system_language
[1..1] I_UserStatusText _UserStatusText $projection.statusprofile = _UserStatusText.StatusProfile and $projection.StatusCode = _UserStatusText.UserStatus and _UserStatusText.Language = $session.system_language

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY ManufacturingOrder I_OrderBasic OrderID Order ID
KEY StatusCode I_StatusObjectStatusBasic StatusCode Statuscode
ManufacturingOrderCategory I_OrderBasic OrderCategory Order Category
StatusProfile
SystemStatusName _SystemStatusText SystemStatusName
SystemStatusShortName _SystemStatusText SystemStatusShortName
_UserStatusText _UserStatusText

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_APIOrderStatus.
-- 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.

CREATE VIEW P_APIOrderStatus AS
SELECT
  _order.OrderID AS ManufacturingOrder,
  _StatusBasic.StatusCode AS StatusCode,
  _order.OrderCategory AS ManufacturingOrderCategory,
  _order._StatusObject.StatusProfile AS StatusProfile,
  _SystemStatusText.SystemStatusName AS SystemStatusName,
  _SystemStatusText.SystemStatusShortName AS SystemStatusShortName
FROM I_OrderBasic AS _order
INNER JOIN I_StatusObjectStatusBasic AS _StatusBasic ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SystemStatusText AS _SystemStatusText ON StatusCode = _SystemStatusText.SystemStatus AND _SystemStatusText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_UserStatusText AS _UserStatusText ON statusprofile = _UserStatusText.StatusProfile AND StatusCode = _UserStatusText.UserStatus AND _UserStatusText.Language = $session.system_language  -- association [1..1]
;