P_RAContractualPriceWithCust

DDL: P_RACONTRACTUALPRICEWITHCUST Type: view_entity COMPOSITE

P_RAContractualPriceWithCust is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_RAPerformanceObligation) and exposes 5 fields with key fields CompanyCode, AccountingPrinciple, CustomerNameendendasCustomerName, SalesDocumentCurrency.

Data Sources (1)

SourceAliasJoin Type
I_RAPerformanceObligation I_RAPerformanceObligation from

Annotations (2)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY AccountingPrinciple AccountingPrinciple AP Ledger/CoCode
KEY CustomerNameendendasCustomerName
KEY SalesDocumentCurrency SalesDocumentCurrency Currency
ContractualPrcInSlsDocCrcy ContractualPrcInSlsDocCrcy Contractual Price

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_RAContractualPriceWithCust.
-- 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_RAContractualPriceWithCust AS
SELECT
  CompanyCode,
  AccountingPrinciple,
  case Customer when '' then I_RAPerformanceObligation._BusinessPartner.BusinessPartnerName else (case Customer when BusinessPartner then I_RAPerformanceObligation._BusinessPartner.BusinessPartnerName else I_RAPerformanceObligation._Customer.CustomerName end) end as CustomerName AS CustomerNameendendasCustomerName,
  SalesDocumentCurrency,
  ContractualPrcInSlsDocCrcy
FROM I_RAPerformanceObligation
;