C_ContractHistoryFs
Purchase Order
C_ContractHistoryFs is a Consumption CDS View that provides data about "Purchase Order" in SAP S/4HANA. It reads from 1 data source (I_PurchaseContractHistory) and exposes 30 fields with key fields PurchaseContract, PurchaseContractItem, ReleaseOrder, ReleaseOrderItem. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchaseContractHistory | I_PurchaseContractHistory | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_PurchaseOrderEnhanced | _PurchaseOrder | $projection.ReleaseOrder = _PurchaseOrder.PurchaseOrder |
| [1..1] | I_PurchaseContractItem | _PurchaseContract | $projection.PurchaseContract = _PurchaseContract.PurchaseContract and $projection.PurchaseContractItem = _PurchaseContract.PurchaseContractItem |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CCTRHISTORYFS | view | |
| ClientDependent | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| EndUserText.label | Purchase Order | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| UI.headerInfo.title.value | ReleaseOrder | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (30)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseContract | PurchaseContract | Purchasing Doc. | |
| KEY | PurchaseContractItem | PurchaseContractItem | Item | |
| KEY | ReleaseOrder | ReleaseOrder | Purchasing Doc. | |
| KEY | ReleaseOrderItem | ReleaseOrderItem | Item | |
| ReleaseOrderItemOrderQuantity | ReleaseOrderItemOrderQuantity | PO Quantity | ||
| ReleaseOrderItemNetAmount | ReleaseOrderItemNetAmount | Net Value | ||
| ReleaseOrderItemIsDeleted | ReleaseOrderItemIsDeleted | Del. Indicator | ||
| ReleaseOrderDate | PO Date | |||
| ReleaseOrderItemQuantityUnit | ReleaseOrderItemQuantityUnit | Order Unit | ||
| ReleaseOrderCurrency | ReleaseOrderCurrency | Currency | ||
| ReleaseOrderItemLastChgDate | ReleaseOrderItemLastChgDate | Changed On | ||
| PurchaseOrderType | _PurchaseOrder | PurchaseOrderType | PO Type | |
| PurchasingDocumentCategory | ||||
| PurchasingDocumentType | ||||
| Supplier | _PurchaseOrder | Supplier | Supplier | |
| SupplierName | ||||
| SupplierAddressID | _PurchaseOrder | SupplierAddressID | Address Number | |
| SupplyingSupplier | _PurchaseOrder | SupplyingSupplier | Goods Supplier | |
| SupplyingPlant | _PurchaseOrder | SupplyingPlant | Supplying Plant | |
| InvoicingParty | _PurchaseOrder | InvoicingParty | Supplier | |
| PurchasingDocumentStatus | ||||
| _Text | ||||
| _StatusText | ||||
| _SupplyingSupplier | _PurchaseOrder | _SupplyingSupplier | ||
| _SupplyingPlant | _PurchaseOrder | _SupplyingPlant | ||
| _InvoicingParty | _PurchaseOrder | _InvoicingParty | ||
| _Supplier | _PurchaseOrder | _Supplier | ||
| AddedforDCLPlant | ||||
| PlantName | ||||
| _PurchaseContract | _PurchaseContract |
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 C_ContractHistoryFs.
-- 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.
-- SQL view name: CCTRHISTORYFS
CREATE VIEW C_ContractHistoryFs AS
SELECT
PurchaseContract,
PurchaseContractItem,
ReleaseOrder,
ReleaseOrderItem,
ReleaseOrderItemOrderQuantity,
ReleaseOrderItemNetAmount,
ReleaseOrderItemIsDeleted,
cast ( ReleaseOrderDate as ordered_on ) AS ReleaseOrderDate,
ReleaseOrderItemQuantityUnit,
ReleaseOrderCurrency,
ReleaseOrderItemLastChgDate,
_PurchaseOrder.PurchaseOrderType AS PurchaseOrderType,
cast ('F' as bstyp) AS PurchasingDocumentCategory,
_PurchaseOrder._PurchaseOrderType.PurchaseOrderType AS PurchasingDocumentType,
_PurchaseOrder.Supplier AS Supplier,
_PurchaseOrder._Supplier.SupplierName AS SupplierName,
_PurchaseOrder.SupplierAddressID AS SupplierAddressID,
_PurchaseOrder.SupplyingSupplier AS SupplyingSupplier,
_PurchaseOrder.SupplyingPlant AS SupplyingPlant,
_PurchaseOrder.InvoicingParty AS InvoicingParty,
_PurchaseOrder._Status.PurchasingDocumentStatus AS PurchasingDocumentStatus,
_PurchaseOrder._PurchaseOrderType._Text AS _Text,
_PurchaseOrder._Status._Text AS _StatusText,
_PurchaseOrder._SupplyingSupplier AS _SupplyingSupplier,
_PurchaseOrder._SupplyingPlant AS _SupplyingPlant,
_PurchaseOrder._InvoicingParty AS _InvoicingParty,
_PurchaseOrder._Supplier AS _Supplier,
_PurchaseContract._Plant.PlantName AS PlantName
FROM I_PurchaseContractHistory
LEFT OUTER JOIN I_PurchaseOrderEnhanced AS _PurchaseOrder ON ReleaseOrder = _PurchaseOrder.PurchaseOrder -- association [1..1]
LEFT OUTER JOIN I_PurchaseContractItem AS _PurchaseContract ON PurchaseContract = _PurchaseContract.PurchaseContract AND PurchaseContractItem = _PurchaseContract.PurchaseContractItem -- association [1..1]
;
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