P_RO_SAFTCActgBalance0

DDL: P_RO_SAFTCACTGBALANCE0 Type: view_entity CONSUMPTION

P_RO_SAFTCActgBalance0 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_CADocumentBPItem) and exposes 2 fields. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_CADocumentBPItem dfkkop from

Parameters (4)

NameTypeDefault
p_alt_acc_used saft_ro_alt_gl_account_flag
p_from_date budat_kk
p_to_date budat_kk
p_bukrs bukrs

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_GLAccountInCompanyCode _GLAccountInCompanyCode dfkkop.CompanyCode = _GLAccountInCompanyCode.CompanyCode and dfkkop.CAReconciliationAccount = _GLAccountInCompanyCode.GLAccount
[0..1] I_CompanyCode _CompanyCode dfkkop.CompanyCode = _CompanyCode.CompanyCode
[1..1] P_RO_SAFTCActgDocumentSrc0 _DocumentSrc0 dfkkop.CADocumentNumber = _DocumentSrc0.CADocumentNumber

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (2)

KeyFieldSource TableSource FieldDescription
BusinessPartner BusinessPartner Issuing Authority
AlternativeGLAccountendasActiveGLAccount

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_RO_SAFTCActgBalance0.
-- 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.
-- Parameters: p_alt_acc_used : saft_ro_alt_gl_account_flag, p_from_date : budat_kk, p_to_date : budat_kk, p_bukrs : bukrs

CREATE VIEW P_RO_SAFTCActgBalance0 AS
SELECT
  BusinessPartner,
  case when $parameters.p_alt_acc_used = '' then CAReconciliationAccount else _GLAccountInCompanyCode.AlternativeGLAccount end as ActiveGLAccount AS AlternativeGLAccountendasActiveGLAccount
FROM I_CADocumentBPItem AS dfkkop
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON dfkkop.CompanyCode = _GLAccountInCompanyCode.CompanyCode AND dfkkop.CAReconciliationAccount = _GLAccountInCompanyCode.GLAccount  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON dfkkop.CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN P_RO_SAFTCActgDocumentSrc0 AS _DocumentSrc0 ON dfkkop.CADocumentNumber = _DocumentSrc0.CADocumentNumber  -- association [1..1]
;