A_CntrlPurContrVersionHistory

DDL: A_CNTRLPURCONTRVERSIONHISTORY SQL: ACNTRLPCTRVH Type: view COMPOSITE

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)

SourceAliasJoin Type
I_CntrlPurContrVersionHistory I_CntrlPurContrVersionHistory from

Associations (1)

CardinalityTargetAliasCondition
[1..*] A_CntrlPurchaseContractItem _CentralPurchaseContractItem $projection.ActivePurchasingDocument = _CentralPurchaseContractItem.CentralPurchaseContract

Annotations (13)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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..*]
;