I_PurchaseContractVersion
Purchase Contract Version
I_PurchaseContractVersion is a Composite CDS View that provides data about "Purchase Contract Version" in SAP S/4HANA. It reads from 1 data source (R_PurchaseContract) and exposes 76 fields with key field PurchaseContract. It has 11 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| R_PurchaseContract | R_PurchaseContract | from |
Associations (11)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..*] | I_PurchaseContractItem | _PurchaseContractItem | $projection.PurchaseContract = _PurchaseContractItem.PurchaseContract |
| [1..*] | I_PurchaseContractHistory | _PurchaseContractHistory | $projection.PurchaseContract = _PurchaseContractHistory.PurchaseContract |
| [1..1] | I_ReleaseCode | _ReleaseCode | $projection.ReleaseCode = _ReleaseCode.ReleaseCode |
| [0..*] | I_PurchasingDocumentTypeText | _PurchasingDocumentTypeText | $projection.PurchaseContractType = _PurchasingDocumentTypeText.PurchasingDocumentType |
| [0..*] | I_Purctrnotes | _PurCtrNotes | $projection.PurchaseContract = _PurCtrNotes.PurchaseContract |
| [0..*] | I_Purctrpartners | _PurCtrPartners | $projection.PurchaseContract = _PurCtrPartners.PurchaseContract |
| [1..1] | I_PurContrVersionType | _VersionType | $projection.PurgDocChangeRequestStatus = _VersionType.PurgDocChangeRequestStatus ----Extension |
| [1..1] | E_PurchasingDocument | _PurchasingDocument | $projection.PurchaseContract = _PurchasingDocument.PurchasingDocument |
| [0..1] | I_PurContrVersionHistory | _PurContrVersionHistory | $projection.PurchaseContract = _PurContrVersionHistory.PurchaseContract |
| [0..1] | I_PurgDocVersionReasonValHelp | _VersionReasonValHelp | $projection.purchasingdocversionreasoncode = _VersionReasonValHelp.PurchasingDocVersionReasonCode |
| [0..1] | I_PurContrVersRelevance | _VersionRelevance | $projection.PurchaseContract = _VersionRelevance.PurchaseContract |
Annotations (15)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IPURCHASECTRVER | view | |
| AbapCatalog.preserveKey | true | view | |
| EndUserText.label | Purchase Contract Version | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.uniqueIdField | PurchaseContract | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.representativeKey | PurchaseContract | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.entityChangeStateId | LastChangeDateTime | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view |
Fields (76)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseContract | PurchaseContract | Purchasing Doc. | |
| PurchaseContractType | PurchaseContractType | Order Type | ||
| PurchasingDocumentCategory | PurchasingDocumentCategory | Doc. Category | ||
| LastChangeDateTime | LastChangeDateTime | Timestamp | ||
| CreationDate | CreationDate | Time Stamp | ||
| Supplier | Supplier | Supplier | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| IncotermsClassification | IncotermsClassification | Incoterms | ||
| IncotermsTransferLocation | IncotermsTransferLocation | Incoterms 2 | ||
| 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 | ||
| ValidityStartDate | ValidityStartDate | Validity Start Date | ||
| ValidityEndDate | ValidityEndDate | ValidTo | ||
| ReleaseCode | ReleaseCode | Release ind. | ||
| CreatedByUser | CreatedByUser | User Name | ||
| PurchasingDocumentDeletionCode | PurchasingDocumentDeletionCode | Del. Indicator | ||
| SupplyingSupplier | SupplyingSupplier | Goods Supplier | ||
| InvoicingParty | InvoicingParty | Supplier | ||
| ExchangeRate | ExchangeRate | Exchange rate | ||
| 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 | ||
| IncotermsVersion | IncotermsVersion | Inco. Version | ||
| IncotermsLocation1 | IncotermsLocation1 | Inco. Location1 | ||
| IncotermsLocation2 | IncotermsLocation2 | Inco. Location2 | ||
| IncotermsSupChnLoc1AddlUUID | IncotermsSupChnLoc1AddlUUID | Location UUID | ||
| IncotermsSupChnLoc2AddlUUID | IncotermsSupChnLoc2AddlUUID | Location UUID | ||
| IncotermsSupChnDvtgLocAddlUUID | IncotermsSupChnDvtgLocAddlUUID | Location UUID | ||
| PurchasingDocumentName | PurchasingDocumentName | Purch. Doc. Name | ||
| PurchasingDocumentOrigin | PurchasingDocumentOrigin | Status | ||
| ReleaseIsNotCompleted | ReleaseIsNotCompleted | Subj.to Release | ||
| PurchasingProcessingStatus | PurchasingProcessingStatus | Proc. State | ||
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | Busin. Purp. Cmpltd. | ||
| PurgDocExternalReference | PurgDocExternalReference | Ext. Reference ID | ||
| PurgAggrgdProdCmplncSuplrSts | PurgAggrgdProdCmplncSuplrSts | Supplier Check Sts | ||
| PurgAggrgdProdMarketabilitySts | PurgAggrgdProdMarketabilitySts | Prod. Marktablty Sts | ||
| PurgAggrgdSftyDataSheetStatus | PurgAggrgdSftyDataSheetStatus | Sfty Data Sheet Sts | ||
| PurgProdCmplncTotDngrsGoodsSts | PurgProdCmplncTotDngrsGoodsSts | Dangerous Goods Sts | ||
| PurgHasCatalogRelevantItems | PurgHasCatalogRelevantItems | Ctlg Item Rlvt Doc | ||
| ActivePurchasingDocument | ActivePurchasingDocument | Active Purchase Doc | ||
| PurchasingDocumentVersion | PurchasingDocumentVersion | Version | ||
| PurgDocChangeRequestStatus | PurgDocChangeRequestStatus | Change Request Stat. | ||
| PurgDocIsChgVers | PurgDocIsChgVers | Checkbox | ||
| PurchasingDocVersionReasonCode | _PurContrVersionHistory | PurchasingDocVersionReasonCode | Reason | |
| VersionIsEnabled | _VersionRelevance | VersionIsEnabled | ||
| _PurchasingDocumentCategory | _PurchasingDocumentCategory | |||
| _PurchasingDocumentType | _PurchasingDocumentType | |||
| _IncotermsClassification | _IncotermsClassification | |||
| _Supplier | _Supplier | |||
| _CompanyCode | _CompanyCode | |||
| _PurchasingOrganization | _PurchasingOrganization | |||
| _PurchasingGroup | _PurchasingGroup | |||
| _CreatedByUser | _CreatedByUser | |||
| _DocumentCurrency | _DocumentCurrency | |||
| _ReleaseCode | _ReleaseCode | |||
| _SupplyingSupplier | _SupplyingSupplier | |||
| _InvoicingParty | _InvoicingParty | |||
| _PaymentTerms | _PaymentTerms | |||
| _VersionType | _VersionType | |||
| _VersionReasonValHelp | _VersionReasonValHelp | |||
| _VersionRelevance | _VersionRelevance | |||
| _PurchaseContractItem | _PurchaseContractItem | |||
| _PurCtrNotes | _PurCtrNotes | |||
| _PurCtrPartners | _PurCtrPartners |
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_PurchaseContractVersion.
-- 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: IPURCHASECTRVER
CREATE VIEW I_PurchaseContractVersion AS
SELECT
PurchaseContract,
PurchaseContractType,
PurchasingDocumentCategory,
LastChangeDateTime,
CreationDate,
Supplier,
CompanyCode,
PurchasingOrganization,
PurchasingGroup,
DocumentCurrency,
IncotermsClassification,
IncotermsTransferLocation,
PaymentTerms,
CashDiscount1Days,
CashDiscount2Days,
NetPaymentDays,
CashDiscount1Percent,
CashDiscount2Percent,
PurchaseContractTargetAmount,
ValidityStartDate,
ValidityEndDate,
ReleaseCode,
CreatedByUser,
PurchasingDocumentDeletionCode,
SupplyingSupplier,
InvoicingParty,
ExchangeRate,
ExchangeRateIsFixed,
QuotationSubmissionDate,
SupplierQuotation,
CorrespncExternalReference,
CorrespncInternalReference,
SupplierRespSalesPersonName,
SupplierPhoneNumber,
IncotermsVersion,
IncotermsLocation1,
IncotermsLocation2,
IncotermsSupChnLoc1AddlUUID,
IncotermsSupChnLoc2AddlUUID,
IncotermsSupChnDvtgLocAddlUUID,
PurchasingDocumentName,
PurchasingDocumentOrigin,
ReleaseIsNotCompleted,
PurchasingProcessingStatus,
IsEndOfPurposeBlocked,
PurgDocExternalReference,
PurgAggrgdProdCmplncSuplrSts,
PurgAggrgdProdMarketabilitySts,
PurgAggrgdSftyDataSheetStatus,
PurgProdCmplncTotDngrsGoodsSts,
PurgHasCatalogRelevantItems,
ActivePurchasingDocument,
PurchasingDocumentVersion,
PurgDocChangeRequestStatus,
PurgDocIsChgVers,
_PurContrVersionHistory.PurchasingDocVersionReasonCode AS PurchasingDocVersionReasonCode,
_VersionRelevance.VersionIsEnabled AS VersionIsEnabled
FROM R_PurchaseContract
LEFT OUTER JOIN I_PurchaseContractItem AS _PurchaseContractItem ON PurchaseContract = _PurchaseContractItem.PurchaseContract -- association [1..*]
LEFT OUTER JOIN I_PurchaseContractHistory AS _PurchaseContractHistory ON PurchaseContract = _PurchaseContractHistory.PurchaseContract -- association [1..*]
LEFT OUTER JOIN I_ReleaseCode AS _ReleaseCode ON ReleaseCode = _ReleaseCode.ReleaseCode -- association [1..1]
LEFT OUTER JOIN I_PurchasingDocumentTypeText AS _PurchasingDocumentTypeText ON PurchaseContractType = _PurchasingDocumentTypeText.PurchasingDocumentType -- association [0..*]
LEFT OUTER JOIN I_Purctrnotes AS _PurCtrNotes ON PurchaseContract = _PurCtrNotes.PurchaseContract -- association [0..*]
LEFT OUTER JOIN I_Purctrpartners AS _PurCtrPartners ON PurchaseContract = _PurCtrPartners.PurchaseContract -- association [0..*]
LEFT OUTER JOIN I_PurContrVersionType AS _VersionType ON PurgDocChangeRequestStatus = _VersionType.PurgDocChangeRequestStatus -- association [1..1]
LEFT OUTER JOIN E_PurchasingDocument AS _PurchasingDocument ON PurchaseContract = _PurchasingDocument.PurchasingDocument -- association [1..1]
LEFT OUTER JOIN I_PurContrVersionHistory AS _PurContrVersionHistory ON PurchaseContract = _PurContrVersionHistory.PurchaseContract -- association [0..1]
LEFT OUTER JOIN I_PurgDocVersionReasonValHelp AS _VersionReasonValHelp ON purchasingdocversionreasoncode = _VersionReasonValHelp.PurchasingDocVersionReasonCode -- association [0..1]
LEFT OUTER JOIN I_PurContrVersRelevance AS _VersionRelevance ON PurchaseContract = _VersionRelevance.PurchaseContract -- association [0..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