C_PurchaseContractDEX

DDL: C_PURCHASECONTRACTDEX SQL: CMMPURCONTRDEX Type: view CONSUMPTION

Data Extraction for Purchase Contract

C_PurchaseContractDEX (Consumption)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Purchase Contract · Sourcing & Procurement

C_PurchaseContractDEX is a Consumption CDS View (Fact) that provides data about "Data Extraction for Purchase Contract" in SAP S/4HANA. It reads from 1 data source (I_PurchaseContractAPI01) and exposes 53 fields with key field PurchaseContract. It has 15 associations to related views.

SAP API Hub

StateC1
Line of BusinessSourcing & Procurement
Application ComponentMM-PUR-ANA
CapabilitiesData Source for Data Extraction
PackageSourcing & Procurement for SAP S/4HANA Cloud Private Edition
Description <p>These CDS views are app independent, and are available for all external consumers who want to extract the data to SAP Business Warehouse (SAP BW) or other external systems.</p> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (1)

SourceAliasJoin Type
I_PurchaseContractAPI01 I_PurchaseContractAPI01 from

Associations (15)

CardinalityTargetAliasCondition
[0..1] E_PurchasingDocument _HeaderExtension $projection.PurchaseContract = _HeaderExtension.PurchasingDocument
[0..*] C_PurchaseContractItemDEX _PurchaseContractItemDEX $projection.PurchaseContract = _PurchaseContractItemDEX.PurchaseContract
[1..1] I_PurchaseContractType _PurchasingContractType $projection.PurchaseContractType = _PurchasingContractType.PurchaseContractType
[1..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[1..1] I_PurchasingOrganization _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[1..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Supplier _InvoicingParty $projection.InvoicingParty = _InvoicingParty.Supplier
[0..1] I_Supplier _SupplyingSupplier $projection.SupplyingSupplier = _SupplyingSupplier.Supplier
[1..1] I_Currency _Currency $projection.DocumentCurrency = _Currency.Currency
[1..1] I_PurchasingDocumentCategory _PurchasingDocumentCategory $projection.PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_IncotermsClassification _IncotermsClassification $projection.IncotermsClassification = _IncotermsClassification.IncotermsClassification
[0..1] I_PaymentTerms _PaymentTerms $projection.PaymentTerms = _PaymentTerms.PaymentTerms
[0..1] I_IncotermsVersion _IncotermsVersion $projection.IncotermsVersion = _IncotermsVersion.IncotermsVersion
[0..1] I_Address_2 _Address $projection.SupplierAddressID = _Address.AddressID and _Address.AddressPersonID = '' and _Address.AddressRepresentationCode = ''

Annotations (16)

NameValueLevelField
AbapCatalog.sqlViewName CMMPURCONTRDEX view
EndUserText.label Data Extraction for Purchase Contract view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #D view
VDM.viewType #CONSUMPTION view
Metadata.ignorePropagatedAnnotations true view
Analytics.dataCategory #FACT view
Analytics.dataExtraction.enabled true view
ObjectModel.sapObjectNodeType.name PurchaseContract view
ObjectModel.compositionRoot true view
ObjectModel.modelingPattern #ANALYTICAL_FACT view

Fields (53)

KeyFieldSource TableSource FieldDescription
KEY PurchaseContract PurchaseContract Purchasing Contract Header
PurchaseContractType PurchaseContractType Purchasing Document Type
PurchasingGroup PurchasingGroup Purchasing Group
PurchasingOrganization PurchasingOrganization Purchasing Organization
ValidityStartDate ValidityStartDate Start of Validity Period
ValidityEndDate ValidityEndDate End of Validity Period
Supplier Supplier Supplier
InvoicingParty InvoicingParty Different Invoicing Party
SupplyingSupplier SupplyingSupplier Goods Supplier
CreationDate CreationDate Creation Date of Purchasing Document
LastChangeDateTime LastChangeDateTime Change Time Stamp
DocumentCurrency DocumentCurrency Document Currency
ExchangeRate Exchange rate
PurchasingDocumentCategory PurchasingDocumentCategory Purchasing Document Category
CompanyCode CompanyCode Receiver Company Code
IncotermsClassification IncotermsClassification Incoterms (Part 1)
IncotermsTransferLocation IncotermsTransferLocation Incoterms (Part 2)
PaymentTerms PaymentTerms Terms of Payment Key
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
NetPaymentDays NetPaymentDays Net Payment Terms Period
CashDiscount1Percent CashDiscount1Percent Cash Discount Percentage 1
CashDiscount2Percent CashDiscount2Percent Cash Discount Percentage 2
PurchaseContractTargetAmount PurchaseContractTargetAmount Target Value for Header Area per Distribution
ReleaseCode ReleaseCode Release Indicator: Purchasing Document
CreatedByUser CreatedByUser User of person who created a purchasing document
PurchasingDocumentDeletionCode PurchasingDocumentDeletionCode Deletion Indicator in Purchasing Document
ExchangeRateIsFixed ExchangeRateIsFixed Indicator for Fixed Exchange Rate
QuotationSubmissionDate QuotationSubmissionDate Quotation Submission Date
SupplierQuotation SupplierQuotation Quotation Number
CorrespncExternalReference CorrespncExternalReference Your Reference
CorrespncInternalReference CorrespncInternalReference Our Reference
SupplierRespSalesPersonName SupplierRespSalesPersonName Responsible Salesperson at Supplier's Office
SupplierPhoneNumber SupplierPhoneNumber Supplier's Phone Number
IncotermsVersion IncotermsVersion Incoterms Version
IncotermsLocation1 IncotermsLocation1 Incoterms Location 1
IncotermsLocation2 IncotermsLocation2 Incoterms Location 2
ReleaseIsNotCompleted ReleaseIsNotCompleted Release Not Yet Completely Effected
SupplierAddressID SupplierAddressID Address Number
_PurchaseContractItemDEX _PurchaseContractItemDEX
_PurchasingContractType _PurchasingContractType
_PurchasingGroup _PurchasingGroup
_PurchasingOrganization _PurchasingOrganization
_Supplier _Supplier
_InvoicingParty _InvoicingParty
_SupplyingSupplier _SupplyingSupplier
_Currency _Currency
_PurchasingDocumentCategory _PurchasingDocumentCategory
_CompanyCode _CompanyCode
_IncotermsClassification _IncotermsClassification
_PaymentTerms _PaymentTerms
_IncotermsVersion _IncotermsVersion
_Address _Address

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 C_PurchaseContractDEX.
-- 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: CMMPURCONTRDEX

CREATE VIEW C_PurchaseContractDEX AS
SELECT
  PurchaseContract,
  PurchaseContractType,
  PurchasingGroup,
  PurchasingOrganization,
  ValidityStartDate,
  ValidityEndDate,
  Supplier,
  InvoicingParty,
  SupplyingSupplier,
  CreationDate,
  LastChangeDateTime,
  DocumentCurrency,
  cast ( ExchangeRate as fis_exchange_rate preserving type) AS ExchangeRate,
  PurchasingDocumentCategory,
  CompanyCode,
  IncotermsClassification,
  IncotermsTransferLocation,
  PaymentTerms,
  CashDiscount1Days,
  CashDiscount2Days,
  NetPaymentDays,
  CashDiscount1Percent,
  CashDiscount2Percent,
  PurchaseContractTargetAmount,
  ReleaseCode,
  CreatedByUser,
  PurchasingDocumentDeletionCode,
  ExchangeRateIsFixed,
  QuotationSubmissionDate,
  SupplierQuotation,
  CorrespncExternalReference,
  CorrespncInternalReference,
  SupplierRespSalesPersonName,
  SupplierPhoneNumber,
  IncotermsVersion,
  IncotermsLocation1,
  IncotermsLocation2,
  ReleaseIsNotCompleted,
  SupplierAddressID
FROM I_PurchaseContractAPI01
LEFT OUTER JOIN E_PurchasingDocument AS _HeaderExtension ON PurchaseContract = _HeaderExtension.PurchasingDocument  -- association [0..1]
LEFT OUTER JOIN C_PurchaseContractItemDEX AS _PurchaseContractItemDEX ON PurchaseContract = _PurchaseContractItemDEX.PurchaseContract  -- association [0..*]
LEFT OUTER JOIN I_PurchaseContractType AS _PurchasingContractType ON PurchaseContractType = _PurchasingContractType.PurchaseContractType  -- association [1..1]
LEFT OUTER JOIN I_PurchasingGroup AS _PurchasingGroup ON PurchasingGroup = _PurchasingGroup.PurchasingGroup  -- association [1..1]
LEFT OUTER JOIN I_PurchasingOrganization AS _PurchasingOrganization ON PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization  -- association [1..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [1..1]
LEFT OUTER JOIN I_Supplier AS _InvoicingParty ON InvoicingParty = _InvoicingParty.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _SupplyingSupplier ON SupplyingSupplier = _SupplyingSupplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _Currency ON DocumentCurrency = _Currency.Currency  -- association [1..1]
LEFT OUTER JOIN I_PurchasingDocumentCategory AS _PurchasingDocumentCategory ON PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory  -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_IncotermsClassification AS _IncotermsClassification ON IncotermsClassification = _IncotermsClassification.IncotermsClassification  -- association [0..1]
LEFT OUTER JOIN I_PaymentTerms AS _PaymentTerms ON PaymentTerms = _PaymentTerms.PaymentTerms  -- association [0..1]
LEFT OUTER JOIN I_IncotermsVersion AS _IncotermsVersion ON IncotermsVersion = _IncotermsVersion.IncotermsVersion  -- association [0..1]
LEFT OUTER JOIN I_Address_2 AS _Address ON SupplierAddressID = _Address.AddressID AND _Address.AddressPersonID = '' AND _Address.AddressRepresentationCode = ''  -- association [0..1]
;