P_CASHFLOWCFA

DDL: P_CASHFLOWCFA SQL: PCSHFLWCFA Type: view BASIC

P_CASHFLOWCFA is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (I_BankAccount, I_CashFlow) and exposes 55 fields with key fields OriginSystem, OriginApplication, OriginDocument, OriginTransaction, OriginTransactionQualifier.

Data Sources (2)

SourceAliasJoin Type
I_BankAccount _bam left_outer
I_CashFlow _flow from

Annotations (8)

NameValueLevelField
VDM.private true view
VDM.viewType #BASIC view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.sqlViewName PCSHFLWCFA view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view

Fields (55)

KeyFieldSource TableSource FieldDescription
KEY OriginSystem OriginSystem
KEY OriginApplication OriginApplication
KEY OriginDocument OriginDocument
KEY OriginTransaction OriginTransaction
KEY OriginTransactionQualifier OriginTransactionQualifier
KEY CashFlow CashFlow
KEY ValidFrom ValidFrom
KEY ValidTo ValidTo
CashFlowID CashFlowID
CashTransactionOwner CashTransactionOwner
CreatedByUser CreatedByUser
CompanyCode I_CashFlow CompanyCode
TransactionDate TransactionDate
PostingDate PostingDate
CertaintyLevel CertaintyLevel
ActualCertaintyLevel
Currency TransactionCurrency
Amount AmountInTransactionCurrency
BaseCurrency CompanyCodeCurrency
BaseAmount AmountInCompanyCodeCurrency
AccountingDocument AccountingDocument
AccountingDocumentItem AccountingDocumentItem
FiscalYear FiscalYear
FiscalPeriod PostingFiscalPeriod
FIDocumentType AccountingDocumentType
PaymentMethod PaymentMethod
GLAccount GLAccount
FinancialAccountType FinancialAccountType
DocumentItemText DocumentItemText
CashPlanningGroup CashPlanningGroup
PlanningLevel PlanningLevel
HouseBank HouseBank
HouseBankAccount HouseBankAccount
Customer Customer
Supplier Supplier
BusinessPartner BusinessPartner
Material Material
BusinessArea BusinessArea
ProfitCenter ProfitCenter
CostCenter CostCenter
WBSElementInternalID WBSElementInternalID
WBSElementExternalID WBSElement
TradingPartner PartnerCompany
Segment Segment
LiquidityItem LiquidityItem
SourceCompanyCode SourceCompanyCode
Fund Fund
GrantID GrantID
ExpirationDate ExpirationDate
Bank
BankCountry
BankAccount
BankAccountType
IBAN
direction
@VDM.private: true
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #CHECK
@AbapCatalog.sqlViewName: 'PCSHFLWCFA'
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@AbapCatalog.compiler.compareFilter:true
@AbapCatalog.preserveKey:true
define view P_CASHFLOWCFA
  as select from I_CashFlow as _flow
  --left outer join I_BankAccount as _bam    on _flow.BankAccountInternalID = _bam.BankAccountInternalID
{
  key OriginSystem,
  key OriginApplication,
  key OriginDocument,
  key OriginTransaction,
  key OriginTransactionQualifier,
  key CashFlow,
  key ValidFrom,
  key ValidTo,

      CashFlowID,
      CashTransactionOwner,
      CreatedByUser,
      _flow.CompanyCode,
      TransactionDate,
      PostingDate,
      CertaintyLevel,
      case when CertaintyLevel = 'ACTUAL' then CertaintyLevel else '' end   as ActualCertaintyLevel,
      TransactionCurrency                                                   as Currency,
      AmountInTransactionCurrency                                           as Amount,
      CompanyCodeCurrency                                                   as BaseCurrency,
      AmountInCompanyCodeCurrency                                           as BaseAmount,
      case when _BankAccount.BankAccountCurrency is null 
        or _BankAccount.BankAccountCurrency = '' 
      then _flow.TransactionCurrency 
      else _BankAccount.BankAccountCurrency end                             as BankAccountCurrency,
      CashReleaseStatus                                                     as release_status,
      AccountingDocument,
      AccountingDocumentItem,
      FiscalYear,
      PostingFiscalPeriod                                                   as FiscalPeriod,
      AccountingDocumentType                                                as FIDocumentType,
      PaymentMethod,
      GLAccount,
      FinancialAccountType,
      DocumentItemText,
      CashPlanningGroup,
      PlanningLevel,
      HouseBank,
      HouseBankAccount,
//      BankAccountInternalID                                                 as BankAccountId,

      case when BankAccountInternalID = ''
        then cast('0000000000' as fclm_bam_acc_id)
      else BankAccountInternalID end                                        as BankAccountId,
      Customer,
      Supplier,
      BusinessPartner,
      Material,
      BusinessArea,
      ProfitCenter,
      CostCenter,
      WBSElementInternalID,
      WBSElement                                                            as WBSElementExternalID,
      PartnerCompany                                                        as TradingPartner,
      Segment,
      LiquidityItem,
      SourceCompanyCode,
      Fund,
      GrantID,
      ExpirationDate,

      coalesce(_BankAccount.Bank, '')                                       as Bank,
      coalesce(_BankAccount.BankCountry, '')                                as BankCountry,
      coalesce(_BankAccount.BankAccountNumber, '')                          as BankAccount,
      coalesce(_BankAccount.BankAccountType, '')                            as BankAccountType,
      coalesce(_BankAccount.IBAN, '')                                       as IBAN,

      case when AmountInTransactionCurrency > 0 then '+' else '-' end       as direction
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BANKACCOUNT",
"I_CASHFLOW"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/