I_CFinPurchasingDocHistory

DDL: I_CFINPURCHASINGDOCHISTORY Type: view COMPOSITE Package: FINS_CFIN_ACC_VIEW_API

CFin Purchasing Document: History

I_CFinPurchasingDocHistory is a Composite CDS View that provides data about "CFin Purchasing Document: History" in SAP S/4HANA. It reads from 2 data sources (ekbe, I_PurchasingDocumentItem) and exposes 24 fields with key fields SenderLogicalSystem, CFinPurchasingDocument, CFinPurchasingDocumentItem, CFinPurgDocAccountAssignment, PurchaseOrderTransactionType. It has 5 associations to related views. Part of development package FINS_CFIN_ACC_VIEW_API.

Data Sources (2)

SourceAliasJoin Type
ekbe PurchasingDocumentHistory from
I_PurchasingDocumentItem PurchasingDocumentItem inner

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_LogicalSystem _LogicalSystem $projection.SenderLogicalSystem = _LogicalSystem.LogicalSystem
[1..1] I_CFinPurchasingDocumentItem _CFinPurchasingDocumentItem $projection.SenderLogicalSystem = _CFinPurchasingDocumentItem.SenderLogicalSystem and $projection.CFinPurchasingDocument = _CFinPurchasingDocumentItem.CFinPurchasingDocument and $projection.CFinPurchasingDocumentItem = _CFinPurchasingDocumentItem.CFinPurchasingDocumentItem
[0..1] I_UnitOfMeasure _OrderQuantityUnit $projection.OrderQuantityUnit = _OrderQuantityUnit.UnitOfMeasure
[0..1] I_Currency _Currency $projection.Currency = _Currency.Currency
[0..1] I_Currency _CompanyCodeCurrency $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency

Annotations (11)

NameValueLevelField
EndUserText.label CFin Purchasing Document: History view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName ICFINPOHIST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY SenderLogicalSystem
KEY CFinPurchasingDocument
KEY CFinPurchasingDocumentItem
KEY CFinPurgDocAccountAssignment
KEY PurchaseOrderTransactionType ekbe vgabe
KEY MaterialDocumentYear ekbe gjahr
KEY CFinMaterialDocument
KEY CFinMaterialDocumentItem
PostingDate ekbe budat
Quantity ekbe menge
PurOrdAmountInCompanyCodeCrcy ekbe dmbtr
PurchaseOrderAmount ekbe wrbtr
Currency ekbe waers
DebitCreditCode ekbe shkzg
AccountingDocumentCreationDate ekbe cpudt
TimeEntry ekbe cputm
Material ekbe matnr
CompanyCodeCurrency ekbe hswae
OrderQuantityUnit I_PurchasingDocumentItem OrderQuantityUnit
_LogicalSystem _LogicalSystem
_CFinPurchasingDocumentItem _CFinPurchasingDocumentItem
_OrderQuantityUnit _OrderQuantityUnit
_Currency _Currency
_CompanyCodeCurrency _CompanyCodeCurrency
@EndUserText.label: 'CFin Purchasing Document: History'
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
  authorizationCheck: #NOT_REQUIRED,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@AbapCatalog: {
  sqlViewName: 'ICFINPOHIST',
  compiler.compareFilter: true,
  preserveKey: true
}
@ObjectModel: {
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #C,
     sizeCategory:   #XL
   }
}
/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ] } */
define view I_CFinPurchasingDocHistory
  as select from ekbe                     as PurchasingDocumentHistory
    inner join   I_PurchasingDocumentItem as PurchasingDocumentItem on  PurchasingDocumentHistory.ebeln = PurchasingDocumentItem.PurchasingDocument
                                                                    and PurchasingDocumentHistory.ebelp = PurchasingDocumentItem.PurchasingDocumentItem


  association [0..1] to I_LogicalSystem              as _LogicalSystem              on  $projection.SenderLogicalSystem = _LogicalSystem.LogicalSystem

  association [1..1] to I_CFinPurchasingDocumentItem as _CFinPurchasingDocumentItem on  $projection.SenderLogicalSystem        = _CFinPurchasingDocumentItem.SenderLogicalSystem
                                                                                    and $projection.CFinPurchasingDocument     = _CFinPurchasingDocumentItem.CFinPurchasingDocument
                                                                                    and $projection.CFinPurchasingDocumentItem = _CFinPurchasingDocumentItem.CFinPurchasingDocumentItem

  association [0..1] to I_UnitOfMeasure              as _OrderQuantityUnit          on  $projection.OrderQuantityUnit = _OrderQuantityUnit.UnitOfMeasure

  association [0..1] to I_Currency                   as _Currency                   on  $projection.Currency = _Currency.Currency

  association [0..1] to I_Currency                   as _CompanyCodeCurrency        on  $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency

{
          @ObjectModel.foreignKey.association: '_LogicalSystem'
  key     cast( '          ' as logsys preserving type  )                                                as SenderLogicalSystem,
  key     cast ( PurchasingDocumentHistory.ebeln      as fins_cfin_av_purchasing_doc preserving type )   as CFinPurchasingDocument,
          @ObjectModel.foreignKey.association: '_CFinPurchasingDocumentItem'
  key     cast ( PurchasingDocumentHistory.ebelp  as fins_cfin_av_purg_document_itm preserving type  )   as CFinPurchasingDocumentItem,
  key     cast ( PurchasingDocumentHistory.zekkn     as fins_cfin_av_purg_doc_acctasgt preserving type ) as CFinPurgDocAccountAssignment,
  key     PurchasingDocumentHistory.vgabe                                                                as PurchaseOrderTransactionType,
  key     PurchasingDocumentHistory.gjahr                                                                as MaterialDocumentYear,
  key     cast( PurchasingDocumentHistory.belnr     as fins_cfin_av_matl_doc preserving type )           as CFinMaterialDocument,
  key     cast (PurchasingDocumentHistory.buzei     as fins_cfin_av_matl_doc_item preserving type )      as CFinMaterialDocumentItem,

          PurchasingDocumentHistory.budat                                                                as PostingDate,
          @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
          PurchasingDocumentHistory.menge                                                                as Quantity,
          @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
          PurchasingDocumentHistory.dmbtr                                                                as PurOrdAmountInCompanyCodeCrcy,
          @Semantics.amount.currencyCode: 'Currency'
          PurchasingDocumentHistory.wrbtr                                                                as PurchaseOrderAmount,
          @Semantics.currencyCode:true
          @ObjectModel.foreignKey.association: '_Currency'
          PurchasingDocumentHistory.waers                                                                as Currency,
          PurchasingDocumentHistory.shkzg                                                                as DebitCreditCode,
          PurchasingDocumentHistory.cpudt                                                                as AccountingDocumentCreationDate,
          PurchasingDocumentHistory.cputm                                                                as TimeEntry,
          PurchasingDocumentHistory.matnr                                                                as Material,
          @Semantics.currencyCode:true
          @ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
          PurchasingDocumentHistory.hswae                                                                as CompanyCodeCurrency,
          @Semantics.unitOfMeasure: true
          @ObjectModel.foreignKey.association: '_OrderQuantityUnit'
          PurchasingDocumentItem.OrderQuantityUnit                                                       as OrderQuantityUnit,


          _LogicalSystem,
          _CFinPurchasingDocumentItem,
          _OrderQuantityUnit,
          _Currency,
          _CompanyCodeCurrency

}