P_ResvnDocItemState

DDL: P_RESVNDOCITEMSTATE SQL: PRESDOCITST Type: view COMPOSITE

P_ResvnDocItemState is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_ReservationHeader, I_ReservationItem) and exposes 8 fields with key field Reservation.

Data Sources (2)

SourceAliasJoin Type
I_ReservationHeader ResDocHeader from
I_ReservationItem ResDocItem inner

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PRESDOCITST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY Reservation I_ReservationHeader Reservation Reservation
GoodsMovementType I_ReservationHeader GoodsMovementType Movement Type
Customer I_ReservationHeader Customer Sold-to Party
NmbrOfResvnDocItemsInProgress
NmbrOfResvnDocItems
NmbrOfCompletedResvnDocItms
_GoodsMovementType I_ReservationHeader _GoodsMovementType
_Customer I_ReservationHeader _Customer

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_ResvnDocItemState.
-- 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.
-- SQL view name: PRESDOCITST

CREATE VIEW P_ResvnDocItemState AS
SELECT
  ResDocHeader.Reservation AS Reservation,
  ResDocHeader.GoodsMovementType AS GoodsMovementType,
  ResDocHeader.Customer AS Customer,
  cast ( sum ( case when ResDocItem.ResvnItmWithdrawnQtyInBaseUnit is not initial and ResDocItem.ReservationItmIsMarkedForDeltn is initial and ResDocItem.ReservationItemIsFinallyIssued is initial then 1 else 0 end ) as int2 ) AS NmbrOfResvnDocItemsInProgress,
  cast ( sum( case when ResDocItem.ReservationItmIsMarkedForDeltn is initial then 1 else 0 end ) as int2 ) AS NmbrOfResvnDocItems,
  cast ( sum( case when ResDocItem.ReservationItemIsFinallyIssued is not initial and ResDocItem.ReservationItmIsMarkedForDeltn is initial then 1 else 0 end ) as int2 ) AS NmbrOfCompletedResvnDocItms,
  ResDocHeader._GoodsMovementType AS _GoodsMovementType,
  ResDocHeader._Customer AS _Customer
FROM I_ReservationHeader AS ResDocHeader
INNER JOIN I_ReservationItem AS ResDocItem ON /* join condition not captured in parsed metadata */
;