C_PurchaseContractHdr
Purchase Contract Header View
C_PurchaseContractHdr is a Consumption CDS View that provides data about "Purchase Contract Header View" in SAP S/4HANA. It reads from 1 data source (I_PurchaseContract) and exposes 23 fields with key field PurchaseContract. It has 3 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchaseContract | PurchaseContract | from |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | C_SupplierDetails | _Supplier | _Supplier.Supplier = $projection.Supplier |
| [1..*] | C_PurchaseContractItem | _PurCtrItem | _PurCtrItem.PurchaseContract = $projection.PurchaseContract |
| [0..*] | I_PurCtrCond | _PurContHdrCond | _PurContHdrCond.PurchaseContract = $projection.PurchaseContract |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CMMPURHDR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Purchase Contract Header View | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #M | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AccessControl.personalData.blocking | #REQUIRED | view |
Fields (23)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseContract | I_PurchaseContract | PurchaseContract | Purchasing Doc. |
| PurchaseContractType | I_PurchaseContract | PurchaseContractType | Order Type | |
| CreationDate | I_PurchaseContract | CreationDate | Time Stamp | |
| CreatedByUser | I_PurchaseContract | CreatedByUser | User Name | |
| SupplierRespSalesPersonName | I_PurchaseContract | SupplierRespSalesPersonName | Salesperson | |
| ValidityStartDate | I_PurchaseContract | ValidityStartDate | Validity Start Date | |
| ValidityEndDate | I_PurchaseContract | ValidityEndDate | ValidTo | |
| IncotermsClassification | I_PurchaseContract | IncotermsClassification | Incoterms | |
| IncotermsTransferLocation | I_PurchaseContract | IncotermsTransferLocation | Incoterms 2 | |
| DocumentCurrency | I_PurchaseContract | DocumentCurrency | Document Currency | |
| SupplierQuotation | I_PurchaseContract | SupplierQuotation | RFQ | |
| QuotationSubmissionDate | I_PurchaseContract | QuotationSubmissionDate | Quotation Date | |
| CorrespncExternalReference | I_PurchaseContract | CorrespncExternalReference | Your Reference | |
| PaymentTerms | I_PurchaseContract | PaymentTerms | Pyt Terms | |
| PurchaseContractTargetAmount | I_PurchaseContract | PurchaseContractTargetAmount | Target Value | |
| Supplier | I_PurchaseContract | Supplier | Supplier | |
| IncotermsVersion | I_PurchaseContract | IncotermsVersion | Inco. Version | |
| PurchasingGroup | I_PurchaseContract | PurchasingGroup | Purchasing Group | |
| PurchasingOrganization | I_PurchaseContract | PurchasingOrganization | Purchasing Organization | |
| IsEndOfPurposeBlocked | I_PurchaseContract | IsEndOfPurposeBlocked | Busin. Purp. Cmpltd. | |
| _Supplier | _Supplier | |||
| _PurCtrItem | _PurCtrItem | |||
| _PurContHdrCond | _PurContHdrCond |
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_PurchaseContractHdr.
-- 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: CMMPURHDR
CREATE VIEW C_PurchaseContractHdr AS
SELECT
PurchaseContract.PurchaseContract AS PurchaseContract,
PurchaseContract.PurchaseContractType AS PurchaseContractType,
PurchaseContract.CreationDate AS CreationDate,
PurchaseContract.CreatedByUser AS CreatedByUser,
PurchaseContract.SupplierRespSalesPersonName AS SupplierRespSalesPersonName,
PurchaseContract.ValidityStartDate AS ValidityStartDate,
PurchaseContract.ValidityEndDate AS ValidityEndDate,
PurchaseContract.IncotermsClassification AS IncotermsClassification,
PurchaseContract.IncotermsTransferLocation AS IncotermsTransferLocation,
PurchaseContract.DocumentCurrency AS DocumentCurrency,
PurchaseContract.SupplierQuotation AS SupplierQuotation,
PurchaseContract.QuotationSubmissionDate AS QuotationSubmissionDate,
PurchaseContract.CorrespncExternalReference AS CorrespncExternalReference,
PurchaseContract.PaymentTerms AS PaymentTerms,
PurchaseContract.PurchaseContractTargetAmount AS PurchaseContractTargetAmount,
PurchaseContract.Supplier AS Supplier,
PurchaseContract.IncotermsVersion AS IncotermsVersion,
PurchaseContract.PurchasingGroup AS PurchasingGroup,
PurchaseContract.PurchasingOrganization AS PurchasingOrganization,
PurchaseContract.IsEndOfPurposeBlocked AS IsEndOfPurposeBlocked
FROM I_PurchaseContract AS PurchaseContract
LEFT OUTER JOIN C_SupplierDetails AS _Supplier ON _Supplier.Supplier = Supplier -- association [0..*]
LEFT OUTER JOIN C_PurchaseContractItem AS _PurCtrItem ON _PurCtrItem.PurchaseContract = PurchaseContract -- association [1..*]
LEFT OUTER JOIN I_PurCtrCond AS _PurContHdrCond ON _PurContHdrCond.PurchaseContract = PurchaseContract -- association [0..*]
;
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