P_Trrsobaseplan

DDL: P_TRRSOBASEPLAN SQL: PTRRSOBASEPLAN Type: view COMPOSITE

P_Trrsobaseplan is a Composite CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 5 fields with key fields vbeln, posnr, rldnr.

Data Sources (6)

SourceAliasJoin Type
acdocp acdocp left_outer
fins_trr_acp acp inner
cskb cskb left_outer
P_Trrmonaccprin cust inner
vbap vbap from
Kkag_Werk_Bukrs_Kokrs werk inner

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PTRRSOBASEPLAN view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY vbeln vbap vbeln SD Sched. Agmt
KEY posnr vbap posnr WBS Element
KEY rldnr P_Trrmonaccprin rldnr Ledger (Compat.)
PlannedCosAmtInCCCrcy
PlannedRevenueAmtInCCCrcy

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_Trrsobaseplan.
-- 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: PTRRSOBASEPLAN

CREATE VIEW P_Trrsobaseplan AS
SELECT
  vbap.vbeln AS vbeln,
  vbap.posnr AS posnr,
  cust.rldnr AS rldnr,
  sum( case when cskb.katyp <> '11' and cskb.katyp <> '12' then acdocp.hsl else 0 end ) AS PlannedCosAmtInCCCrcy,
  sum( case when cskb.katyp = '11' or cskb.katyp = '12' then -1 * acdocp.hsl else 0 end) AS PlannedRevenueAmtInCCCrcy
FROM vbap
INNER JOIN Kkag_Werk_Bukrs_Kokrs AS werk ON /* join condition not captured in parsed metadata */
INNER JOIN P_Trrmonaccprin AS cust ON /* join condition not captured in parsed metadata */
INNER JOIN fins_trr_acp AS acp ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN acdocp ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN cskb ON /* join condition not captured in parsed metadata */
;