P_CN_FiapSuplrBalance04
Help view for supplier balance
P_CN_FiapSuplrBalance04 is a Consumption CDS View that provides data about "Help view for supplier balance" in SAP S/4HANA. It reads from 1 data source (P_CN_FiapSuplrBalance03) and exposes 51 fields with key fields CompanyCode, FiscalYear, FiscalPeriod, FiscalYearPeriod, GLAccount. It has 7 associations to related views. Part of development package GLO_FIN_CN.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_CN_FiapSuplrBalance03 | P_CN_FiapSuplrBalance03 | from |
Parameters (5)
| Name | Type | Default |
|---|---|---|
| P_CompanyCode | bukrs | |
| P_FiscalYear | gjahr | |
| P_CurrencyRole | fac_crcyrole | |
| P_Language | sylangu | |
| P_AlternativeGLAccount | fiarcn_dsp_alter |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Supplier | _Supplier | $projection.Supplier = _Supplier.Supplier |
| [1..1] | I_Customer | _Customer | $projection.Customer = _Customer.Customer |
| [1..1] | I_GLAccountInCompanyCode | _GLAccountInCompanyCode | $projection.CompanyCode = _GLAccountInCompanyCode.CompanyCode and $projection.GLAccount = _GLAccountInCompanyCode.GLAccount |
| [1..1] | C_CN_FsclPerdVH | _FiscalPeriodValueHelp | $projection.CompanyCode = _FiscalPeriodValueHelp.CompanyCode and $projection.FiscalYear = _FiscalPeriodValueHelp.FiscalYear and $projection.FiscalPeriod = _FiscalPeriodValueHelp.FiscalPeriod |
| [0..*] | C_CN_CrcyVH | _CurrencyValueHelp | $projection.CompanyCode = _CurrencyValueHelp.CompanyCode |
| [1..1] | I_GlAccountTextInCompanycode | _AccountText | $projection.CompanyCode = _AccountText.CompanyCode and $projection.GLAccount = _AccountText.GLAccount |
| [1..1] | P_CN_AlternativeGLAccountText | _AlternativeGLAccountText | $projection.CompanyCode = _AlternativeGLAccountText.CompanyCode and $projection.AlternativeGLAccount = _AlternativeGLAccountText.GLAccount and _AlternativeGLAccountText.Language = $session.system_language |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCNFIAPSBBAL4 | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (51)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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 | Customer | Customer | Sold-to Party | |
| KEY | Supplier | Supplier | Supplier | |
| KEY | BusinessPartner | |||
| KEY | SpecialGLCode | SpecialGLCode | Special G/L Ind | |
| KEY | BusinessArea | BusinessArea | Business Area | |
| KEY | ProfitCenter | ProfitCenter | Profit Center | |
| KEY | Segment | Segment | Segment number | |
| KEY | AccountingDocumentType | AccountingDocumentType | Journal Entry Type | |
| KEY | DisplayCurrency | DisplayCurrency | Display Currency | |
| KEY | TransactionCurrency | TransactionCurrency | Transaction Currency | |
| AssignmentReference | AssignmentReference | Assignment Reference | ||
| SupplierName | _Supplier | SupplierName | Supplier Name | |
| BPSupplierName | _Supplier | BPSupplierName | Supplier Name | |
| SupplierAccountGroup | _Supplier | SupplierAccountGroup | Account group | |
| SupplierVATRegistration | _Supplier | TaxNumber5 | ||
| SupplierCountry | ||||
| SupplierCityName | ||||
| SupplierRegion | ||||
| BusinessPartnerName | ||||
| SupplierSearchText | ||||
| IsBusinessPurposeCompleted | ||||
| GLAccountNameendasGLAccountName | ||||
| SuplrBalGLAccountInfo | GLAccount | General Ledger | ||
| SuplrBalAltvGLAccountInfo | AlternativeGLAccount | Group Account | ||
| BalCarFwdAmtInDspCrcy | BalCarFwdAmtInDspCrcy | |||
| DebitAmountInDspCrcy | DebitAmountInDspCrcy | |||
| CreditAmountInDspCrcy | ||||
| YTDDebitAmtInDspCrcy | YTDDebitAmtInDspCrcy | |||
| YTDCrdtAmtInDspCrcy | ||||
| StartingBalAmtInDspCrcy | StartingBalAmtInDspCrcy | |||
| EndingBalAmtInDspCrcy | EndingBalAmtInDspCrcy | |||
| BalCarFwdAmtInTransacCrcy | BalCarFwdAmtInTransacCrcy | |||
| DebitAmountInTransCrcy | DebitAmountInTransCrcy | Debit Amt in DC | ||
| CreditAmountInTransCrcy | ||||
| AmountInTransactionCurrency | ||||
| YTDDebitAmtInTransCrcy | YTDDebitAmtInTransCrcy | |||
| YTDCrdtAmtInTransCrcy | ||||
| YrToDteAmtInTransacCrcy | ||||
| StartingBalanceAmtInTransCrcy | StartingBalanceAmtInTransCrcy | |||
| EndingBalanceAmtInTransCrcy | EndingBalanceAmtInTransCrcy | |||
| _Supplier | _Supplier | |||
| _Customer | _Customer | |||
| _GLAccountInCompanyCode | _GLAccountInCompanyCode | |||
| _FiscalPeriodValueHelp | _FiscalPeriodValueHelp | |||
| _CurrencyValueHelp | _CurrencyValueHelp |
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_FiapSuplrBalance04.
-- 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: PCNFIAPSBBAL4
-- Parameters: P_CompanyCode : bukrs, P_FiscalYear : gjahr, P_CurrencyRole : fac_crcyrole, P_Language : sylangu, P_AlternativeGLAccount : fiarcn_dsp_alter
CREATE VIEW P_CN_FiapSuplrBalance04 AS
SELECT
CompanyCode,
FiscalYear,
FiscalPeriod,
cast(concat(FiscalYear,concat( '.', substring(FiscalPeriod,2,2))) as fiscalyearperiod ) AS FiscalYearPeriod,
GLAccount,
AlternativeGLAccount,
Customer,
Supplier,
_Supplier._SupplierToBusinessPartner._BusinessPartner.BusinessPartner AS BusinessPartner,
SpecialGLCode,
BusinessArea,
ProfitCenter,
Segment,
AccountingDocumentType,
DisplayCurrency,
TransactionCurrency,
AssignmentReference,
_Supplier.SupplierName AS SupplierName,
_Supplier.BPSupplierName AS BPSupplierName,
_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,
_Supplier._SupplierToBusinessPartner._BusinessPartner.SearchTerm1 AS SupplierSearchText,
_Supplier._SupplierCompany[CompanyCode = $parameters.P_CompanyCode].IsBusinessPurposeCompleted AS IsBusinessPurposeCompleted,
case $parameters.P_AlternativeGLAccount when 'X' then _AlternativeGLAccountText.GLAccountName else _AccountText[1:Language = :P_Language].GLAccountName end as GLAccountName AS GLAccountNameendasGLAccountName,
GLAccount AS SuplrBalGLAccountInfo,
AlternativeGLAccount AS SuplrBalAltvGLAccountInfo,
BalCarFwdAmtInDspCrcy,
DebitAmountInDspCrcy,
-CreditAmountInDspCrcy AS CreditAmountInDspCrcy,
YTDDebitAmtInDspCrcy,
-YTDCrdtAmtInDspCrcy AS YTDCrdtAmtInDspCrcy,
StartingBalAmtInDspCrcy,
EndingBalAmtInDspCrcy,
BalCarFwdAmtInTransacCrcy,
DebitAmountInTransCrcy,
-CreditAmountInTransCrcy AS CreditAmountInTransCrcy,
DebitAmountInTransCrcy + CreditAmountInTransCrcy AS AmountInTransactionCurrency,
YTDDebitAmtInTransCrcy,
-YTDCrdtAmtInTransCrcy AS YTDCrdtAmtInTransCrcy,
YTDDebitAmtInTransCrcy + YTDCrdtAmtInTransCrcy AS YrToDteAmtInTransacCrcy,
StartingBalanceAmtInTransCrcy,
EndingBalanceAmtInTransCrcy
FROM P_CN_FiapSuplrBalance03
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier -- association [1..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer -- association [1..1]
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON CompanyCode = _GLAccountInCompanyCode.CompanyCode AND GLAccount = _GLAccountInCompanyCode.GLAccount -- association [1..1]
LEFT OUTER JOIN C_CN_FsclPerdVH AS _FiscalPeriodValueHelp ON CompanyCode = _FiscalPeriodValueHelp.CompanyCode AND FiscalYear = _FiscalPeriodValueHelp.FiscalYear AND FiscalPeriod = _FiscalPeriodValueHelp.FiscalPeriod -- association [1..1]
LEFT OUTER JOIN C_CN_CrcyVH AS _CurrencyValueHelp ON CompanyCode = _CurrencyValueHelp.CompanyCode -- association [0..*]
LEFT OUTER JOIN I_GlAccountTextInCompanycode AS _AccountText ON CompanyCode = _AccountText.CompanyCode AND GLAccount = _AccountText.GLAccount -- association [1..1]
LEFT OUTER JOIN P_CN_AlternativeGLAccountText AS _AlternativeGLAccountText ON CompanyCode = _AlternativeGLAccountText.CompanyCode AND AlternativeGLAccount = _AlternativeGLAccountText.GLAccount AND _AlternativeGLAccountText.Language = $session.system_language -- association [1..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA