P_FIARCN_CUST_BALANCE07

DDL: P_FIARCN_CUST_BALANCE07 SQL: PVFIARCNCUSTBAL7 Type: view CONSUMPTION Package: GLO_FIN_CN

Customer Balance

P_FIARCN_CUST_BALANCE07 is a Consumption CDS View that provides data about "Customer Balance" in SAP S/4HANA. It reads from 2 data sources (P_FIARCN_CUST_BALANCE04, P_FIARCN_TOTAL_PERIODS) and exposes 30 fields with key fields CompanyCode, FiscalYear, FiscalPeriod, GLAccount, AlternativeGLAccount. Part of development package GLO_FIN_CN.

Data Sources (2)

SourceAliasJoin Type
P_FIARCN_CUST_BALANCE04 P_FIARCN_CUST_BALANCE04 from
P_FIARCN_TOTAL_PERIODS P_FIARCN_TOTAL_PERIODS inner

Parameters (4)

NameTypeDefault
P_CompanyCode bukrs
P_FiscalYear gjahr
P_Language sylangu
P_CurrencyRole fac_crcyrole

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PVFIARCNCUSTBAL7 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 (30)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode Period CompanyCode Receiver Company Code
KEY FiscalYear Period FiscalYear G/L Fiscal Year
KEY FiscalPeriod Period FiscalPeriod Tax period
KEY GLAccount GLAccount General Ledger
KEY AlternativeGLAccount AlternativeGLAccount Group Account
KEY BusinessPartner Bal BusinessPartner Issuing Authority
KEY Customer Bal Customer Sold-to Party
KEY Supplier Supplier Supplier
KEY SpecialGLCode SpecialGLCode Special G/L Ind
KEY ProfitCenter ProfitCenter Profit Center
KEY Segment Segment Segment number
KEY BusinessArea BusinessArea Business Area
KEY AccountingDocumentType AccountingDocumentType Journal Entry Type
KEY DisplayCurrency DisplayCurrency Display Currency
KEY TransactionCurrency TransactionCurrency Transaction Currency
AssignmentReference AssignmentReference Assignment Reference
curr232endasBalCarFwdAmtInDspCrcy
curr232endasStartingBalAmtInDspCrcy
curr232endasEndingBalAmtInDspCrcy
curr232endasDebitAmountInDspCrcy
curr232endasCreditAmountInDspCrcy
curr232endasYTDDebitAmtInDspCrcy
curr232endasYTDCrdtAmtInDspCrcy
curr232endasBalCarFwdAmtInTransacCrcy
curr232endasDebitAmountInTransCrcy
curr232endasCreditAmountInTransCrcy
curr232endasEndingBalanceAmtInTransCrcy
curr232endasYTDDebitAmtInTransCrcy
curr232endasYTDCrdtAmtInTransCrcy
GLAccountName GLAccountName Short Text

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_FIARCN_CUST_BALANCE07.
-- 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: PVFIARCNCUSTBAL7
-- Parameters: P_CompanyCode : bukrs, P_FiscalYear : gjahr, P_Language : sylangu, P_CurrencyRole : fac_crcyrole

CREATE VIEW P_FIARCN_CUST_BALANCE07 AS
SELECT
  Period.CompanyCode AS CompanyCode,
  Period.FiscalYear AS FiscalYear,
  Period.FiscalPeriod AS FiscalPeriod,
  GLAccount,
  AlternativeGLAccount,
  Bal.BusinessPartner AS BusinessPartner,
  Bal.Customer AS Customer,
  Supplier,
  SpecialGLCode,
  ProfitCenter,
  Segment,
  BusinessArea,
  AccountingDocumentType,
  DisplayCurrency,
  TransactionCurrency,
  AssignmentReference,
  case when Bal.FiscalPeriod = '000' then AmountInDisplayCurrency else cast(0 as abap.curr( 23, 2 )) end as BalCarFwdAmtInDspCrcy AS curr232endasBalCarFwdAmtInDspCrcy,
  case when Bal.FiscalPeriod < Period.FiscalPeriod then AmountInDisplayCurrency else cast(0 as abap.curr( 23, 2 )) end as StartingBalAmtInDspCrcy AS curr232endasStartingBalAmtInDspCrcy,
  case when Bal.FiscalPeriod <= Period.FiscalPeriod then AmountInDisplayCurrency else cast(0 as abap.curr( 23, 2 )) end as EndingBalAmtInDspCrcy AS curr232endasEndingBalAmtInDspCrcy,
  case when Bal.FiscalPeriod = Period.FiscalPeriod then DebitAmountInDspCrcy else cast(0 as abap.curr( 23, 2 )) end as DebitAmountInDspCrcy AS curr232endasDebitAmountInDspCrcy,
  case when Bal.FiscalPeriod = Period.FiscalPeriod then CreditAmountInDspCrcy else cast(0 as abap.curr( 23, 2 )) end as CreditAmountInDspCrcy AS curr232endasCreditAmountInDspCrcy,
  case when Bal.FiscalPeriod > '000' and Bal.FiscalPeriod <= Period.FiscalPeriod then DebitAmountInDspCrcy else cast(0 as abap.curr( 23, 2 )) end as YTDDebitAmtInDspCrcy AS curr232endasYTDDebitAmtInDspCrcy,
  case when Bal.FiscalPeriod > '000' and Bal.FiscalPeriod <= Period.FiscalPeriod then CreditAmountInDspCrcy else cast(0 as abap.curr( 23, 2 )) end as YTDCrdtAmtInDspCrcy AS curr232endasYTDCrdtAmtInDspCrcy,
  case when Bal.FiscalPeriod = '000' then AmountInTransactionCurrency else cast(0 as abap.curr( 23, 2 )) end as BalCarFwdAmtInTransacCrcy AS curr232endasBalCarFwdAmtInTransacCrcy,
  case when Bal.FiscalPeriod = Period.FiscalPeriod then DebitAmountInTransCrcy else cast(0 as abap.curr( 23, 2 )) end as DebitAmountInTransCrcy AS curr232endasDebitAmountInTransCrcy,
  case when Bal.FiscalPeriod = Period.FiscalPeriod then CreditAmountInTransCrcy else cast(0 as abap.curr( 23, 2 )) end as CreditAmountInTransCrcy AS curr232endasCreditAmountInTransCrcy,
  case when Bal.FiscalPeriod <= Period.FiscalPeriod then AmountInTransactionCurrency else cast(0 as abap.curr( 23, 2 )) end as EndingBalanceAmtInTransCrcy AS curr232endasEndingBalanceAmtInTransCrcy,
  case when Bal.FiscalPeriod > '000' and Bal.FiscalPeriod <= Period.FiscalPeriod then DebitAmountInTransCrcy else cast(0 as abap.curr( 23, 2 )) end as YTDDebitAmtInTransCrcy AS curr232endasYTDDebitAmtInTransCrcy,
  case when Bal.FiscalPeriod > '000' and Bal.FiscalPeriod <= Period.FiscalPeriod then CreditAmountInTransCrcy else cast(0 as abap.curr( 23, 2 )) end as YTDCrdtAmtInTransCrcy AS curr232endasYTDCrdtAmtInTransCrcy,
  GLAccountName
FROM P_FIARCN_CUST_BALANCE04
INNER JOIN P_FIARCN_TOTAL_PERIODS ON /* join condition not captured in parsed metadata */
;