P_CN_LaterStatementwithDate

DDL: P_CN_LATERSTATEMENTWITHDATE SQL: PSTMTDATE Type: view COMPOSITE

P_CN_LaterStatementwithDate is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_CN_BankStatementAfterKeyDate, P_CN_MaxDateBankStatement) and exposes 5 fields with key fields CompanyCode, HouseBank, HouseBankAccount, Currency, BankStatementDateendasBankStatementDate.

Data Sources (2)

SourceAliasJoin Type
P_CN_BankStatementAfterKeyDate P_CN_BankStatementAfterKeyDate from
P_CN_MaxDateBankStatement P_CN_MaxDateBankStatement left_outer

Parameters (1)

NameTypeDefault
P_KeyDate valut_eb

Annotations (6)

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

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode A CompanyCode Receiver Company Code
KEY HouseBank A HouseBank House Bank
KEY HouseBankAccount A HouseBankAccount House Bank Account
KEY Currency A Currency Valuation Crcy
KEY BankStatementDateendasBankStatementDate

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_LaterStatementwithDate.
-- 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: PSTMTDATE
-- Parameters: P_KeyDate : valut_eb

CREATE VIEW P_CN_LaterStatementwithDate AS
SELECT
  A.CompanyCode AS CompanyCode,
  A.HouseBank AS HouseBank,
  A.HouseBankAccount AS HouseBankAccount,
  A.Currency AS Currency,
  case when B.BankStatementDate is null then '19000101' else B.BankStatementDate end as BankStatementDate AS BankStatementDateendasBankStatementDate
FROM P_CN_BankStatementAfterKeyDate
LEFT OUTER JOIN P_CN_MaxDateBankStatement ON /* join condition not captured in parsed metadata */
;