I_CntrlPurContrVersionHistory

DDL: I_CNTRLPURCONTRVERSIONHISTORY SQL: IVERSIONHISTORY Type: view BASIC

Basic View for CCTR Version History

I_CntrlPurContrVersionHistory is a Basic CDS View that provides data about "Basic View for CCTR Version History" in SAP S/4HANA. It reads from 2 data sources (R_CentralPurchaseContract, erev) and exposes 65 fields with key field CentralPurchaseContract. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
R_CentralPurchaseContract Document inner
erev VersionHistory from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_User _UserDetails $projection.CreatedByUser = _UserDetails.UserID
[1..1] I_CntrlPurContrVersionType _VersionType $projection.PurgDocChangeRequestStatus = _VersionType.PurgDocChangeRequestStatus
[0..1] I_PaymentTermsText _PaymentTermsText $projection.PaymentTerms = _PaymentTermsText.PaymentTerms and _PaymentTermsText.Language = $session.system_language

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IVERSIONHISTORY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Basic View for CCTR Version History view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #BASIC view
AccessControl.personalData.blocking #REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (65)

KeyFieldSource TableSource FieldDescription
KEY CentralPurchaseContract R_CentralPurchaseContract CentralPurchaseContract Purchasing Doc.
PurchaseContractType R_CentralPurchaseContract PurchaseContractType Order Type
PurchasingDocumentCategory R_CentralPurchaseContract PurchasingDocumentCategory Doc. Category
Supplier R_CentralPurchaseContract Supplier Supplier
PurchasingDocumentSubtype R_CentralPurchaseContract PurchasingDocumentSubtype Control
CompanyCode R_CentralPurchaseContract CompanyCode Receiver Company Code
PurchasingOrganization R_CentralPurchaseContract PurchasingOrganization Purchasing Organization
PurchasingGroup R_CentralPurchaseContract PurchasingGroup Purchasing Group
DocumentCurrency R_CentralPurchaseContract DocumentCurrency Document Currency
Currency R_CentralPurchaseContract Currency Valuation Crcy
IncotermsClassification R_CentralPurchaseContract IncotermsClassification Incoterms
IncotermsTransferLocation R_CentralPurchaseContract IncotermsTransferLocation Incoterms 2
PaymentTerms R_CentralPurchaseContract PaymentTerms Pyt Terms
CashDiscount1Days R_CentralPurchaseContract CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days R_CentralPurchaseContract CashDiscount2Days Days from Baseline Date for Payment
NetPaymentDays R_CentralPurchaseContract NetPaymentDays Net Pmt Terms Period
CashDiscount1Percent R_CentralPurchaseContract CashDiscount1Percent Disc. Percent 1
CashDiscount2Percent R_CentralPurchaseContract CashDiscount2Percent Disc. Percent 2
PurchaseContractTargetAmount R_CentralPurchaseContract PurchaseContractTargetAmount Target Value
ValidityStartDate R_CentralPurchaseContract ValidityStartDate Validity Start Date
ValidityEndDate R_CentralPurchaseContract ValidityEndDate ValidTo
ReleaseCode R_CentralPurchaseContract ReleaseCode Release ind.
PurchasingDocumentDeletionCode R_CentralPurchaseContract PurchasingDocumentDeletionCode Del. Indicator
ManualSupplierAddressID R_CentralPurchaseContract ManualSupplierAddressID Address Number
SupplyingSupplier R_CentralPurchaseContract SupplyingSupplier Goods Supplier
InvoicingParty R_CentralPurchaseContract InvoicingParty Supplier
ExchangeRate R_CentralPurchaseContract ExchangeRate Exchange rate
ExchangeRateIsFixed R_CentralPurchaseContract ExchangeRateIsFixed Fixed Exch.Rate
QuotationSubmissionDate R_CentralPurchaseContract QuotationSubmissionDate Quotation Date
SupplierQuotation R_CentralPurchaseContract SupplierQuotation RFQ
ReleaseIsNotCompleted R_CentralPurchaseContract ReleaseIsNotCompleted Subj.to Release
CorrespncExternalReference R_CentralPurchaseContract CorrespncExternalReference Your Reference
CorrespncInternalReference R_CentralPurchaseContract CorrespncInternalReference Our Reference
SupplierRespSalesPersonName R_CentralPurchaseContract SupplierRespSalesPersonName Salesperson
SupplierPhoneNumber R_CentralPurchaseContract SupplierPhoneNumber Telephone
IncotermsVersion R_CentralPurchaseContract IncotermsVersion Inco. Version
IncotermsLocation1 R_CentralPurchaseContract IncotermsLocation1 Inco. Location1
IncotermsLocation2 R_CentralPurchaseContract IncotermsLocation2 Inco. Location2
PurchasingDocumentName R_CentralPurchaseContract PurchasingDocumentName Purch. Doc. Name
LastChangeDateTime R_CentralPurchaseContract LastChangeDateTime Timestamp
PurchasingParentDocument R_CentralPurchaseContract PurchasingParentDocument Parent Document ID
ProcmtHubCompanyCodeGroupingID R_CentralPurchaseContract ProcmtHubCompanyCodeGroupingID Grouping ID
PurchasingProcessingStatus R_CentralPurchaseContract PurchasingProcessingStatus Proc. State
IsEndOfPurposeBlocked R_CentralPurchaseContract IsEndOfPurposeBlocked Busin. Purp. Cmpltd.
ActivePurchasingDocument R_CentralPurchaseContract ActivePurchasingDocument Active Purchase Doc
PurgDocChangeRequestStatus R_CentralPurchaseContract PurgDocChangeRequestStatus Change Request Stat.
PurchasingDocumentVersion R_CentralPurchaseContract PurchasingDocumentVersion Version
PurgDocIsChgVers R_CentralPurchaseContract PurgDocIsChgVers Checkbox
CreatedByUser erev ernam User Name
CreationDate erev erdat Entered On
CreationTime erev eruhr Time
PurchasingDocVersionReasonCode erev rscod Reason Code
PurchasingDocVersionStatus erev strev Version status
AccWorkflowApprover
AccWorkflowApproverFirstName
ApprovalStatusName
ApproverUser
PurgContractIsInPreparation
PurchasingDocumentStatus
_PurchasingDocumentTypeText _PurchasingDocumentTypeText
_PaymentTermsText _PaymentTermsText
_CntrlPurContrStatusText _CntrlPurContrStatusText
_CntrlPurContrAggrgnDistrSts _CntrlPurContrAggrgnDistrSts
_UserDetails _UserDetails
_VersionType _VersionType

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_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: IVERSIONHISTORY

CREATE VIEW I_CntrlPurContrVersionHistory AS
SELECT
  Document.CentralPurchaseContract AS CentralPurchaseContract,
  Document.PurchaseContractType AS PurchaseContractType,
  Document.PurchasingDocumentCategory AS PurchasingDocumentCategory,
  Document.Supplier AS Supplier,
  Document.PurchasingDocumentSubtype AS PurchasingDocumentSubtype,
  Document.CompanyCode AS CompanyCode,
  Document.PurchasingOrganization AS PurchasingOrganization,
  Document.PurchasingGroup AS PurchasingGroup,
  Document.DocumentCurrency AS DocumentCurrency,
  Document.Currency AS Currency,
  Document.IncotermsClassification AS IncotermsClassification,
  Document.IncotermsTransferLocation AS IncotermsTransferLocation,
  Document.PaymentTerms AS PaymentTerms,
  Document.CashDiscount1Days AS CashDiscount1Days,
  Document.CashDiscount2Days AS CashDiscount2Days,
  Document.NetPaymentDays AS NetPaymentDays,
  Document.CashDiscount1Percent AS CashDiscount1Percent,
  Document.CashDiscount2Percent AS CashDiscount2Percent,
  Document.PurchaseContractTargetAmount AS PurchaseContractTargetAmount,
  Document.ValidityStartDate AS ValidityStartDate,
  Document.ValidityEndDate AS ValidityEndDate,
  Document.ReleaseCode AS ReleaseCode,
  Document.PurchasingDocumentDeletionCode AS PurchasingDocumentDeletionCode,
  Document.ManualSupplierAddressID AS ManualSupplierAddressID,
  Document.SupplyingSupplier AS SupplyingSupplier,
  Document.InvoicingParty AS InvoicingParty,
  Document.ExchangeRate AS ExchangeRate,
  Document.ExchangeRateIsFixed AS ExchangeRateIsFixed,
  Document.QuotationSubmissionDate AS QuotationSubmissionDate,
  Document.SupplierQuotation AS SupplierQuotation,
  Document.ReleaseIsNotCompleted AS ReleaseIsNotCompleted,
  Document.CorrespncExternalReference AS CorrespncExternalReference,
  Document.CorrespncInternalReference AS CorrespncInternalReference,
  Document.SupplierRespSalesPersonName AS SupplierRespSalesPersonName,
  Document.SupplierPhoneNumber AS SupplierPhoneNumber,
  Document.IncotermsVersion AS IncotermsVersion,
  Document.IncotermsLocation1 AS IncotermsLocation1,
  Document.IncotermsLocation2 AS IncotermsLocation2,
  Document.PurchasingDocumentName AS PurchasingDocumentName,
  Document.LastChangeDateTime AS LastChangeDateTime,
  Document.PurchasingParentDocument AS PurchasingParentDocument,
  Document.ProcmtHubCompanyCodeGroupingID AS ProcmtHubCompanyCodeGroupingID,
  Document.PurchasingProcessingStatus AS PurchasingProcessingStatus,
  Document.IsEndOfPurposeBlocked AS IsEndOfPurposeBlocked,
  Document.ActivePurchasingDocument AS ActivePurchasingDocument,
  Document.PurgDocChangeRequestStatus AS PurgDocChangeRequestStatus,
  Document.PurchasingDocumentVersion AS PurchasingDocumentVersion,
  Document.PurgDocIsChgVers AS PurgDocIsChgVers,
  VersionHistory.ernam AS CreatedByUser,
  VersionHistory.erdat AS CreationDate,
  VersionHistory.eruhr AS CreationTime,
  VersionHistory.rscod AS PurchasingDocVersionReasonCode,
  VersionHistory.strev AS PurchasingDocVersionStatus,
  cast ('' as mm_oa_approver_id) AS AccWorkflowApprover,
  cast ('' as mm_oa_approver_name) AS AccWorkflowApproverFirstName,
  cast( '' as val_text ) AS ApprovalStatusName,
  cast( '' as sww_aagent ) AS ApproverUser,
  cast('' as boolean ) AS PurgContractIsInPreparation,
  cast('' as mmpur_doc_status) AS PurchasingDocumentStatus
FROM erev AS VersionHistory
INNER JOIN R_CentralPurchaseContract AS Document ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_User AS _UserDetails ON CreatedByUser = _UserDetails.UserID  -- association [1..1]
LEFT OUTER JOIN I_CntrlPurContrVersionType AS _VersionType ON PurgDocChangeRequestStatus = _VersionType.PurgDocChangeRequestStatus  -- association [1..1]
LEFT OUTER JOIN I_PaymentTermsText AS _PaymentTermsText ON PaymentTerms = _PaymentTermsText.PaymentTerms AND _PaymentTermsText.Language = $session.system_language  -- association [0..1]
;