I_CFinPurchasingDocHistory
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 3 data sources (I_CFinRpldPurgDocHistory, P_CFinLocalPurgDocHistory, I_PurchasingDocumentItem) and exposes 46 fields with key fields SenderLogicalSystem, CFinPurchasingDocument, CFinPurchasingDocumentItem, CFinPurgDocAccountAssignment, PurchaseOrderTransactionType. It has 5 associations to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CFinRpldPurgDocHistory | CFinRpldPurgDocHistory | from |
| P_CFinLocalPurgDocHistory | PurchasingDocumentHistory | union_all |
| I_PurchasingDocumentItem | PurchasingDocumentItem | inner |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_CFinPurchasingDocumentItem | _CFinPurchasingDocumentItem | $projection.SenderLogicalSystem = _CFinPurchasingDocumentItem.SenderLogicalSystem and $projection.CFinPurchasingDocument = _CFinPurchasingDocumentItem.CFinPurchasingDocument and $projection.CFinPurchasingDocumentItem = _CFinPurchasingDocumentItem.CFinPurchasingDocumentItem |
| [0..1] | I_LogicalSystem | _LogicalSystem | $projection.SenderLogicalSystem = _LogicalSystem.LogicalSystem |
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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 | #L | view |
Fields (46)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SenderLogicalSystem | I_CFinRpldPurgDocHistory | SenderLogicalSystem | |
| KEY | CFinPurchasingDocument | |||
| KEY | CFinPurchasingDocumentItem | |||
| KEY | CFinPurgDocAccountAssignment | |||
| KEY | PurchaseOrderTransactionType | PurchaseOrderTransactionType | ||
| KEY | MaterialDocumentYear | MaterialDocumentYear | ||
| KEY | CFinMaterialDocument | |||
| KEY | CFinMaterialDocumentItem | |||
| PostingDate | I_CFinRpldPurgDocHistory | PostingDate | ||
| Quantity | I_CFinRpldPurgDocHistory | Quantity | ||
| PurOrdAmountInCompanyCodeCrcy | I_CFinRpldPurgDocHistory | PurOrdAmountInCompanyCodeCrcy | ||
| PurchaseOrderAmount | I_CFinRpldPurgDocHistory | PurchaseOrderAmount | ||
| Currency | I_CFinRpldPurgDocHistory | Currency | ||
| DebitCreditCode | I_CFinRpldPurgDocHistory | DebitCreditCode | ||
| AccountingDocumentCreationDate | I_CFinRpldPurgDocHistory | AccountingDocumentCreationDate | ||
| TimeEntry | I_CFinRpldPurgDocHistory | TimeEntry | ||
| Material | I_CFinRpldPurgDocHistory | Material | ||
| CompanyCodeCurrency | I_CFinRpldPurgDocHistory | CompanyCodeCurrency | ||
| OrderQuantityUnit | I_CFinRpldPurgDocHistory | OrderQuantityUnit | ||
| _LogicalSystem | I_CFinRpldPurgDocHistory | _LogicalSystem | ||
| _CFinPurchasingDocumentItem | _CFinPurchasingDocumentItem | |||
| _OrderQuantityUnit | _OrderQuantityUnit | |||
| _Currency | _Currency | |||
| KEY | CFinPurchasingDocument | |||
| KEY | CFinPurchasingDocumentItem | |||
| KEY | CFinPurgDocAccountAssignment | |||
| KEY | PurchaseOrderTransactionType | P_CFinLocalPurgDocHistory | vgabe | |
| KEY | MaterialDocumentYear | P_CFinLocalPurgDocHistory | gjahr | |
| KEY | CFinMaterialDocument | |||
| KEY | CFinMaterialDocumentItem | |||
| PostingDate | P_CFinLocalPurgDocHistory | budat | ||
| Quantity | P_CFinLocalPurgDocHistory | menge | ||
| PurOrdAmountInCompanyCodeCrcy | P_CFinLocalPurgDocHistory | dmbtr | ||
| PurchaseOrderAmount | P_CFinLocalPurgDocHistory | wrbtr | ||
| Currency | P_CFinLocalPurgDocHistory | waers | ||
| DebitCreditCode | P_CFinLocalPurgDocHistory | shkzg | ||
| AccountingDocumentCreationDate | P_CFinLocalPurgDocHistory | cpudt | ||
| TimeEntry | P_CFinLocalPurgDocHistory | cputm | ||
| Material | P_CFinLocalPurgDocHistory | matnr | ||
| CompanyCodeCurrency | P_CFinLocalPurgDocHistory | 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: #L
}
}
/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ] } */
define view I_CFinPurchasingDocHistory
as select from I_CFinRpldPurgDocHistory as CFinRpldPurgDocHistory
association [1..1] to I_CFinPurchasingDocumentItem as _CFinPurchasingDocumentItem on $projection.SenderLogicalSystem = _CFinPurchasingDocumentItem.SenderLogicalSystem
and $projection.CFinPurchasingDocument = _CFinPurchasingDocumentItem.CFinPurchasingDocument
and $projection.CFinPurchasingDocumentItem = _CFinPurchasingDocumentItem.CFinPurchasingDocumentItem
{
@ObjectModel.foreignKey.association: '_LogicalSystem'
key CFinRpldPurgDocHistory.SenderLogicalSystem,
@ObjectModel.foreignKey.association: '_CFinPurchasingDocumentItem'
key cast( CFinRpldPurchasingDocument as fins_cfin_av_purchasing_doc preserving type ) as CFinPurchasingDocument,
key cast( CFinRpldPurchasingDocumentItem as fins_cfin_av_purg_document_itm preserving type ) as CFinPurchasingDocumentItem,
key cast( CFinRpldPurgDocAcctAssgmt as fins_cfin_av_purg_doc_acctasgt preserving type ) as CFinPurgDocAccountAssignment,
key PurchaseOrderTransactionType,
key MaterialDocumentYear,
key cast( CFinSourceMaterialDocument as fins_cfin_av_matl_doc preserving type ) as CFinMaterialDocument,
key cast( CFinSourceMaterialDocumentItem as fins_cfin_av_matl_doc_item preserving type ) as CFinMaterialDocumentItem,
CFinRpldPurgDocHistory.PostingDate,
@Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
CFinRpldPurgDocHistory.Quantity,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
CFinRpldPurgDocHistory.PurOrdAmountInCompanyCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
CFinRpldPurgDocHistory.PurchaseOrderAmount,
@Semantics.currencyCode:true
@ObjectModel.foreignKey.association: '_Currency'
CFinRpldPurgDocHistory.Currency,
CFinRpldPurgDocHistory.DebitCreditCode,
CFinRpldPurgDocHistory.AccountingDocumentCreationDate,
CFinRpldPurgDocHistory.TimeEntry,
CFinRpldPurgDocHistory.Material,
@Semantics.currencyCode:true
@ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
CFinRpldPurgDocHistory.CompanyCodeCurrency,
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_OrderQuantityUnit'
CFinRpldPurgDocHistory.OrderQuantityUnit,
CFinRpldPurgDocHistory._LogicalSystem,
_CFinPurchasingDocumentItem,
_OrderQuantityUnit,
_Currency,
_CompanyCodeCurrency
}
union all select from P_CFinLocalPurgDocHistory 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
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CFINRPLDPURGDOCHISTORY",
"I_PURCHASINGDOCUMENTITEM",
"P_CFINLOCALPURGDOCHISTORY"
],
"ASSOCIATED":
[
"I_CFINPURCHASINGDOCUMENTITEM",
"I_CURRENCY",
"I_LOGICALSYSTEM",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_CFINRPLDPURGDOCHISTORY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA