P_EWM_HANDLINGUNITHEADER02
Helper View to get Reference Document and Parent HU Number
P_EWM_HANDLINGUNITHEADER02 is a CDS View in S/4HANA. Helper View to get Reference Document and Parent HU Number. It contains 3 fields. 4 CDS views read from this table.
CDS Views using this table (4)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_EWM_HandlingUnitHeaderC | view | union_all | COMPOSITE | Handling Unit Header - Cube |
| I_EWMHandlingUnitHdrHierNode | view_entity | from | COMPOSITE | EWM HU Header Hierarchy |
| I_EWMHandlingUnitItemHierNode | view_entity | inner | COMPOSITE | EWM HU Item Hierarchy |
| P_EWM_HandlingUnitHeader03 | view | union_all | COMPOSITE | Helper View for HU Union |
Fields (3)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| HandlingUnitExternalID | HandlingUnitExternalID | 2 | |
| PackagingMaterial | PackagingMaterial | 1 | |
| Warehouse | EWMWarehouse | 2 |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #M
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #COMPOSITE
@VDM.private: true
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'P_EWM_HandlingUnitHeader08'
//P_EWM_HandlingUnitHeader01 --> Returns active/planned Handling Unit with Parent Reference
//P_EWM_HandlingUnitHeadDlvRef02 --> Returns Reference Document Number
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
define view entity P_EWM_HandlingUnitHeader02
as select from P_EWM_HandlingUnitHeader01 as _HandlingUnitHeader
association [0..1] to P_EWM_HandlingUnitKeyMapping as _ParentHandlingUnitHeader on _HandlingUnitHeader.ParentHandlingUnitUUID = _ParentHandlingUnitHeader.HandlingUnitUUID
association [0..1] to P_EWM_TopHandlingUnit as _TopHandlingUnitHeader on _HandlingUnitHeader.EWMHghstLvlHandlingUnitUUID = _TopHandlingUnitHeader.HandlingUnitUUID
// Compatibility: External Apps relay on the field HandlingUnitReferenceDocument in case there is exactly one reference. A Cross-HU would lead anyway to an error with a key access
association [0..1] to P_EWM_HandlingUnitHeadDlvRef02 as _ReferenceDocument on $projection.HandlingUnitUUID = _ReferenceDocument.HandlingUnitUUID
association [1..1] to I_Product as _PackagingMaterial on $projection.PackagingMaterialUUID = _PackagingMaterial.ProductUUID
{
//_HandlingUnitHeader
key cast(_HandlingUnitHeader.HandlingUnitExternalID as char20 preserving type ) as HandlingUnitExternalID,
key _HandlingUnitHeader.Warehouse,
_HandlingUnitHeader.HandlingUnitType,
_HandlingUnitHeader.PackagingMaterialUUID,
_PackagingMaterial.Product as PackagingMaterial,
_HandlingUnitHeader.PackagingMaterialType,
_HandlingUnitHeader.HandlingUnitStatus,
_TopHandlingUnitHeader.EWMStorageType as StorageType,
_TopHandlingUnitHeader._StorageBin.EWMStorageSection as StorageSection,
_TopHandlingUnitHeader.EWMStorageBin as StorageBin,
_TopHandlingUnitHeader.EWMResource,
_HandlingUnitHeader.HandlingUnitMaxWeight,
_HandlingUnitHeader.GrossWeight,
_HandlingUnitHeader.NetWeight,
_HandlingUnitHeader.WeightUnit,
_HandlingUnitHeader.HandlingUnitTareWeight,
_HandlingUnitHeader.HandlingUnitTareWeightUnit,
_HandlingUnitHeader.HandlingUnitMaxVolume,
_HandlingUnitHeader.GrossVolume,
_HandlingUnitHeader.HandlingUnitNetVolume,
_HandlingUnitHeader.VolumeUnit,
_HandlingUnitHeader.HandlingUnitVolumeTolerance,
_HandlingUnitHeader.HandlingUnitTareVolume,
_HandlingUnitHeader.HandlingUnitTareVolumeUnit,
_HandlingUnitHeader.HandlingUnitLength,
_HandlingUnitHeader.HandlingUnitWidth,
_HandlingUnitHeader.HandlingUnitHeight,
_HandlingUnitHeader.UnitOfMeasureDimension,
_HandlingUnitHeader.HandlingUnitMaxLength,
_HandlingUnitHeader.HandlingUnitMaxWidth,
_HandlingUnitHeader.HandlingUnitMaxHeight,
_HandlingUnitHeader.HandlingUnitUUID,
_HandlingUnitHeader.HandlingUnitMaxDimensionUnit,
_HandlingUnitHeader.CreatedByUser,
_HandlingUnitHeader.CreationUTCDateTime,
_HandlingUnitHeader.LastChangedByUser,
_HandlingUnitHeader.EWMConsolidationGroup,
_HandlingUnitHeader.HandlingUnitIsClosed,
// Process Oriented Storage Control
_HandlingUnitHeader.ExternalStorageProcessStep,
_HandlingUnitHeader.EWMHUProcessStepIsCompleted,
_HandlingUnitHeader.StorageProcess,
//ETAG
case
when _HandlingUnitHeader.LastChangeUTCDateTime is initial then _HandlingUnitHeader.CreationUTCDateTime
else _HandlingUnitHeader.LastChangeUTCDateTime end as LastChangeUTCDateTime,
// Hierarchy
_HandlingUnitHeader.ParentHandlingUnitUUID,
cast(_ParentHandlingUnitHeader.HandlingUnitNumber as ewm_de_hu_no_conv preserving type) as ParentHandlingUnitNumber,
_HandlingUnitHeader.EWMHghstLvlHandlingUnitUUID,
cast(_TopHandlingUnitHeader.HandlingUnitExternalID as ewm_de_hu_no_conv preserving type ) as EWMHghstLvlHandlingUnitNumber,
_ReferenceDocument.DeliveryUUID,
// LO-HU Monitor requested Delivery Category for Navigation but this only works out of the box in S/4HANA Cloud
// S/4HANA OP is different! There it's customizing
_ReferenceDocument.DeliveryCategory as EWMDeliveryDocumentCategory,
_ReferenceDocument.ReferenceDocumentNumber,
// New Indicators to show the consumer it's worth to navigate to the entity
HandlingUnitHasCrossRefDoc,
_HandlingUnitHeader.EWMHandlingUnitExternalUUID,
// Begin Of Handling Unit Status
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU01'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_planned preserving type )
else cast( '' as ewm_de_hu_is_planned preserving type ) end as EWMHandlingUnitIsPlanned,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU02'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_in_stock preserving type )
else cast( '' as ewm_de_hu_is_in_stock preserving type ) end as EWMHandlingUnitIsInStock,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU04'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_unloaded preserving type )
else cast( '' as ewm_de_hu_is_unloaded preserving type ) end as EWMHandlingUnitIsUnloaded,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU05'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_loaded preserving type )
else cast( '' as ewm_de_hu_is_loaded preserving type ) end as EWMHandlingUnitIsLoaded,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU06'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_assigned_to_tu preserving type )
else cast( '' as ewm_de_hu_is_assigned_to_tu preserving type ) end as EWMTranspUnitIsAssigned,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU01'].EWMHUSystemStatusIsActive as ewm_de_hu_is_planned preserving type ) as EWMHandlingUnitIsPlanned,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU02'].EWMHUSystemStatusIsActive as ewm_de_hu_is_in_stock preserving type ) as EWMHandlingUnitIsInStock,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU04'].EWMHUSystemStatusIsActive as ewm_de_hu_is_unloaded preserving type ) as EWMHandlingUnitIsUnloaded,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU05'].EWMHUSystemStatusIsActive as ewm_de_hu_is_loaded preserving type ) as EWMHandlingUnitIsLoaded,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHU06'].EWMHUSystemStatusIsActive as ewm_de_hu_is_assigned_to_tu preserving type ) as EWMTranspUnitIsAssigned,
// Begin Of Handling Unit Block Status
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS1'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_cntnt_change_blck preserving type )
else cast( '' as ewm_de_hu_is_cntnt_change_blck preserving type ) end as EWMHUContentChangeIsBlocked,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS2'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_movement_blocked preserving type )
else cast( '' as ewm_de_hu_is_movement_blocked preserving type ) end as EWMHUMovementChangeIsBlocked,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS3'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_attrbt_chng_blck preserving type )
else cast( '' as ewm_de_hu_is_attrbt_chng_blck preserving type ) end as EWMHUAttributeChangeIsBlocked,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS4'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_posting_chng_blck preserving type )
else cast( '' as ewm_de_hu_is_posting_chng_blck preserving type ) end as EWMHUPostingChangeIsBlocked,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS5'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_blckd_by_customs preserving type )
else cast( '' as ewm_de_hu_is_blckd_by_customs preserving type ) end as EWMHUIsBlockedByCustoms,
case _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS8'].EWMHUSystemStatusIsInactive
when '' then cast( 'X' as ewm_de_hu_is_packed_for_ship preserving type )
else cast( '' as ewm_de_hu_is_packed_for_ship preserving type ) end as EWMHUIsPackedForShipping
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS1'].EWMHUSystemStatusIsActive as ewm_de_hu_is_cntnt_change_blck preserving type ) as EWMHUContentChangeIsBlocked,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS2'].EWMHUSystemStatusIsActive as ewm_de_hu_is_movement_blocked preserving type ) as EWMHUMovementChangeIsBlocked,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS3'].EWMHUSystemStatusIsActive as ewm_de_hu_is_attrbt_chng_blck preserving type ) as EWMHUAttributeChangeIsBlocked,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS4'].EWMHUSystemStatusIsActive as ewm_de_hu_is_posting_chng_blck preserving type ) as EWMHUPostingChangeIsBlocked,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS5'].EWMHUSystemStatusIsActive as ewm_de_hu_is_blckd_by_customs preserving type ) as EWMHUIsBlockedByCustoms,
// cast( _HandlingUnitStatus[1:EWMHandlingUnitSystemStatus = 'IHUS8'].EWMHUSystemStatusIsActive as ewm_de_hu_is_packed_for_ship preserving type ) as EWMHUIsPackedForShipping
}
where
HandlingUnitExternalID is not initial
and Warehouse is not initial