P_INTERNALORDERSYSTEMSTATUS
P_INTERNALORDERSYSTEMSTATUS is a CDS View in S/4HANA. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| R_InternalOrderSystemStatusTP | view_entity | from | TRANSACTIONAL | Internal order system status |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: {
viewType: #COMPOSITE,
private: true
}
define view entity P_InternalOrderSystemStatus
as select from I_SystemStatus as _SystemStatus
cross join I_InternalOrderSystemStatus as _InternalOrderSystemStatus
inner join I_InternalOrder as _InternalOrder on _InternalOrder.ControllingObject = _InternalOrderSystemStatus.ControllingObject
association [0..1] to I_StatusObjectStatusChange as _StatusObjectStatusChange on _StatusObjectStatusChange.StatusObject = _InternalOrder.ControllingObject
and _StatusObjectStatusChange.StatusCode = _SystemStatus.SystemStatus
and _StatusObjectStatusChange.StatusObjectStatusChangeNumber = _InternalOrderSystemStatus.StatusObjectStatusChangeNumber
association [0..1] to I_UserContactCard as _LastChangedByUser on $projection.LastChangedByUser = _LastChangedByUser.ContactCardID
{
key _InternalOrder.InternalOrder,
key _SystemStatus.SystemStatus,
_SystemStatus._SystemStatusText[ 1: Language = $session.system_language ].SystemStatusShortName,
_SystemStatus._SystemStatusText[ 1: Language = $session.system_language ].SystemStatusName,
_InternalOrderSystemStatus.StatusIsInactive,
_InternalOrder.ControllingObject,
case _InternalOrder._SystemStatus.ControllingObjectStatus
when _SystemStatus.SystemStatus
then cast( '3' as fin_io_status_criticality preserving type )
else cast( '0' as fin_io_status_criticality preserving type )
end as IntOrdSystemStatusCriticality,
case _SystemStatus.SystemStatus
when 'I0001'
then cast ( '00000000' as fin_io_status_planned_date )
when 'I0002'
then cast ( _InternalOrder.IntOrderPlannedReleaseDate as fin_io_status_planned_date )
when 'I0045'
then cast ( _InternalOrder.IntOrderPlannedCompletionDate as fin_io_status_planned_date )
when 'I0046'
then cast ( _InternalOrder.IntOrderPlannedClosingDate as fin_io_status_planned_date )
end as InternalOrderStatusPlannedDate,
case _SystemStatus.SystemStatus
when 'I0001'
then cast ( _InternalOrder.CreationDate as fin_io_status_reached_date )
when 'I0002'
then cast ( _InternalOrder.InternalOrderReleaseDate as fin_io_status_reached_date )
when 'I0045'
then cast ( _InternalOrder.InternalOrderCompletionDate as fin_io_status_reached_date )
when 'I0046'
then cast ( _InternalOrder.InternalOrderClosingDate as fin_io_status_reached_date )
end as InternalOrderStatusReachedDate,
case
when _SystemStatus.SystemStatus = 'I0001' and _InternalOrder.CreationDate <> '00000000'
then cast (_StatusObjectStatusChange.LastChangedByUser as aufaenam preserving type )
when _SystemStatus.SystemStatus = 'I0002' and _InternalOrder.InternalOrderReleaseDate <> '00000000'
then cast (_StatusObjectStatusChange.LastChangedByUser as aufaenam preserving type )
when _SystemStatus.SystemStatus = 'I0045' and _InternalOrder.InternalOrderCompletionDate <> '00000000'
then cast (_StatusObjectStatusChange.LastChangedByUser as aufaenam preserving type )
when _SystemStatus.SystemStatus = 'I0046' and _InternalOrder.InternalOrderClosingDate <> '00000000'
then cast (_StatusObjectStatusChange.LastChangedByUser as aufaenam preserving type )
else cast ( ' ' as aufaenam )
end as LastChangedByUser,
_LastChangedByUser
}
where
_SystemStatus.SystemStatus = 'I0001' //Status: Created
or _SystemStatus.SystemStatus = 'I0002' //Status: Released
or _SystemStatus.SystemStatus = 'I0045' //Status: Technically completed
or _SystemStatus.SystemStatus = 'I0046' //Status: Closed