C_PurContrVersionCompareHdr
Header Data for Version Comparison
C_PurContrVersionCompareHdr is a Consumption CDS View that provides data about "Header Data for Version Comparison" in SAP S/4HANA. It reads from 1 data source (C_PurContrVersionHistory) and exposes 23 fields with key fields PurchaseContractVersionOne, PurchaseContractVersionTwo. It has 1 association to related views. Part of development package ODATA_MM_CTR_MAINTAIN.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| C_PurContrVersionHistory | C_PurContrVersionHistory | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | C_PurContrVersionCompareItm | _VersionComparison | $projection.PurchaseContractVersionOne = _VersionComparison.PurContrVersOneComprnVal and $projection.PurchaseContractVersionTwo = _VersionComparison.PurContrVersTwoComprnVal |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CPCVERCOMPHDR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Header Data for Version Comparison | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.query.implementedBy | ABAP:CL_MMPUR_CTR_VERS_COMP_HDR | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view |
Fields (23)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseContractVersionOne | |||
| KEY | PurchaseContractVersionTwo | |||
| ValidityStartDate | ||||
| CreatedByUser | ||||
| CreationDate | ||||
| PurchasingDocumentTypeName | ||||
| PurchaseContractType | ||||
| PurchasingOrganizationName | ||||
| PurchasingOrganization | ||||
| CompanyCodeName | ||||
| CompanyCode | ||||
| SupplierName | ||||
| Supplier | ||||
| PurchasingDocumentVersion | ||||
| PurchaseContract | ||||
| ChangeRequestNote | ||||
| PurchaseContractDescription | ||||
| PurchasingDocFirstVersion | ||||
| PurchasingDocSecondVersion | ||||
| PurgDocFirstVersTypeText | ||||
| PurgDocSecondVersTypeText | ||||
| HasNote | ||||
| _VersionComparison | _VersionComparison |
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_PurContrVersionCompareHdr.
-- 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: CPCVERCOMPHDR
CREATE VIEW C_PurContrVersionCompareHdr AS
SELECT
cast('' as ebeln_ad) AS PurchaseContractVersionOne,
cast('' as ebeln_ad) AS PurchaseContractVersionTwo,
cast('' as kdatb) AS ValidityStartDate,
cast('' as ernam) AS CreatedByUser,
cast('' as erdat) AS CreationDate,
cast('' as batxt) AS PurchasingDocumentTypeName,
cast('' as esart) AS PurchaseContractType,
cast('' as mm_a_purg_org_name) AS PurchasingOrganizationName,
cast('' as ekorg) AS PurchasingOrganization,
cast('' as butxt) AS CompanyCodeName,
cast('' as bukrs) AS CompanyCode,
cast('' as md_supplier_name) AS SupplierName,
cast('' as md_supplier) AS Supplier,
cast('' as revno) AS PurchasingDocumentVersion,
cast('' as vdm_purchasecontract) AS PurchaseContract,
cast('' as val_text) AS ChangeRequestNote,
cast('' as contract_description) AS PurchaseContractDescription,
cast('' as revno) AS PurchasingDocFirstVersion,
cast('' as revno) AS PurchasingDocSecondVersion,
cast('' as val_text) AS PurgDocFirstVersTypeText,
cast('' as val_text) AS PurgDocSecondVersTypeText,
cast('' as boole_d) AS HasNote
FROM C_PurContrVersionHistory
LEFT OUTER JOIN C_PurContrVersionCompareItm AS _VersionComparison ON PurchaseContractVersionOne = _VersionComparison.PurContrVersOneComprnVal AND PurchaseContractVersionTwo = _VersionComparison.PurContrVersTwoComprnVal -- association [0..*]
;
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