CDS标准视图:一次性账户的客户行项目 I_ONETIMEACCOUNTCUSTOMER

视图名称:一次性账户的客户行项目

视图类型:基础#

视图代码:#

点击查看代码
@EndUserText.label: 'One-Time Account Data for Customer Items'
@Analytics: { dataCategory:#DIMENSION}
@Analytics.internalName:#LOCAL
@VDM.viewType: #BASIC
@AbapCatalog.sqlViewName: 'IONETIMECUSTOMER'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AbapCatalog.buffering.status: #NOT_ALLOWED
@AbapCatalog.buffering.type: #NONE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality:#C
@ObjectModel.usageType.sizeCategory: #M
@ObjectModel.usageType.dataClass:#MIXED
@ObjectModel.representativeKey: 'AccountingDocumentItem'
@ObjectModel.supportedCapabilities: [ #CDS_MODELING_DATA_SOURCE , #CDS_MODELING_ASSOCIATION_TARGET ]
@Metadata.allowExtensions:true
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@AccessControl.privilegedAssociations: ['_Address']

define view I_OneTimeAccountCustomer

  as select from bsec

  association [1..1] to I_CompanyCode              as _CompanyCode             on  $projection.CompanyCode = _CompanyCode.CompanyCode

  association [1..1] to I_JournalEntry             as _JournalEntry            on  $projection.CompanyCode        = _JournalEntry.CompanyCode
                                                                               and $projection.AccountingDocument = _JournalEntry.AccountingDocument
                                                                               and $projection.FiscalYear         = _JournalEntry.FiscalYear

  association [0..1] to I_FiscalYearForCompanyCode as _FiscalYear              on  $projection.FiscalYear  = _FiscalYear.FiscalYear
                                                                               and $projection.CompanyCode = _FiscalYear.CompanyCode

  association [0..1] to I_Address                  as _Address                 on  $projection.AddressID = _Address.AddressID

  association [1..1] to I_OperationalAcctgDocItem  as _OperationalAcctgDocItem on  _OperationalAcctgDocItem.CompanyCode            = $projection.CompanyCode
                                                                               and _OperationalAcctgDocItem.AccountingDocument     = $projection.AccountingDocument
                                                                               and _OperationalAcctgDocItem.FiscalYear             = $projection.FiscalYear
                                                                               and _OperationalAcctgDocItem.AccountingDocumentItem = $projection.AccountingDocumentItem

  association [1..1] to I_CustomerCompany          as _CustomerCompany         on  _CustomerCompany.CompanyCode = $projection.CompanyCode
                                                                               and _CustomerCompany.Customer    = $projection.Customer
{
      @ObjectModel.foreignKey.association: '_CompanyCode'
  key bsec.bukrs                            as CompanyCode,
      @ObjectModel.foreignKey.association: '_JournalEntry'
  key bsec.belnr                            as AccountingDocument,
      @ObjectModel.foreignKey.association: '_FiscalYear'
  key bsec.gjahr                            as FiscalYear,
  key bsec.buzei                            as AccountingDocumentItem,
      cast(bsec.name1 as ad_name1)          as BusinessPartnerName1,
      cast(bsec.name2 as ad_name2)          as BusinessPartnerName2,
      cast(bsec.name3 as ad_name3)          as BusinessPartnerName3,
      cast(bsec.name4 as ad_name4)          as BusinessPartnerName4,
      bsec.land1                            as Country,
      cast(bsec.ort01 as ad_city1)          as CityName,
      bsec.pfach                            as POBox,
      bsec.pstl2                            as POBoxPostalCode,
      bsec.pstlz                            as PostalCode,
      bsec.regio                            as Region,
      bsec.stcd1                            as TaxID1,
      bsec.stcd2                            as TaxID2,
      bsec.stcd3                            as TaxID3,
      bsec.stcd4                            as TaxID4,
      bsec.stcd5                            as TaxID5,
      bsec.stras                            as StreetAddressName,
      bsec.stcdt                            as TaxNumberType,
      bsec.adrnr                            as AddressID,
      bsec.intad                            as AccountingClerkInternetAddress,
      cast(bsec.stkzn as bu_natural_person) as IsNaturalPerson,
      bsec.begru                            as AuthorizationGroup,
      case bsec.xcpdk when 'X' then cast('' as farp_isalternativepayer) else cast ('X' as farp_isalternativepayer)
      end                                   as PayerIsAlternativePayer,

      _OperationalAcctgDocItem.Customer     as Customer,

      _CompanyCode,
      _JournalEntry,
      _FiscalYear,
      _Address,

      _OperationalAcctgDocItem,
      _CustomerCompany
}
where
  _OperationalAcctgDocItem.FinancialAccountType = 'D'

事务代码:一次性客户的行项目#

视图结构:#

字段名称 技术名称
公司代码 COMPANYCODE
凭证编号 ACCOUNTINGDOCUMENT
会计年度 FISCALYEAR
项目 ACCOUNTINGDOCUMENTITEM
名称 BUSINESSPARTNERNAME1
名称 2 BUSINESSPARTNERNAME2
名称 3 BUSINESSPARTNERNAME3
名称 4 BUSINESSPARTNERNAME4
国家/地区 COUNTRY
城市 CITYNAME
邮政信箱 POBOX
邮箱邮政编码 POBOXPOSTALCODE
邮政编码 POSTALCODE
地区 REGION
税号 1 TAXID1
税号 2 TAXID2
税号3 TAXID3
税号4 TAXID4
税号 5 TAXID5
街道 STREETADDRESSNAME
税号类型 TAXNUMBERTYPE
地址 ADDRESSID
员工的互联网 ACCOUNTINGCLERKINTERNETADDRESS
自然人 ISNATURALPERSON
权限组 AUTHORIZATIONGROUP
是备选付款方 PAYERISALTERNATIVEPAYER
客户 CUSTOMER

作者:观兴

出处:https://www.cnblogs.com/guanxing/p/18663680

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

转载需本人同意,未经同意转载视同接受稿费2元/字

posted @   观兴  阅读(4)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 推荐几款开源且免费的 .NET MAUI 组件库
· 实操Deepseek接入个人知识库
· 易语言 —— 开山篇
· 一个费力不讨好的项目,让我损失了近一半的绩效!
more_horiz
keyboard_arrow_up dark_mode palette
选择主题
menu
点击右上角即可分享
微信分享提示