视图名称:银行对账单行项目 I_BankStatementItem
视图类型:基础视图
视图代码:
点击查看代码
@AbapCatalog.sqlViewName: 'IBANKSTATMENTITM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Items of a bank statement'
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
@Metadata.ignorePropagatedAnnotations:true
@ObjectModel.supportedCapabilities:[ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET]
define view I_BankStatementItem
as select from P_Arbanktransactiondocitem_06 as BankStmtItem
// get company code from febko
inner join P_Arbanktransactiondoc_02 as BankStmtHeader on BankStmtItem.StatementShortID = BankStmtHeader.StatementShortID
association [0..1] to I_Arbsitmemolinewithorig as _MemoLine on $projection.BankStatementShortID = _MemoLine.BankStatementShortID
and $projection.BankStatementItem = _MemoLine.BankStatementItem
association [0..1] to I_Currency as _Currency on _Currency.Currency = $projection.TransactionCurrency
association [0..1] to I_Currency as _OriginalCurrency on _OriginalCurrency.Currency = $projection.OriginalCurrency
{
key BankStmtItem.StatementShortID as BankStatementShortID,
key BankStmtItem.StatementItem as BankStatementItem,
BankStmtHeader.CompanyCode as CompanyCode,
cast ( BankStmtItem.PostingRule as farp_vgint ) as BankStatementPostingRule,
cast ( BankStmtItem.PaymentTransaction as farp_vorgc ) as PaymentTransaction,
BankStmtItem.InterpretationAlgorithm,
cast (_MemoLine.MemoLine as far_memo_line ) as MemoLine,
cast ( BankStmtItem.ValueDate as farp_valut ) as ValueDate,
cast ( BankStmtItem.BankPostingDate as farp_bvdat) as BankPostingDate,
BankStmtItem.PostingDate,
BankStmtItem.ValueDateTime,
BankStmtItem.TransactionCurrency,
BankStmtItem.OriginalCurrency,
@Semantics.amount.currencyCode: 'TransactionCurrency'
case BankStmtItem.DebitCreditCode
when 'D' then - abs(BankStmtItem.AmountInAccountCurrency)
when 'S' then - abs(BankStmtItem.AmountInAccountCurrency)
else BankStmtItem.AmountInAccountCurrency
end as AmountInTransactionCurrency,
@Semantics.amount.currencyCode: 'OriginalCurrency'
cast ( case BankStmtItem.DebitCreditCode
when 'D' then - abs(BankStmtItem.ForeignCurrencyAmount)
when 'S' then - abs(BankStmtItem.ForeignCurrencyAmount)
else BankStmtItem.ForeignCurrencyAmount
end as farp_fwbtr ) as AmountInOriginalCurrency,
cast ( BankStmtItem.ExchangeRate as far_curr_rate ) as ExchangeRate,
@Semantics.amount.currencyCode: 'TransactionCurrency'
BankStmtItem.FeeAmountInTransactionCrcy,
@Semantics.amount.currencyCode: 'OriginalCurrency'
cast ( BankStmtItem.FeeAmountInOriginalCrcy as farp_spesf ) as FeeAmountInOriginalCrcy,
cast ( case when BankStmtItem.PaymentAdviceAccountType = 'K'
then BankStmtItem.PaymentAdviceAccount
else '' end as lifnr ) as Supplier,
cast ( case when BankStmtItem.PaymentAdviceAccountType = 'D'
then BankStmtItem.PaymentAdviceAccount
else '' end as kunnr ) as Customer,
cast ( case when BankStmtItem.PaymentAdviceAccountType = 'S'
then BankStmtItem.PaymentAdviceAccount
else '' end as farp_hkont ) as GLAccount,
cast ( BankStmtItem.BusinessPartnerName as farp_partn ) as BusinessPartnerName,
cast ( BankStmtItem.PaymentManualTransacType as far_vgman ) as PaymentManualTransacType,
cast ( BankStmtItem.PaymentExternalTransacType as farp_vgext ) as PaymentExternalTransacType,
BankStmtItem.PaymentAdvice,
case when BankStmtItem.CheckType = 'C' and BankStmtItem.CheckNumber is not initial then BankStmtItem.CheckNumber
when BankStmtItem.CheckType = 'C' and BankStmtItem.CheckNumber is initial then BankStmtItem.Cheque
else ''
end as Cheque,
cast ( case when BankStmtItem.CheckType = 'D' and BankStmtItem.CheckNumber is not initial then BankStmtItem.CheckNumber
when BankStmtItem.CheckType = 'D' and BankStmtItem.CheckNumber is initial then BankStmtItem.Cheque
else ''
end as far_chect ) as PaymentMediumReference,
cast ( case when BankStmtItem.CheckType = '' and BankStmtItem.CheckNumber is not initial then BankStmtItem.CheckNumber
when BankStmtItem.CheckType = '' and BankStmtItem.CheckNumber is initial then BankStmtItem.Cheque
else ''
end as far_chect_orig ) as CustomerReferenceNumber,
cast ( BankStmtItem.BankLedgerDocument as farp_belnr_bank_ledger ) as BankLedgerDocument,
cast ( BankStmtItem.SubledgerDocument as farp_nbbln ) as SubledgerDocument,
cast ( BankStmtItem.BankLedgerOnAccountDocument as farp_ak1bl ) as BankLedgerOnAccountDocument,
cast ( BankStmtItem.SubledgerOnAccountDocument as farp_akbln ) as SubledgerOnAccountDocument,
BankStmtItem.FiscalYear,
cast ( BankStmtItem.PartnerBankCountry as farp_pabks ) as PartnerBankCountry,
cast ( BankStmtItem.PartnerBank as farp_pablz ) as PartnerBank,
cast ( BankStmtItem.PartnerBankSWIFTCode as paswi_eb) as PartnerBankSWIFTCode,
cast ( BankStmtItem.PartnerBankAccount as farp_pakto ) as PartnerBankAccount,
BankStmtItem.PartnerBankIBAN,
BankStmtItem.DocumentItemText,
cast ( BankStmtItem.BankReference as farp_vgref ) as BankReference,
BankStmtItem.IsCompleted,
_Currency,
_OriginalCurrency
}
事务代码:
视图结构:
字段名称 | 技术名称 |
---|---|
短代码 | BANKSTATEMENTSHORTID |
备忘记录号码 | BANKSTATEMENTITEM |
公司代码 | COMPANYCODE |
过账规则 | BANKSTATEMENTPOSTINGRULE |
外部付款交易 | PAYMENTTRANSACTION |
解释算法 | INTERPRETATIONALGORITHM |
备注行 | MEMOLINE |
起息日 | VALUEDATE |
对账单过账日期 | BANKPOSTINGDATE |
过帐日期 | POSTINGDATE |
计值日期时间 | VALUEDATETIME |
帐户货币 | TRANSACTIONCURRENCY |
外币 | ORIGINALCURRENCY |
金额 | AMOUNTINTRANSACTIONCURRENCY |
付款金额 | AMOUNTINORIGINALCURRENCY |
汇率 | EXCHANGERATE |
科目费用 | FEEAMOUNTINTRANSACTIONCRCY |
付款货币费用 | FEEAMOUNTINORIGINALCRCY |
供应商编号 | SUPPLIER |
客户 | CUSTOMER |
总账科目 | GLACCOUNT |
合作伙伴名称 | BUSINESSPARTNERNAME |
手动交易 | PAYMENTMANUALTRANSACTYPE |
外部业务 | PAYMENTEXTERNALTRANSACTYPE |
付款通知编号 | PAYMENTADVICE |
支票号 | CHEQUE |
付款媒介参考 | PAYMENTMEDIUMREFERENCE |
客户参考编号 | CUSTOMERREFERENCENUMBER |
银行分类账凭证编号 | BANKLEDGERDOCUMENT |
明细分类账凭证编号 | SUBLEDGERDOCUMENT |
科目凭证的银行分类账 | BANKLEDGERONACCOUNTDOCUMENT |
科目凭证的明细分类账 | SUBLEDGERONACCOUNTDOCUMENT |
会计年度 | FISCALYEAR |
合作伙伴银行 C/R | PARTNERBANKCOUNTRY |
合作伙伴银行代码 | PARTNERBANK |
合作伙伴 SWIFT | PARTNERBANKSWIFTCODE |
合作伙伴银行账户 | PARTNERBANKACCOUNT |
合作伙伴IBAN | PARTNERBANKIBAN |
文本 | DOCUMENTITEMTEXT |
项目参考 | BANKREFERENCE |
行项目完成 | ISCOMPLETED |