P_CN_SuplrAcctBal

DDL: P_CN_SUPLRACCTBAL SQL: PCNSUPLRACCTBAL Type: view COMPOSITE Package: GLO_FIN_CN_BAL

Supplier Account Balance

P_CN_SuplrAcctBal is a Composite CDS View that provides data about "Supplier Account Balance" in SAP S/4HANA. It reads from 1 data source (P_CN_BPAcctBalTF) and exposes 31 fields with key fields CompanyCode, FiscalYear, FiscalPeriod, FiscalYearPeriod, GLAccount. It has 2 associations to related views. Part of development package GLO_FIN_CN_BAL.

Data Sources (1)

SourceAliasJoin Type
P_CN_BPAcctBalTF P_CN_BPAcctBalTF from

Parameters (6)

NameTypeDefault
P_CompanyCode bukrs
P_FiscalYear gjahr
P_CurrencyRole fac_crcyrole
P_ReportingFiscalPeriod fins_fiscalperiod
P_CategoryFlag wrf_catflag
P_DimensionKey dimid

Associations (2)

CardinalityTargetAliasCondition
[1..1] P_CN_AlternativeGLAccountText _AlternativeText $projection.CompanyCode = _AlternativeText.CompanyCode and $projection.AlternativeGLAccount = _AlternativeText.GLAccount and _AlternativeText.Language = $session.system_language
[1..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PCNSUPLRACCTBAL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (31)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY FiscalPeriod FiscalPeriod Tax period
KEY FiscalYearPeriod
KEY GLAccount GLAccount General Ledger
KEY AlternativeGLAccount AlternativeGLAccount Group Account
KEY BusinessPartner
KEY Customer Customer Sold-to Party
KEY Supplier Supplier Supplier
KEY AggrProfitCenter AggrProfitCenter
KEY AggrSegment AggrSegment
KEY DisplayCurrency DisplayCurrency Display Currency
SupplierName _Supplier SupplierName Supplier Name
BPSupplierName _Supplier BPSupplierName Supplier Name
SupplierSearchTerm
OrganizationBPName1 _Supplier OrganizationBPName1 Name 1
OrganizationBPName2 _Supplier OrganizationBPName2 Name 2
SupplierAccountGroup _Supplier SupplierAccountGroup Account group
SupplierVATRegistration _Supplier TaxNumber5
SupplierCountry
SupplierCityName
SupplierRegion
BusinessPartnerName
BalCarFwdAmtInDspCrcy CarryFwdAmtInDspCrcy
StartingBalAmtInDspCrcy StartingBalAmtInDspCrcy
EndingBalAmtInDspCrcy EndingBalAmtInDspCrcy
DebitAmountInDspCrcy DebitAmtInDspCrcy
CreditAmountInDspCrcy CreditAmtInDspCrcy
YTDDebitAmtInDspCrcy YTDDebitAmtInDspCrcy
YTDCrdtAmtInDspCrcy YTDCrdtAmtInDspCrcy
_AlternativeText _AlternativeText

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_CN_SuplrAcctBal.
-- 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: PCNSUPLRACCTBAL
-- Parameters: P_CompanyCode : bukrs, P_FiscalYear : gjahr, P_CurrencyRole : fac_crcyrole, P_ReportingFiscalPeriod : fins_fiscalperiod, P_CategoryFlag : wrf_catflag, P_DimensionKey : dimid

CREATE VIEW P_CN_SuplrAcctBal AS
SELECT
  CompanyCode,
  FiscalYear,
  FiscalPeriod,
  concat(FiscalYear,concat( '.', substring(FiscalPeriod,2,2))) AS FiscalYearPeriod,
  GLAccount,
  AlternativeGLAccount,
  _Supplier._SupplierToBusinessPartner._BusinessPartner.BusinessPartner AS BusinessPartner,
  Customer,
  Supplier,
  AggrProfitCenter,
  AggrSegment,
  DisplayCurrency,
  _Supplier.SupplierName AS SupplierName,
  _Supplier.BPSupplierName AS BPSupplierName,
  _Supplier._SupplierToBusinessPartner._BusinessPartner.SearchTerm1 AS SupplierSearchTerm,
  _Supplier.OrganizationBPName1 AS OrganizationBPName1,
  _Supplier.OrganizationBPName2 AS OrganizationBPName2,
  _Supplier.SupplierAccountGroup AS SupplierAccountGroup,
  _Supplier.TaxNumber5 AS SupplierVATRegistration,
  _Supplier._AddressRepresentation.Country AS SupplierCountry,
  _Supplier._AddressRepresentation.CityName AS SupplierCityName,
  _Supplier._AddressRepresentation.Region AS SupplierRegion,
  _Supplier._SupplierToBusinessPartner._BusinessPartner.BusinessPartnerName AS BusinessPartnerName,
  CarryFwdAmtInDspCrcy AS BalCarFwdAmtInDspCrcy,
  StartingBalAmtInDspCrcy,
  EndingBalAmtInDspCrcy,
  DebitAmtInDspCrcy AS DebitAmountInDspCrcy,
  CreditAmtInDspCrcy AS CreditAmountInDspCrcy,
  YTDDebitAmtInDspCrcy,
  YTDCrdtAmtInDspCrcy
FROM P_CN_BPAcctBalTF
LEFT OUTER JOIN P_CN_AlternativeGLAccountText AS _AlternativeText ON CompanyCode = _AlternativeText.CompanyCode AND AlternativeGLAccount = _AlternativeText.GLAccount AND _AlternativeText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [1..1]
;