P_SupAssgmtDmndOvw

DDL: P_SUPASSGMTDMNDOVW Type: view COMPOSITE

P_SupAssgmtDmndOvw is a Composite CDS View in SAP S/4HANA. It reads from 4 data sources (I_SalesDocumentItem, P_SupAssgmtSDItmQty, I_StockTransportOrderItem, P_SupAssgmtSTOItmQty) and exposes 36 fields with key fields RequirementDocumentNumber, RequirementDocumentItem, RequirementDocumentItem. It has 1 association to related views.

Data Sources (4)

SourceAliasJoin Type
I_SalesDocumentItem SDItem from
P_SupAssgmtSDItmQty SDItemQty inner
I_StockTransportOrderItem STOItem union_all
P_SupAssgmtSTOItmQty STOItemQty inner

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_SDDocumentCompletePartners _SDDocPartner $projection.RequirementDocumentNumber = _SDDocPartner.SDDocument and $projection.RequirementDocumentItem = _SDDocPartner.SDDocumentItem and _SDDocPartner.PartnerFunction = 'SP'

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PSUPAGMTDMNDOVW view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view

Fields (36)

KeyFieldSource TableSource FieldDescription
KEY RequirementDocumentNumber I_SalesDocumentItem SalesDocument SD Document
KEY RequirementDocumentItem I_SalesDocumentItem SalesDocumentItem Sales Document Item
RequestedDeliveryDate EarliestRequestedDeliveryDate
RequestedRqmtQtyInBaseUnit RequestedRqmtQtyInBaseUnit
DeliveredQuantityInBaseUnit DeliveredQuantityInBaseUnit
OpenDemandQuantity
BaseUnit P_SupAssgmtSDItmQty BaseUnit Unit of Measure
Material I_SalesDocumentItem Material Vehicle Model
MaterialGroup I_SalesDocumentItem MaterialGroup Product Group
Plant I_SalesDocumentItem Plant Supplying Plant
RequirementSegment I_SalesDocumentItem RequirementSegment Req. Segment
SalesOrganization _SalesDocument SalesOrganization Sales Organization
DistributionChannel _SalesDocument DistributionChannel RefDistCh-Cust/Mat.
Division _SalesDocument OrganizationDivision Org. Division
SalesDistrict I_SalesDocumentItem SalesDistrict Sales District
CompanyCode _SalesDocument BillingCompanyCode Receiver Company Code
Customer Ship-To Party (obsolete)
PurchaseOrderasRequirementDocumentNumber
KEY RequirementDocumentItem Sales Document Item
RequirementType
RequestedDeliveryDate EarliestRequestedDeliveryDate
RequestedRqmtQtyInBaseUnit RequestedRqmtQtyInBaseUnit
DeliveredQuantityInBaseUnit DeliveredQuantityInBaseUnit
OpenDemandQuantity
BaseUnit P_SupAssgmtSTOItmQty BaseUnit Unit of Measure
Material I_StockTransportOrderItem Material Vehicle Model
MaterialGroup I_StockTransportOrderItem MaterialGroup Product Group
Plant _StockTransportOrder SupplyingPlant Supplying Plant
RequirementSegment I_StockTransportOrderItem RequirementSegment Req. Segment
SalesOrganization _StockTransportShipping SalesOrganization Sales Organization
DistributionChannel _StockTransportShipping DistributionChannel RefDistCh-Cust/Mat.
Division _StockTransportShipping OrganizationDivision Org. Division
SalesDistrict Sales District
CompanyCode I_StockTransportOrderItem CompanyCode Receiver Company Code
Customer _StockTransportShipping ShipToParty Ship-To Party (obsolete)
StorageLocation I_StockTransportOrderItem ReceivingStorageLocation RecStorLoc

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_SupAssgmtDmndOvw.
-- 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_SupAssgmtDmndOvw AS
SELECT
  SDItem.SalesDocument AS RequirementDocumentNumber,
  SDItem.SalesDocumentItem AS RequirementDocumentItem,
  EarliestRequestedDeliveryDate AS RequestedDeliveryDate,
  RequestedRqmtQtyInBaseUnit,
  DeliveredQuantityInBaseUnit,
  (RequestedRqmtQtyInBaseUnit - DeliveredQuantityInBaseUnit) AS OpenDemandQuantity,
  SDItemQty.BaseUnit AS BaseUnit,
  SDItem.Material AS Material,
  SDItem.MaterialGroup AS MaterialGroup,
  SDItem.Plant AS Plant,
  SDItem.RequirementSegment AS RequirementSegment,
  _SalesDocument.SalesOrganization AS SalesOrganization,
  _SalesDocument.DistributionChannel AS DistributionChannel,
  _SalesDocument.OrganizationDivision AS Division,
  SDItem.SalesDistrict AS SalesDistrict,
  _SalesDocument.BillingCompanyCode AS CompanyCode,
  coalesce( _SDDocPartner.Customer, _SalesDocument.SoldToParty ) AS Customer,
  SDItem.StorageLocation AS PurchaseOrderasRequirementDocumentNumber,
  'U1' AS RequirementType,
  STOItem.ReceivingStorageLocation AS StorageLocation
FROM I_SalesDocumentItem AS SDItem
INNER JOIN P_SupAssgmtSDItmQty AS SDItemQty ON /* join condition not captured in parsed metadata */
INNER JOIN P_SupAssgmtSTOItmQty AS STOItemQty ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SDDocumentCompletePartners AS _SDDocPartner ON RequirementDocumentNumber = _SDDocPartner.SDDocument AND RequirementDocumentItem = _SDDocPartner.SDDocumentItem AND _SDDocPartner.PartnerFunction = 'SP'  -- association [1..1]
-- UNION ALL with additional select branch(es): I_StockTransportOrderItem
;