首页 > 其他分享 >CDS标准视图:银行对账单行项目 I_BankStatementItem

CDS标准视图:银行对账单行项目 I_BankStatementItem

时间:2025-01-09 14:59:42浏览次数:1  
标签:case BankStmtItem cast CheckNumber when 视图 BankStatementItem farp CDS

视图名称:银行对账单行项目 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

标签:case,BankStmtItem,cast,CheckNumber,when,视图,BankStatementItem,farp,CDS
From: https://www.cnblogs.com/guanxing/p/18662165

相关文章

  • CDS标准视图:银行对账单抬头 I_BankStatement
    视图名称:银行对账单抬头I_BankStatement视图类型:基础视图代码:点击查看代码事务代码:FF67/视图结构:字段名称技术名称短代码BANKSTATEMENTSHORTID公司代码COMPANYCODE开户行HOUSEBANK开户行账户标识HOUSEBANKACCOUNT银行对账单编号BANKSTATEMEN......
  • CDS标准视图:会计员 I_AccountingClerk
    视图名称:会计员I_AccountingClerk视图类型:基础视图代码:点击查看代码@AbapCatalog:{sqlViewName:'IFIACCCLERK',//compiler.compareFilter:true,preserveKey:true}@AccessControl.authorizationCheck:#CHECK@Analytics:{dataCa......
  • Eclipse 透视图
    透视图是一个包含一系列视图和内容编辑器的可视容器。默认的透视图叫java。Eclipse窗口可以打开多个透视图,但在同一时间只能有一个透视图处于激活状态。用户可以在两个透视图之间切换。操作透视图通过"Window"菜单并选择"OpenPerspective>Other"来打开透视图对话框。......
  • CDS标准视图:付款锁定原因描述 I_PaymentBlockingReasonText
    视图名称:付款锁定原因描述I_PaymentBlockingReasonText视图类型:基础视图代码:点击查看代码//Documentationaboutannotationscanbefoundathttp://help.sap.comsearchingforCDSannotations//InsertedbyVDMCDSSuitePlugin@ObjectModel.usageType.sizeCategory......
  • CDS标准视图:付款锁定原因 I_PaymentBlockingReason
    视图名称:付款锁定原因I_PaymentBlockingReason视图类型:基础视图视图代码:点击查看代码//Documentationaboutannotationscanbefoundathttp://help.sap.comsearchingforCDSannotations//InsertedbyVDMCDSSuitePlugin@ObjectModel.usageType.sizeCategory:#S......
  • CDS标准视图:安排维护计划的调用 I_MAINTENANCEPLANSCHEDULE
    视图名称:安排维护计划的调用I_MAINTENANCEPLANSCHEDULE视图类型:视图代码:点击查看代码@AbapCatalog.compiler.compareFilter:true@AbapCatalog.sqlViewName:'IMPLASCHED'@AccessControl.authorizationCheck:#CHECK@ClientHandling.algorithm:#SESSION_VARIABLE@End......
  • CDS标准视图:技术对象检验级别描述 I_TechObjInspectionLevelText
    视图名称:技术对象检验级别描述I_TechObjInspectionLevelText视图类型:基础视图视图代码:点击查看代码@AbapCatalog:{sqlViewName:'ITECHOBJINSPLVLT',compiler.compareFilter:true,preserveKey:true}@AccessControl.authorizationCheck:#NOT_REQUIRED@En......
  • CDS标准视图:技术对象检验级别 I_TechObjInspectionLevelCode
    视图名称:技术对象检验级别I_TechObjInspectionLevelCode视图类型:基础视图代码:点击查看代码@AbapCatalog:{sqlViewName:'ITECHOBJINSPLVL',compiler.compareFilter:true,preserveKey:true}@ClientHandling.algorithm:#SESSION_VARIABLE@AccessControl.aut......
  • CDS标准视图:优先级描述数据 I_GenericPriorityTextData
    视图名称:优先级描述数据I_GenericPriorityTextData视图类型:基础视图视图代码:点击查看代码@AbapCatalog.sqlViewName:'IGENPRIOTEXTDATA'@AbapCatalog.compiler.compareFilter:true@AccessControl.authorizationCheck:#NOT_REQUIRED@EndUserText.label:'GenericPri......
  • CDS标准视图:测量文档数据 I_MeasurementDocumentData
    视图名称:测量文档数据I_MeasurementDocumentData视图类型:基础视图视图代码:点击查看代码@AbapCatalog.sqlViewName:'IMEASDOCDATA'@AbapCatalog.compiler.compareFilter:true@AccessControl.authorizationCheck:#CHECK@EndUserText.label:'MeasurementDocumentDat......