P_SDDocumentTotalItems

DDL: P_SDDOCUMENTTOTALITEMS SQL: PSDDOCTOTITEMS Type: view CONSUMPTION

P_SDDocumentTotalItems is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_BillingDocumentItem, I_SalesDocumentItemBasic) and exposes 3 fields with key field DocumentCount.

Data Sources (2)

SourceAliasJoin Type
I_BillingDocumentItem BillingDocumentItem union_all
I_SalesDocumentItemBasic SalesDocumentItem from

Annotations (7)

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

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY DocumentCount I_SalesDocumentItemBasic SalesDocument SD Document
BillingDocumentasDocumentCount
DocumentItemCount

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_SDDocumentTotalItems.
-- 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: PSDDOCTOTITEMS

CREATE VIEW P_SDDocumentTotalItems AS
SELECT
  SalesDocumentItem.SalesDocument AS DocumentCount,
  count(*) as DocumentItemCount AS BillingDocumentasDocumentCount,
  count(*) AS DocumentItemCount
FROM I_SalesDocumentItemBasic AS SalesDocumentItem
-- UNION ALL with additional select branch(es): I_BillingDocumentItem
;