A_CntrlPurContrVersionHistory
Version History
A_CntrlPurContrVersionHistory is a Composite CDS View that provides data about "Version History" in SAP S/4HANA. It reads from 1 data source (I_CntrlPurContrVersionHistory) and exposes 50 fields with key fields CentralPurchaseContract, PurchasingDocumentVersion. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CntrlPurContrVersionHistory | I_CntrlPurContrVersionHistory | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..*] | A_CntrlPurchaseContractItem | _CentralPurchaseContractItem | $projection.ActivePurchasingDocument = _CentralPurchaseContractItem.CentralPurchaseContract |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ACNTRLPCTRVH | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| EndUserText.label | Version History | view |
Fields (50)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CentralPurchaseContract | ActivePurchasingDocument | Active Purchase Doc | |
| KEY | PurchasingDocumentVersion | PurchasingDocumentVersion | Version | |
| ActivePurchasingDocument | CentralPurchaseContract | Purchasing Doc. | ||
| PurchaseContractType | PurchaseContractType | Order Type | ||
| PurchasingDocumentCategory | PurchasingDocumentCategory | Doc. Category | ||
| Supplier | Supplier | Supplier | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| ValidityStartDate | ValidityStartDate | Validity Start Date | ||
| ValidityEndDate | ValidityEndDate | ValidTo | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| ChangeRequestNote | _VersionType | ChangeRequestNote | Short Description | |
| CreatedByUser | CreatedByUser | User Name | ||
| CreatedByUserDescription | ||||
| CreationDate | CreationDate | Time Stamp | ||
| CreationTime | CreationTime | Time of Change | ||
| PurchasingDocVersionReasonCode | PurchasingDocVersionReasonCode | Reason | ||
| PurchasingDocVersionStatus | PurchasingDocVersionStatus | Version status | ||
| Currency | Currency | Valuation Crcy | ||
| IncotermsClassification | IncotermsClassification | Incoterms | ||
| IncotermsTransferLocation | IncotermsTransferLocation | Incoterms 2 | ||
| IncotermsVersion | IncotermsVersion | Inco. Version | ||
| IncotermsLocation1 | IncotermsLocation1 | Inco. Location1 | ||
| IncotermsLocation2 | IncotermsLocation2 | Inco. Location2 | ||
| PurchasingDocumentName | PurchasingDocumentName | Purch. Doc. Name | ||
| PaymentTerms | PaymentTerms | Pyt Terms | ||
| CashDiscount1Days | CashDiscount1Days | Days from Baseline Date for Payment | ||
| CashDiscount2Days | CashDiscount2Days | Days from Baseline Date for Payment | ||
| NetPaymentDays | NetPaymentDays | Net Pmt Terms Period | ||
| CashDiscount1Percent | CashDiscount1Percent | Disc. Percent 1 | ||
| CashDiscount2Percent | CashDiscount2Percent | Disc. Percent 2 | ||
| PurchaseContractTargetAmount | PurchaseContractTargetAmount | Target Value | ||
| ReleaseCode | ReleaseCode | Release ind. | ||
| PurchasingDocumentDeletionCode | PurchasingDocumentDeletionCode | Del. Indicator | ||
| SupplyingSupplier | SupplyingSupplier | Goods Supplier | ||
| ExchangeRateIsFixed | ExchangeRateIsFixed | Fixed Exch.Rate | ||
| QuotationSubmissionDate | QuotationSubmissionDate | Quotation Date | ||
| SupplierQuotation | SupplierQuotation | RFQ | ||
| CorrespncExternalReference | CorrespncExternalReference | Your Reference | ||
| CorrespncInternalReference | CorrespncInternalReference | Our Reference | ||
| SupplierRespSalesPersonName | SupplierRespSalesPersonName | Salesperson | ||
| SupplierPhoneNumber | SupplierPhoneNumber | Telephone | ||
| LastChangeDateTime | LastChangeDateTime | Timestamp | ||
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | Busin. Purp. Cmpltd. | ||
| PurchasingProcessingStatus | PurchasingProcessingStatus | Proc. State | ||
| CntrlPurContrOvrlDistrStsTxt | _CntrlPurContrAggrgnDistrSts | CntrlPurContrDistributionSts | ||
| CntrlPurContrFlxblDistrIsAllwd | CntrlPurContrFlxblDistrIsAllwd | Boolean Variable (X = True, - = False, Space = Unknown) | ||
| PurgDocChangeRequestStatus | PurgDocChangeRequestStatus | Change Request Stat. | ||
| _CentralPurchaseContractItem | _CentralPurchaseContractItem |
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 A_CntrlPurContrVersionHistory.
-- 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: ACNTRLPCTRVH
CREATE VIEW A_CntrlPurContrVersionHistory AS
SELECT
ActivePurchasingDocument AS CentralPurchaseContract,
PurchasingDocumentVersion,
CentralPurchaseContract AS ActivePurchasingDocument,
PurchaseContractType,
PurchasingDocumentCategory,
Supplier,
CompanyCode,
PurchasingOrganization,
PurchasingGroup,
ValidityStartDate,
ValidityEndDate,
DocumentCurrency,
_VersionType.ChangeRequestNote AS ChangeRequestNote,
CreatedByUser,
cast( _UserDetails.UserDescription as mmpur_user_name ) AS CreatedByUserDescription,
CreationDate,
CreationTime,
PurchasingDocVersionReasonCode,
PurchasingDocVersionStatus,
Currency,
IncotermsClassification,
IncotermsTransferLocation,
IncotermsVersion,
IncotermsLocation1,
IncotermsLocation2,
PurchasingDocumentName,
PaymentTerms,
CashDiscount1Days,
CashDiscount2Days,
NetPaymentDays,
CashDiscount1Percent,
CashDiscount2Percent,
PurchaseContractTargetAmount,
ReleaseCode,
PurchasingDocumentDeletionCode,
SupplyingSupplier,
ExchangeRateIsFixed,
QuotationSubmissionDate,
SupplierQuotation,
CorrespncExternalReference,
CorrespncInternalReference,
SupplierRespSalesPersonName,
SupplierPhoneNumber,
LastChangeDateTime,
IsEndOfPurposeBlocked,
PurchasingProcessingStatus,
_CntrlPurContrAggrgnDistrSts.CntrlPurContrDistributionSts AS CntrlPurContrOvrlDistrStsTxt,
CntrlPurContrFlxblDistrIsAllwd,
PurgDocChangeRequestStatus
FROM I_CntrlPurContrVersionHistory
LEFT OUTER JOIN A_CntrlPurchaseContractItem AS _CentralPurchaseContractItem ON ActivePurchasingDocument = _CentralPurchaseContractItem.CentralPurchaseContract -- association [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