P_InternalOrderSystemStatus

DDL: P_INTERNALORDERSYSTEMSTATUS Type: view_entity COMPOSITE Package: ODATA_INTERNAL_ORDERS_V2

Internal order system status

P_InternalOrderSystemStatus is a Composite CDS View that provides data about "Internal order system status" in SAP S/4HANA. It reads from 3 data sources (I_InternalOrder, I_InternalOrderSystemStatus, I_SystemStatus) and exposes 7 fields with key fields InternalOrder, SystemStatus. It has 2 associations to related views. Part of development package ODATA_INTERNAL_ORDERS_V2.

Data Sources (3)

SourceAliasJoin Type
I_InternalOrder _InternalOrder inner
I_InternalOrderSystemStatus _InternalOrderSystemStatus cross
I_SystemStatus _SystemStatus from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_StatusObjectStatusChange _StatusObjectStatusChange _StatusObjectStatusChange.StatusObject = _InternalOrder.ControllingObject and _StatusObjectStatusChange.StatusCode = _SystemStatus.SystemStatus and _StatusObjectStatusChange.StatusObjectStatusChangeNumber = _InternalOrderSystemStatus.StatusObjectStatusChangeNumber
[0..1] I_UserContactCard _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.ContactCardID

Annotations (3)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY InternalOrder I_InternalOrder InternalOrder Order
KEY SystemStatus I_SystemStatus SystemStatus System status
SystemStatusShortName
SystemStatusName
StatusIsInactive I_InternalOrderSystemStatus StatusIsInactive TRUE
ControllingObject I_InternalOrder ControllingObject Object number
_LastChangedByUser _LastChangedByUser

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_InternalOrderSystemStatus.
-- 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_InternalOrderSystemStatus AS
SELECT
  _InternalOrder.InternalOrder AS InternalOrder,
  _SystemStatus.SystemStatus AS SystemStatus,
  _SystemStatus._SystemStatusText[ 1: Language = $session.system_language ].SystemStatusShortName AS SystemStatusShortName,
  _SystemStatus._SystemStatusText[ 1: Language = $session.system_language ].SystemStatusName AS SystemStatusName,
  _InternalOrderSystemStatus.StatusIsInactive AS StatusIsInactive,
  _InternalOrder.ControllingObject AS ControllingObject
FROM I_SystemStatus AS _SystemStatus
CROSS JOIN I_InternalOrderSystemStatus AS _InternalOrderSystemStatus
INNER JOIN I_InternalOrder AS _InternalOrder ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_StatusObjectStatusChange AS _StatusObjectStatusChange ON _StatusObjectStatusChange.StatusObject = _InternalOrder.ControllingObject AND _StatusObjectStatusChange.StatusCode = _SystemStatus.SystemStatus AND _StatusObjectStatusChange.StatusObjectStatusChangeNumber = _InternalOrderSystemStatus.StatusObjectStatusChangeNumber  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.ContactCardID  -- association [0..1]
;