首页 > 其他分享 >CDS标准视图:一次性账户的客户行项目 I_ONETIMEACCOUNTCUSTOMER

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

时间:2025-01-10 11:46:12浏览次数:1  
标签:projection bsec CDS OperationalAcctgDocItem 视图 ONETIMEACCOUNTCUSTOMER CompanyCod

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

视图类型:基础

视图代码:

点击查看代码
@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

标签:projection,bsec,CDS,OperationalAcctgDocItem,视图,ONETIMEACCOUNTCUSTOMER,CompanyCod
From: https://www.cnblogs.com/guanxing/p/18663680

相关文章

  • CDS标准视图:应收账龄表 I_ARJrnlEntrItmAgingGrid
    视图名称:应收账龄表I_ARJrnlEntrItmAgingGrid视图类型:参数视图代码:点击查看代码@AbapCatalog.sqlViewName:'IARJEITMAGGRID'@AbapCatalog.compiler.compareFilter:true@AbapCatalog.preserveKey:true@VDM.viewType:#COMPOSITE@EndUserText.label:'AgingGridofAcco......
  • CDS标准视图:销售变现天数 I_DaysSalesOutstanding
    视图名称:销售变现天数I_DaysSalesOutstanding视图类型:参数视图代码:点击查看代码@AbapCatalog.sqlViewName:'IFIDAYSSLSOUTSTG'@AbapCatalog.compiler.compareFilter:true@AbapCatalog.preserveKey:true@VDM.viewType:#COMPOSITE@EndUserText.label:'DaysSalesOutst......
  • CDS标准视图:总计应收款 I_TotalAccountsReceivables
    视图名称:总计应收款I_TotalAccountsReceivables视图类型:参数视图代码:点击查看代码@AbapCatalog.sqlViewName:'IFITOTALACCTRBLS'@AbapCatalog.compiler.compareFilter:true@AbapCatalog.preserveKey:true@VDM.viewType:#COMPOSITE@EndUserText.label:'TotalAccounts......
  • CDS标准视图:预期应收 I_FutureAccountsReceivables
    视图名称:预期应收视图类型:参数视图代码:点击查看代码//Documentationaboutannotationscanbefoundathttp://help.sap.comsearchingforCDSannotations//InsertedbyVDMCDSSuitePlugin@ObjectModel.usageType.sizeCategory:#XXL//InsertedbyVDMCDSSuiteP......
  • CDS标准视图:催款级别分配 I_DunningLevelDistribution
    视图名称:催款级别分配I_DunningLevelDistribution视图类型:基础视图视图代码:点击查看代码@AbapCatalog.sqlViewName:'IFIDUNLVLDISTR'@VDM.viewType:#COMPOSITE@EndUserText.label:'DunningLevelDistribution'@Analytics:{dataCategory:#CUBE}@Analytics.intern......
  • CDS标准视图:催款冻结 I_DunningBlockingReasonCode
    视图名称:催款冻结I_DunningBlockingReasonCode视图类型:基础视图视图代码:点击查看代码@EndUserText.label:'DunningBlockingReasonCode'@Analytics:{dataCategory:#DIMENSION}@VDM.viewType:#BASIC@AbapCatalog.sqlViewName:'IFIDUNBLOCKREAS'@AbapCatalog.co......
  • CDS标准视图:催款冻结描述 I_DunningBlockingReasonText
    视图名称:催款冻结描述I_DunningBlockingReasonText视图类型:基础视图视图代码:点击查看代码@EndUserText.label:'DunningBlockingReason-Text'@Analytics.dataExtraction.enabled:true@VDM.viewType:#BASIC@AbapCatalog.sqlViewName:'IFIDUNBLREASONT'@AbapCatalo......
  • CDS标准视图:催款范围描述 I_DunningAreaText
    视图名称:催款范围描述I_DunningAreaText视图类型:视图代码:点击查看代码@EndUserText.label:'DunningArea-Text'@Analytics.dataExtraction.enabled:true@VDM.viewType:#BASIC@AbapCatalog.sqlViewName:'IFIDUNAREATEXT'@AbapCatalog.preserveKey:true@AbapCat......
  • CDS标准视图:催款范围 I_DunningArea
    视图名称:催款范围I_DunningArea视图类型:基础视图代码:点击查看代码@AccessControl.authorizationCheck:#CHECK//authoritycheckiswrong,forcompatibilityreasonsDCLremainsbutisalwaystrue@EndUserText.label:'DunningArea'@Analytics:{dataCategory:#......
  • CDS标准视图:银行对账单行项目 I_BankStatementItem
    视图名称:银行对账单行项目I_BankStatementItem视图类型:基础视图视图代码:点击查看代码@AbapCatalog.sqlViewName:'IBANKSTATMENTITM'@AbapCatalog.compiler.compareFilter:true@AbapCatalog.preserveKey:true@AccessControl.authorizationCheck:#CHECK@EndUserText.l......