P_PL_SAFTBillingDocument

DDL: P_PL_SAFTBILLINGDOCUMENT SQL: PPLSAFTBILLDOC Type: view COMPOSITE

P_PL_SAFTBillingDocument is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_PL_SAFTBillingDocumentBasic, I_BillingDocumentItem) and exposes 7 fields with key field BillingDocument. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
P_PL_SAFTBillingDocumentBasic a from
I_BillingDocumentItem b inner

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_SDDocumentReason _SDDocumentReason $projection.SDDocumentReason = _SDDocumentReason.SDDocumentReason

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPLSAFTBILLDOC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument P_PL_SAFTBillingDocumentBasic BillingDocument SD Document
PL_SAFTInvoiceType P_PL_SAFTBillingDocumentBasic PL_SAFTInvoiceType
BillingDocumentCategory P_PL_SAFTBillingDocumentBasic BillingDocumentCategory BillingCategory
BillingDocumentDate P_PL_SAFTBillingDocumentBasic BillingDocumentDate Billing Date
DeliveryDate
SDDocumentReason
_SDDocumentReason _SDDocumentReason

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_PL_SAFTBillingDocument.
-- 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: PPLSAFTBILLDOC

CREATE VIEW P_PL_SAFTBillingDocument AS
SELECT
  a.BillingDocument AS BillingDocument,
  a.PL_SAFTInvoiceType AS PL_SAFTInvoiceType,
  a.BillingDocumentCategory AS BillingDocumentCategory,
  a.BillingDocumentDate AS BillingDocumentDate,
  max(b.ServicesRenderedDate) AS DeliveryDate,
  max(b.SDDocumentReason) AS SDDocumentReason
FROM P_PL_SAFTBillingDocumentBasic AS a
INNER JOIN I_BillingDocumentItem AS b ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SDDocumentReason AS _SDDocumentReason ON SDDocumentReason = _SDDocumentReason.SDDocumentReason  -- association [0..1]
;