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 | Sender Logical System |
| KEY | CFinPurchasingDocument | Purchasing Doc. | ||
| KEY | CFinPurchasingDocumentItem | Item | ||
| KEY | CFinPurgDocAccountAssignment | |||
| KEY | PurchaseOrderTransactionType | PurchaseOrderTransactionType | Transact. Type | |
| KEY | MaterialDocumentYear | MaterialDocumentYear | Settlement Year | |
| KEY | CFinMaterialDocument | |||
| KEY | CFinMaterialDocumentItem | |||
| PostingDate | I_CFinRpldPurgDocHistory | PostingDate | Posting Date | |
| Quantity | I_CFinRpldPurgDocHistory | Quantity | WarrCountValue | |
| PurOrdAmountInCompanyCodeCrcy | I_CFinRpldPurgDocHistory | PurOrdAmountInCompanyCodeCrcy | Loc. amount | |
| PurchaseOrderAmount | I_CFinRpldPurgDocHistory | PurchaseOrderAmount | Gross Amount | |
| Currency | I_CFinRpldPurgDocHistory | Currency | Transaction Currency | |
| DebitCreditCode | I_CFinRpldPurgDocHistory | DebitCreditCode | Returns | |
| AccountingDocumentCreationDate | I_CFinRpldPurgDocHistory | AccountingDocumentCreationDate | Imported On | |
| TimeEntry | I_CFinRpldPurgDocHistory | TimeEntry | Time | |
| Material | I_CFinRpldPurgDocHistory | Material | Vehicle Model | |
| CompanyCodeCurrency | I_CFinRpldPurgDocHistory | CompanyCodeCurrency | Local currency | |
| OrderQuantityUnit | I_CFinRpldPurgDocHistory | OrderQuantityUnit | Sales Unit | |
| _LogicalSystem | I_CFinRpldPurgDocHistory | _LogicalSystem | ||
| _CFinPurchasingDocumentItem | _CFinPurchasingDocumentItem | |||
| _OrderQuantityUnit | _OrderQuantityUnit | |||
| _Currency | _Currency | |||
| KEY | CFinPurchasingDocument | Purchasing Doc. | ||
| KEY | CFinPurchasingDocumentItem | Item | ||
| KEY | CFinPurgDocAccountAssignment | |||
| KEY | PurchaseOrderTransactionType | P_CFinLocalPurgDocHistory | vgabe | Transact. Type |
| KEY | MaterialDocumentYear | P_CFinLocalPurgDocHistory | gjahr | Settlement Year |
| KEY | CFinMaterialDocument | |||
| KEY | CFinMaterialDocumentItem | |||
| PostingDate | P_CFinLocalPurgDocHistory | budat | Posting Date | |
| Quantity | P_CFinLocalPurgDocHistory | menge | WarrCountValue | |
| PurOrdAmountInCompanyCodeCrcy | P_CFinLocalPurgDocHistory | dmbtr | Loc. amount | |
| PurchaseOrderAmount | P_CFinLocalPurgDocHistory | wrbtr | Gross Amount | |
| Currency | P_CFinLocalPurgDocHistory | waers | Transaction Currency | |
| DebitCreditCode | P_CFinLocalPurgDocHistory | shkzg | Returns | |
| AccountingDocumentCreationDate | P_CFinLocalPurgDocHistory | cpudt | Imported On | |
| TimeEntry | P_CFinLocalPurgDocHistory | cputm | Time | |
| Material | P_CFinLocalPurgDocHistory | matnr | Vehicle Model | |
| CompanyCodeCurrency | P_CFinLocalPurgDocHistory | hswae | Local currency | |
| OrderQuantityUnit | I_PurchasingDocumentItem | OrderQuantityUnit | Sales Unit | |
| _LogicalSystem | _LogicalSystem | |||
| _CFinPurchasingDocumentItem | _CFinPurchasingDocumentItem | |||
| _OrderQuantityUnit | _OrderQuantityUnit | |||
| _Currency | _Currency | |||
| _CompanyCodeCurrency | _CompanyCodeCurrency |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view I_CFinPurchasingDocHistory.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
CREATE VIEW I_CFinPurchasingDocHistory AS
SELECT
CFinRpldPurgDocHistory.SenderLogicalSystem AS SenderLogicalSystem,
cast( CFinRpldPurchasingDocument as fins_cfin_av_purchasing_doc preserving type ) AS CFinPurchasingDocument,
cast( CFinRpldPurchasingDocumentItem as fins_cfin_av_purg_document_itm preserving type ) AS CFinPurchasingDocumentItem,
cast( CFinRpldPurgDocAcctAssgmt as fins_cfin_av_purg_doc_acctasgt preserving type ) AS CFinPurgDocAccountAssignment,
PurchaseOrderTransactionType,
MaterialDocumentYear,
cast( CFinSourceMaterialDocument as fins_cfin_av_matl_doc preserving type ) AS CFinMaterialDocument,
cast( CFinSourceMaterialDocumentItem as fins_cfin_av_matl_doc_item preserving type ) AS CFinMaterialDocumentItem,
CFinRpldPurgDocHistory.PostingDate AS PostingDate,
CFinRpldPurgDocHistory.Quantity AS Quantity,
CFinRpldPurgDocHistory.PurOrdAmountInCompanyCodeCrcy AS PurOrdAmountInCompanyCodeCrcy,
CFinRpldPurgDocHistory.PurchaseOrderAmount AS PurchaseOrderAmount,
CFinRpldPurgDocHistory.Currency AS Currency,
CFinRpldPurgDocHistory.DebitCreditCode AS DebitCreditCode,
CFinRpldPurgDocHistory.AccountingDocumentCreationDate AS AccountingDocumentCreationDate,
CFinRpldPurgDocHistory.TimeEntry AS TimeEntry,
CFinRpldPurgDocHistory.Material AS Material,
CFinRpldPurgDocHistory.CompanyCodeCurrency AS CompanyCodeCurrency,
CFinRpldPurgDocHistory.OrderQuantityUnit AS OrderQuantityUnit,
CFinRpldPurgDocHistory._LogicalSystem AS _LogicalSystem
FROM I_CFinRpldPurgDocHistory AS CFinRpldPurgDocHistory
INNER JOIN I_PurchasingDocumentItem AS PurchasingDocumentItem ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CFinPurchasingDocumentItem AS _CFinPurchasingDocumentItem ON SenderLogicalSystem = _CFinPurchasingDocumentItem.SenderLogicalSystem AND CFinPurchasingDocument = _CFinPurchasingDocumentItem.CFinPurchasingDocument AND CFinPurchasingDocumentItem = _CFinPurchasingDocumentItem.CFinPurchasingDocumentItem -- association [1..1]
LEFT OUTER JOIN I_LogicalSystem AS _LogicalSystem ON SenderLogicalSystem = _LogicalSystem.LogicalSystem -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _OrderQuantityUnit ON OrderQuantityUnit = _OrderQuantityUnit.UnitOfMeasure -- association [0..1]
LEFT OUTER JOIN I_Currency AS _Currency ON Currency = _Currency.Currency -- association [0..1]
LEFT OUTER JOIN I_Currency AS _CompanyCodeCurrency ON CompanyCodeCurrency = _CompanyCodeCurrency.Currency -- association [0..1]
-- UNION ALL with additional select branch(es): P_CFinLocalPurgDocHistory
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA