C_EWM_PInvDocInWhseOrder_2

DDL: C_EWM_PINVDOCINWHSEORDER_2 Type: view_entity CONSUMPTION Package: EWM_ADAPTER_S4_ERP_OM

Form Data Provider for PInv Docs

C_EWM_PInvDocInWhseOrder_2 is a Consumption CDS View that provides data about "Form Data Provider for PInv Docs" in SAP S/4HANA. It reads from 1 data source (P_EWM_PInvDocInWhseOrd04) and exposes 14 fields with key fields WarehouseOrder, PhysicalInventoryDocumentUUID. It has 3 associations to related views. Part of development package EWM_ADAPTER_S4_ERP_OM.

Data Sources (1)

SourceAliasJoin Type
P_EWM_PInvDocInWhseOrd04 P_EWM_PInvDocInWhseOrd04 from

Parameters (1)

NameTypeDefault
P_Language sylangu

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_EWM_PInvProcedureText _ProcedureText $projection.PhysicalInventoryDocumentType = _ProcedureText.PhysicalInventoryDocumentType and _ProcedureText.Language = $parameters.P_Language
[1..*] C_EWM_PInvCountItem_2 _PInvCountItems $projection.PhysicalInventoryDocumentUUID = _PInvCountItems.PhysicalInventoryDocumentUUID and $projection.WarehouseOrder = _PInvCountItems.WarehouseOrder
[0..1] C_EWM_PInvCountDynFldSel _DynamicFields $projection.WarehouseOrder = _DynamicFields.WarehouseOrder and $projection.PhysicalInventoryDocumentUUID = _DynamicFields.PhysicalInventoryDocumentUUID

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Form Data Provider for PInv Docs view
VDM.viewType #CONSUMPTION view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #M view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY WarehouseOrder WarehouseOrder
KEY PhysicalInventoryDocumentUUID PhysicalInventoryDocumentUUID
clientNULLasPInvLogItemTimeStamp
clientNULLasPInvPrintedTimeStamp
PhysicalInventoryLogByUserName PhysicalInventoryLogByUserName
ActivityArea ActivityArea
PhysicalInventoryArea PhysicalInventoryArea
PhysicalInventoryDocumentType PhysicalInventoryDocumentType
PInvDocumentTypeText _ProcedureText PInvDocumentTypeText
PhysicalInventoryDocNumber PhysicalInventoryDocNumber
PhysicalInventoryDocYear PhysicalInventoryDocYear
EWMWarehouse EWMWarehouse Warehouse No.
_PInvCountItems _PInvCountItems
_DynamicFields _DynamicFields

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 C_EWM_PInvDocInWhseOrder_2.
-- 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.
-- Parameters: P_Language : sylangu

CREATE VIEW C_EWM_PInvDocInWhseOrder_2 AS
SELECT
  WarehouseOrder,
  PhysicalInventoryDocumentUUID,
  dats_tims_to_tstmp( PInvCreationDate, PInvCreationTime, 'UTC', $session.client, 'NULL' ) as PInvLogItemTimeStamp AS clientNULLasPInvLogItemTimeStamp,
  dats_tims_to_tstmp( PInvPrintedDate, PInvPrintedTime, 'UTC', $session.client, 'NULL' ) as PInvPrintedTimeStamp AS clientNULLasPInvPrintedTimeStamp,
  PhysicalInventoryLogByUserName,
  ActivityArea,
  PhysicalInventoryArea,
  PhysicalInventoryDocumentType,
  _ProcedureText.PInvDocumentTypeText AS PInvDocumentTypeText,
  PhysicalInventoryDocNumber,
  PhysicalInventoryDocYear,
  EWMWarehouse
FROM P_EWM_PInvDocInWhseOrd04
LEFT OUTER JOIN I_EWM_PInvProcedureText AS _ProcedureText ON PhysicalInventoryDocumentType = _ProcedureText.PhysicalInventoryDocumentType AND _ProcedureText.Language = $parameters.P_Language  -- association [0..1]
LEFT OUTER JOIN C_EWM_PInvCountItem_2 AS _PInvCountItems ON PhysicalInventoryDocumentUUID = _PInvCountItems.PhysicalInventoryDocumentUUID AND WarehouseOrder = _PInvCountItems.WarehouseOrder  -- association [1..*]
LEFT OUTER JOIN C_EWM_PInvCountDynFldSel AS _DynamicFields ON WarehouseOrder = _DynamicFields.WarehouseOrder AND PhysicalInventoryDocumentUUID = _DynamicFields.PhysicalInventoryDocumentUUID  -- association [0..1]
;