P_CN_MaxStatement

DDL: P_CN_MAXSTATEMENT SQL: PMAXSTMTID Type: view COMPOSITE

P_CN_MaxStatement is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_Arbankstatement, P_CN_MaxDateBankStatement) and exposes 6 fields with key fields CompanyCode, HouseBank, HouseBankAccount, BankStatementDate, Currency.

Data Sources (2)

SourceAliasJoin Type
I_Arbankstatement A from
P_CN_MaxDateBankStatement P_CN_MaxDateBankStatement inner

Parameters (1)

NameTypeDefault
P_KeyDate valut_eb

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PMAXSTMTID 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 (6)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_Arbankstatement CompanyCode Receiver Company Code
KEY HouseBank I_Arbankstatement HouseBank House Bank
KEY HouseBankAccount I_Arbankstatement HouseBankAccount House Bank Account
KEY BankStatementDate I_Arbankstatement BankStatementDate Statement Date
KEY Currency I_Arbankstatement Currency Valuation Crcy
KEY BankStatementShortID

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_MaxStatement.
-- 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: PMAXSTMTID
-- Parameters: P_KeyDate : valut_eb

CREATE VIEW P_CN_MaxStatement AS
SELECT
  A.CompanyCode AS CompanyCode,
  A.HouseBank AS HouseBank,
  A.HouseBankAccount AS HouseBankAccount,
  A.BankStatementDate AS BankStatementDate,
  A.Currency AS Currency,
  max(A.BankStatementShortID) AS BankStatementShortID
FROM I_Arbankstatement AS A
INNER JOIN P_CN_MaxDateBankStatement ON /* join condition not captured in parsed metadata */
;