R_CentralPurchaseContract

DDL: R_CENTRALPURCHASECONTRACT SQL: RCNTRLPCON Type: view BASIC

Central Purchase Contract Base View

R_CentralPurchaseContract is a Basic CDS View that provides data about "Central Purchase Contract Base View" in SAP S/4HANA. It reads from 1 data source (R_PurchasingDocument) and exposes 72 fields with key field CentralPurchaseContract. It has 7 associations to related views.

Data Sources (1)

SourceAliasJoin Type
R_PurchasingDocument R_PurchasingDocument from

Associations (7)

CardinalityTargetAliasCondition
[1..*] I_CntrlPurchaseContractItem _CntrlPurchaseContractItem $projection.CentralPurchaseContract = _CntrlPurchaseContractItem.CentralPurchaseContract
[0..1] I_PurchasingDocumentTypeText _PurchasingDocumentTypeText $projection.PurchaseContractType = _PurchasingDocumentTypeText.PurchasingDocumentType and _PurchasingDocumentTypeText.PurchasingDocumentCategory = 'C' and _PurchasingDocumentTypeText.Language = $session.system_language
[0..1] I_CntrlPurContrDocStsText _CntrlPurContrStatusText $projection.PurchasingProcessingStatus = _CntrlPurContrStatusText.PurchasingDocumentStatus
[0..1] I_CntrlPurContrAggrgnDistrSts _CntrlPurContrAggrgnDistrSts $projection.CentralPurchaseContract = _CntrlPurContrAggrgnDistrSts.CentralPurchaseContract
[0..*] I_PaymentTermsText _PaymentTermsText $projection.PaymentTerms = _PaymentTermsText.PaymentTerms
[1..1] I_CntrlPurContrValidityStatus _CntrlPurContrValidityStatus $projection.CentralPurchaseContract = _CntrlPurContrValidityStatus.CentralPurchaseContract and $projection.ActivePurchasingDocument = _CntrlPurContrValidityStatus.ActivePurchasingDocument
[1..1] I_CntrlPurContrVersionType _VersionType $projection.PurgDocChangeRequestStatus = _VersionType.PurgDocChangeRequestStatus

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName RCNTRLPCON view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Central Purchase Contract Base View view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
Metadata.ignorePropagatedAnnotations true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.representativeKey CentralPurchaseContract view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (72)

KeyFieldSource TableSource FieldDescription
KEY CentralPurchaseContract Purchasing Document
PurchaseContractType PurchasingDocumentType RFQ Type
PurchasingDocumentCategory PurchasingDocumentCategory Doc. Category
LastChangeDateTime LastChangeDateTime Timestamp
CreationDate CreationDate Time Stamp
Supplier Supplier Supplier
PurchasingDocumentSubtype PurchasingDocumentSubtype Control
CompanyCode CompanyCode Receiver Company Code
PurchasingOrganization PurchasingOrganization Purchasing Organization
PurchasingGroup PurchasingGroup Purchasing Group
DocumentCurrency DocumentCurrency Document Currency
Currency 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 TargetAmount 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 SupplierQuotationExternalID Quotation
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
PurchasingDocumentName PurchasingDocumentName Purch. Doc. Name
ReleaseIsNotCompleted ReleaseIsNotCompleted Subj.to Release
PurchasingProcessingStatus PurchasingProcessingStatus Proc. State
ManualSupplierAddressID ManualSupplierAddressID Address Number
PurgDocumentDistributionType PurgDocumentDistributionType Distribution Type
IsEndOfPurposeBlocked IsEndOfPurposeBlocked Busin. Purp. Cmpltd.
PurchasingParentDocument PurchasingParentDocument Parent Document ID
ProcmtHubCompanyCodeGroupingID ProcmtHubCompanyCodeGroupingID Grouping ID
ActivePurchasingDocument ActivePurchasingDocument Active Purchase Doc
PurgDocChangeRequestStatus PurgDocChangeRequestStatus Change Request Stat.
PurchasingDocumentVersion PurchasingDocumentVersion Version
PurchasingDocumentOrigin PurchasingDocumentOrigin Status
_PurchasingDocumentCategory _PurchasingDocumentCategory
_PurchasingDocumentType _PurchasingDocumentType
_IncotermsClassification _IncotermsClassification
_IncotermsVersion _IncotermsVersion
_CntrlPurchaseContractItem _CntrlPurchaseContractItem
_PurchasingDocumentTypeText _PurchasingDocumentTypeText
_CntrlPurContrStatusText _CntrlPurContrStatusText
_Supplier _Supplier
_CompanyCode _CompanyCode
_PurchasingOrganization _PurchasingOrganization
_PurchasingGroup _PurchasingGroup
_CreatedByUser _CreatedByUser
_DocumentCurrency _DocumentCurrency
_ReleaseCode _ReleaseCode
_SupplyingSupplier _SupplyingSupplier
_InvoicingParty _InvoicingParty
_CntrlPurContrAggrgnDistrSts _CntrlPurContrAggrgnDistrSts
_PaymentTerms _PaymentTerms
_PaymentTermsText _PaymentTermsText
_CntrlPurContrValidityStatus _CntrlPurContrValidityStatus
_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 R_CentralPurchaseContract.
-- 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: RCNTRLPCON

CREATE VIEW R_CentralPurchaseContract AS
SELECT
  cast (PurchasingDocument as vdm_centralpurchasecontract preserving type) AS CentralPurchaseContract,
  PurchasingDocumentType AS PurchaseContractType,
  PurchasingDocumentCategory,
  LastChangeDateTime,
  CreationDate,
  Supplier,
  PurchasingDocumentSubtype,
  CompanyCode,
  PurchasingOrganization,
  PurchasingGroup,
  DocumentCurrency,
  DocumentCurrency AS Currency,
  IncotermsClassification,
  IncotermsTransferLocation,
  PaymentTerms,
  CashDiscount1Days,
  CashDiscount2Days,
  NetPaymentDays,
  CashDiscount1Percent,
  CashDiscount2Percent,
  TargetAmount AS PurchaseContractTargetAmount,
  ValidityStartDate,
  ValidityEndDate,
  ReleaseCode,
  CreatedByUser,
  PurchasingDocumentDeletionCode,
  SupplyingSupplier,
  InvoicingParty,
  ExchangeRate,
  ExchangeRateIsFixed,
  QuotationSubmissionDate,
  SupplierQuotationExternalID AS SupplierQuotation,
  CorrespncExternalReference,
  CorrespncInternalReference,
  SupplierRespSalesPersonName,
  SupplierPhoneNumber,
  IncotermsVersion,
  IncotermsLocation1,
  IncotermsLocation2,
  PurchasingDocumentName,
  ReleaseIsNotCompleted,
  PurchasingProcessingStatus,
  ManualSupplierAddressID,
  PurgDocumentDistributionType,
  IsEndOfPurposeBlocked,
  PurchasingParentDocument,
  ProcmtHubCompanyCodeGroupingID,
  ActivePurchasingDocument,
  PurgDocChangeRequestStatus,
  PurchasingDocumentVersion,
  PurchasingDocumentOrigin
FROM R_PurchasingDocument
LEFT OUTER JOIN I_CntrlPurchaseContractItem AS _CntrlPurchaseContractItem ON CentralPurchaseContract = _CntrlPurchaseContractItem.CentralPurchaseContract  -- association [1..*]
LEFT OUTER JOIN I_PurchasingDocumentTypeText AS _PurchasingDocumentTypeText ON PurchaseContractType = _PurchasingDocumentTypeText.PurchasingDocumentType AND _PurchasingDocumentTypeText.PurchasingDocumentCategory = 'C' AND _PurchasingDocumentTypeText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_CntrlPurContrDocStsText AS _CntrlPurContrStatusText ON PurchasingProcessingStatus = _CntrlPurContrStatusText.PurchasingDocumentStatus  -- association [0..1]
LEFT OUTER JOIN I_CntrlPurContrAggrgnDistrSts AS _CntrlPurContrAggrgnDistrSts ON CentralPurchaseContract = _CntrlPurContrAggrgnDistrSts.CentralPurchaseContract  -- association [0..1]
LEFT OUTER JOIN I_PaymentTermsText AS _PaymentTermsText ON PaymentTerms = _PaymentTermsText.PaymentTerms  -- association [0..*]
LEFT OUTER JOIN I_CntrlPurContrValidityStatus AS _CntrlPurContrValidityStatus ON CentralPurchaseContract = _CntrlPurContrValidityStatus.CentralPurchaseContract AND ActivePurchasingDocument = _CntrlPurContrValidityStatus.ActivePurchasingDocument  -- association [1..1]
LEFT OUTER JOIN I_CntrlPurContrVersionType AS _VersionType ON PurgDocChangeRequestStatus = _VersionType.PurgDocChangeRequestStatus  -- association [1..1]
;