P_RAContractPostedAmtAggr

DDL: P_RACONTRACTPOSTEDAMTAGGR Type: view_entity COMPOSITE

P_RAContractPostedAmtAggr is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_RAContractPostedAmt) and exposes 10 fields with key field RevenueAccountingContract.

Data Sources (1)

SourceAliasJoin Type
P_RAContractPostedAmt aggr from

Annotations (3)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY RevenueAccountingContract P_RAContractPostedAmt RevenueAccountingContract Revenue Contract
CompanyCode CompanyCode Receiver Company Code
00endasPostedRevnInSlsDocCrcy
00endasPostedInvoiceInSlsDocCrcy
00endasRAContrLiabilitiesAmount
00endasRAContractAssetsAmount
00endasRAPostedUnbilldRblsAmount
00endasRADeferredRevenueInSlsDocCrcy
00endasRARblAdjustmentAmtInSlsDocCrcy
SalesDocumentCurrency P_RAContractPostedAmt SalesDocumentCurrency Currency

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_RAContractPostedAmtAggr.
-- 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_RAContractPostedAmtAggr AS
SELECT
  aggr.RevenueAccountingContract AS RevenueAccountingContract,
  CompanyCode,
  sum(case aggr.RevnAcctgPostingCategory when 'RV' then aggr.RevnAcctgPostgAmtInSlsDocCrcy * (-1) else abap.curr'0.00' end) as PostedRevnInSlsDocCrcy AS 00endasPostedRevnInSlsDocCrcy,
  sum(case aggr.RevnAcctgPostingCategory when 'IC' then aggr.RevnAcctgPostgAmtInSlsDocCrcy else abap.curr'0.00' end) as PostedInvoiceInSlsDocCrcy AS 00endasPostedInvoiceInSlsDocCrcy,
  sum(case aggr.RevnAcctgPostingCategory when 'CL' then aggr.RevnAcctgPostgAmtInSlsDocCrcy * (-1) else abap.curr'0.00' end) as RAContrLiabilitiesAmount AS 00endasRAContrLiabilitiesAmount,
  sum(case aggr.RevnAcctgPostingCategory when 'CA' then aggr.RevnAcctgPostgAmtInSlsDocCrcy else abap.curr'0.00' end) as RAContractAssetsAmount AS 00endasRAContractAssetsAmount,
  sum(case aggr.RevnAcctgPostingCategory when 'UR' then aggr.RevnAcctgPostgAmtInSlsDocCrcy else abap.curr'0.00' end) as RAPostedUnbilldRblsAmount AS 00endasRAPostedUnbilldRblsAmount,
  sum(case aggr.RevnAcctgPostingCategory when 'DR' then aggr.RevnAcctgPostgAmtInSlsDocCrcy * (-1) else abap.curr'0.00' end) as RADeferredRevenueInSlsDocCrcy AS 00endasRADeferredRevenueInSlsDocCrcy,
  sum(case aggr.RevnAcctgPostingCategory when 'RA' then aggr.RevnAcctgPostgAmtInSlsDocCrcy else abap.curr'0.00' end) as RARblAdjustmentAmtInSlsDocCrcy AS 00endasRARblAdjustmentAmtInSlsDocCrcy,
  aggr.SalesDocumentCurrency AS SalesDocumentCurrency
FROM P_RAContractPostedAmt AS aggr
;