P_ProductSalesWD

DDL: P_PRODUCTSALESWD SQL: PPRDSALESWD Type: view COMPOSITE

P_ProductSalesWD is a Composite CDS View in SAP S/4HANA. It reads from 5 data sources (I_ProductSales, I_DraftAdministrativeData, P_ProductSalesD, P_ProductSalesD, P_ProductD) and exposes 26 fields with key fields Draftkey, ActiveProduct, ActiveProduct.

Data Sources (5)

SourceAliasJoin Type
I_ProductSales ActiveDocument from
I_DraftAdministrativeData DraftAdministrativeData inner
P_ProductSalesD DraftDocument left_outer
P_ProductSalesD DraftDocument union_all
P_ProductD DraftRootDocument inner

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PPRDSALESWD view
ClientDependent true view
VDM.viewType #COMPOSITE view
VDM.private true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY Draftkey
KEY ActiveProduct I_ProductSales Product Product
ParentDraftKey NodeID
Product I_ProductSales Product Product Sold
SalesStatus I_ProductSales SalesStatus X-DChain status
SalesStatusValidityDate I_ProductSales SalesStatusValidityDate Valid from
TaxClassification I_ProductSales TaxClassification Tax class.
TransportationGroup I_ProductSales TransportationGroup Trans. Group
AllowedPackagingWeightQty I_ProductSales AllowedPackagingWeightQty Allowed pkg wt
AllowedPackagingWeightQtyUnit I_ProductSales AllowedPackagingWeightQtyUnit Unit of weight
AllowedPackagingVolumeQty I_ProductSales AllowedPackagingVolumeQty Allowed volume
AllowedPackagingVolumeQtyUnit I_ProductSales AllowedPackagingVolumeQtyUnit Volume unit
PricingReferenceProduct I_ProductSales PricingReferenceProduct X-distr.-chain PRM
VariantsPricingProfile I_ProductSales VariantsPricingProfile Pricing Profile
IsVariantPriceAllowed I_ProductSales IsVariantPriceAllowed Var. Price Allowed
IsActiveEntity
HasActiveEntity TRUE
Draftkey
KEY ActiveProduct P_ProductSalesD ActiveProduct Product
ParentDraftKey P_ProductSalesD ParentDraftKey NodeID
product P_ProductD product Product Sold
salesstatus P_ProductSalesD salesstatus X-DChain status
IsActiveEntity
HasActiveEntity P_ProductSalesD HasActiveEntity TRUE
HasDraftEntity
DraftAdministrativeDataUUID

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_ProductSalesWD.
-- 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: PPRDSALESWD

CREATE VIEW P_ProductSalesWD AS
SELECT
  cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) AS Draftkey,
  ActiveDocument.Product AS ActiveProduct,
  cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) AS ParentDraftKey,
  ActiveDocument.Product AS Product,
  ActiveDocument.SalesStatus AS SalesStatus,
  ActiveDocument.SalesStatusValidityDate AS SalesStatusValidityDate,
  ActiveDocument.TaxClassification AS TaxClassification,
  ActiveDocument.TransportationGroup AS TransportationGroup,
  ActiveDocument.AllowedPackagingWeightQty AS AllowedPackagingWeightQty,
  ActiveDocument.AllowedPackagingWeightQtyUnit AS AllowedPackagingWeightQtyUnit,
  ActiveDocument.AllowedPackagingVolumeQty AS AllowedPackagingVolumeQty,
  ActiveDocument.AllowedPackagingVolumeQtyUnit AS AllowedPackagingVolumeQtyUnit,
  ActiveDocument.PricingReferenceProduct AS PricingReferenceProduct,
  ActiveDocument.VariantsPricingProfile AS VariantsPricingProfile,
  ActiveDocument.IsVariantPriceAllowed AS IsVariantPriceAllowed,
  cast( 'X' as boole_d ) AS IsActiveEntity,
  cast( ' ' as boole_d ) AS HasActiveEntity,
  cast( ' ' as boole_d ) AS HasDraftEntity,
  cast(DraftDocument.ParentDraftKey as sysuuid_x ) AS DraftAdministrativeDataUUID
FROM I_ProductSales AS ActiveDocument
LEFT OUTER JOIN P_ProductSalesD AS DraftDocument ON /* join condition not captured in parsed metadata */
INNER JOIN P_ProductD AS DraftRootDocument ON /* join condition not captured in parsed metadata */
INNER JOIN I_DraftAdministrativeData AS DraftAdministrativeData ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_ProductSalesD
;