P_LatestBankStatement01

DDL: P_LATESTBANKSTATEMENT01 SQL: PLATESTBS01 Type: view COMPOSITE Package: FINS_FIS_APAR_APPS

Private View to bring in the Latest Bank Statement

P_LatestBankStatement01 is a Composite CDS View that provides data about "Private View to bring in the Latest Bank Statement" in SAP S/4HANA. It reads from 1 data source (febko) and exposes 8 fields with key fields BankDataStorageApplication, CompanyCode, HouseBank, HouseBankAccount. It has 1 association to related views. Part of development package FINS_FIS_APAR_APPS.

Data Sources (1)

SourceAliasJoin Type
febko febko from

Associations (1)

CardinalityTargetAliasCondition
[1..1] P_ARBANKTRANSACTIONDOC_00 _LatestBankStatementNumber _LatestBankStatementNumber.BankDataStorageApplication = febko.anwnd and _LatestBankStatementNumber.CompanyCode = febko.bukrs and _LatestBankStatementNumber.HouseBank = febko.hbkid and _LatestBankStatementNumber.HouseBankAccount = febko.hktid and _LatestBankStatementNumber.StatementNumber = febko.aznum

Annotations (10)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
AbapCatalog.sqlViewName PLATESTBS01 view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY BankDataStorageApplication anwnd
KEY CompanyCode bukrs
KEY HouseBank hbkid
KEY HouseBankAccount hktid
BankStatementCreationDateTime azdattim
StatementNumber febko aznum
BankStatementDate febko azdat
StatementPageNumber
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@AbapCatalog.sqlViewName: 'PLATESTBS01'
define view P_LatestBankStatement01

as select from febko
  association [1..1] to P_ARBANKTRANSACTIONDOC_00     as _LatestBankStatementNumber  on  _LatestBankStatementNumber.BankDataStorageApplication     = febko.anwnd  
                                                                                     and _LatestBankStatementNumber.CompanyCode                    = febko.bukrs
                                                                                     and _LatestBankStatementNumber.HouseBank                      = febko.hbkid
                                                                                     and _LatestBankStatementNumber.HouseBankAccount               = febko.hktid
                                                                                     and _LatestBankStatementNumber.StatementNumber                = febko.aznum
                                                                                     
                                                                                    

{
  key anwnd            as BankDataStorageApplication, 
  key bukrs            as CompanyCode,
  key hbkid            as HouseBank,
  key hktid            as HouseBankAccount,
  azdattim             as BankStatementCreationDateTime, 
  febko.aznum          as StatementNumber,
//  _LatestBankStatementNumber as BankStatementDate,

//  max ( febko.azdat)   as BankStatementDate,

 febko.azdat   as BankStatementDate,
  max ( febko.azpgno ) as StatementPageNumber

}
where
  (
        febko.anwnd     = '0001'
    and febko.aznum     = _LatestBankStatementNumber.StatementNumber
    and febko.azdat   = _LatestBankStatementNumber.BankStatementDate  
  )
  or  (
        febko.anwnd     = '0004'
    and febko.azdattim  = _LatestBankStatementNumber.BankStatementCreationDateTime  
  )
    or  (
        febko.anwnd     = '0007'
    and febko.azdattim  = _LatestBankStatementNumber.BankStatementCreationDateTime  
  )
group by
  bukrs,
  hbkid,
  hktid,
  anwnd,
  aznum,
  azdat ,
  azdattim