C_CntrlPurContrHdrDistr
Central Contract Header Distribution
C_CntrlPurContrHdrDistr is a Consumption CDS View that provides data about "Central Contract Header Distribution" in SAP S/4HANA. It reads from 1 data source (I_CntrlPurContrDistribution) and exposes 53 fields with key fields CentralPurchaseContract, DistributionKey. It has 10 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CntrlPurContrDistribution | I_CntrlPurContrDistribution | from |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PurgDocumentCategoryText | _PurgDocumentCatText | $projection.ProcmtHubPurgDocItmCategory = _PurgDocumentCatText.PurchasingDocumentCategory and _PurgDocumentCatText.Language = $session.system_language |
| [0..1] | C_ProcmtHubSchedgAgrmtTypeVH | _ProcmtHubSchedgAgrmtTypeVH | _ProcmtHubSchedgAgrmtTypeVH.PurchasingDocumentType = $projection.PurgDocumentDistributionType and _ProcmtHubSchedgAgrmtTypeVH.LogicalSystem = $projection.LogicalSystem |
| [0..1] | C_ProcmtHubCompanyCodeVH | _ProcmtHubCompanyCodeVH | _ProcmtHubCompanyCodeVH.ProcmtHubCompanyCode = $projection.ProcmtHubCompanyCode and _ProcmtHubCompanyCodeVH.ProcurementHubSourceSystem = $projection.ProcurementHubSourceSystem |
| [1..1] | C_ProcmtHubPlantVH | _ProcmtHubPlantVH | _ProcmtHubPlantVH.ProcmtHubPlant = $projection.Plant and _ProcmtHubPlantVH.ProcmtHubCompanyCode = $projection.ProcmtHubCompanyCode and _ProcmtHubPlantVH.ProcurementHubSourceSystem = $projection.ProcurementHubSourceSystem |
| [0..1] | C_ProcmtHubPurgOrgVH | _ProcmtHubPurgOrgVH | _ProcmtHubPurgOrgVH.ProcmtHubPurchasingOrg = $projection.ProcmtHubPurchasingOrg and _ProcmtHubPurgOrgVH.ProcurementHubSourceSystem = $projection.ProcurementHubSourceSystem |
| [1..1] | C_ProcmtHubCntrlContrPurgGrpVH | _ProcmtHubPurgGrpVH | _ProcmtHubPurgGrpVH.PurchasingGroup = $projection.ProcmtHubPurchasingGroup and _ProcmtHubPurgGrpVH.ProcurementHubSourceSystem = $projection.ProcurementHubSourceSystem |
| [0..1] | C_ProcmtHubStorageLocationVH | _ProcmtHubStorageLocationVH | _ProcmtHubStorageLocationVH.StorageLocation = $projection.StorageLocation and _ProcmtHubStorageLocationVH.Plant = $projection.Plant and _ProcmtHubStorageLocationVH.ProcurementHubSourceSystem = $projection.ProcurementHubSourceSystem |
| [1..1] | C_CentralPurchaseContractTP | _CentralPurchaseContractTP | $projection.CentralPurchaseContract = _CentralPurchaseContractTP.CentralPurchaseContract |
| [1..1] | I_PurgInfoRecordUpdateCode | _PurgInfoRecordUpdateCode | $projection.PurchasingInfoRecordUpdateCode = _PurgInfoRecordUpdateCode.PurchasingInfoRecordUpdateCode |
| [0..1] | P_SGBT_NTE_CDS_APITP | _PurchaseNote | $projection.CentralPurchaseContract = _PurchaseNote.ObjectID and _PurchaseNote.ObjectNodeType = 'CentralPurchaseContract' and _PurchaseNote.NoteType = 'CH16' and _PurchaseNote.LanguageCode = $session.system_language --Extension |
Annotations (14)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CCNTRLPCHDRDIS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Central Contract Header Distribution | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.updateEnabled | true | view | |
| ObjectModel.createEnabled | true | view | |
| VDM.lifecycle.contract.type | #NONE | view |
Fields (53)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CentralPurchaseContract | CentralPurchaseContract | Central Contract | |
| KEY | DistributionKey | DistributionKey | Distribution Number | |
| ActivePurchasingDocument | _CentralPurchaseContract | ActivePurchasingDocument | Central Contract | |
| ProcmtHubPurgDocItmCategory | PurchasingDocumentCategory | Document Category | ||
| CntrlPurContrDistributionPct | CntrlPurContrDistributionPct | |||
| CntrlPurContrItmDistrPct | CntrlPurContrDistributionPct | |||
| CntrlPurContrGRConsumptionPct | ||||
| ProcmtHubPurchasingOrg | PurchasingOrganization | Purchasing Organization | ||
| ProcmtHubCompanyCode | CompanyCode | Receiver Company Code | ||
| Plant | Plant | Valuation Area | ||
| StorageLocation | StorageLocation | StorageLocation | ||
| PurgDocumentDistributionType | PurchasingDocumentType | Outline Agreement Type | ||
| ProcmtHubPurchasingGroup | PurchasingGroup | Purchasing Group | ||
| ReferenceHeaderDistributionKey | ReferenceHeaderDistributionKey | |||
| PurchasingInfoRecordUpdateCode | PurchasingInfoRecordUpdateCode | Info Record Update | ||
| Currency | Currency | Currency | ||
| PaymentTerms | PaymentTerms | Payment Terms | ||
| LogicalSystem | LogicalSystem | Logical System | ||
| ProcurementHubSourceSystem | ProcurementHubSourceSystem | Connected System ID | ||
| ProcurementHubSourceSystemName | ||||
| PurchasingDocumentCategoryName | _PurgDocumentCatText | PurchasingDocumentCategoryName | Short Description | |
| ProcmtHubPurgOrgName | _ProcmtHubPurgOrgVH | ProcmtHubPurgOrgName | ||
| ProcmtHubCompanyCodeName | _ProcmtHubCompanyCodeVH | ProcmtHubCompanyCodeName | ||
| ProcmtHubPlantName | _ProcmtHubPlantVH | ProcmtHubPlantName | Plant Name | |
| StorageLocationName | _ProcmtHubStorageLocationVH | StorageLocationName | Storage Loc. Name | |
| PurchasingDocumentTypeName | _ProcmtHubSchedgAgrmtTypeVH | PurchasingDocumentTypeName | Description | |
| PurchasingGroupName | _ProcmtHubPurgGrpVH | PurchasingGroupName | Purchasing Grp. Name | |
| SourceListIsUpdated | SourceListIsUpdated | Sourcelist Updated | ||
| Supplier | _CentralPurchaseContract | Supplier | Supplier | |
| PurchasingOrganization | _CentralPurchaseContract | PurchasingOrganization | Purchasing Organization | |
| PurchasingGroup | _CentralPurchaseContract | PurchasingGroup | Purchasing Group | |
| CompanyCode | _CentralPurchaseContract | CompanyCode | Receiver Company Code | |
| CntrlPurContrOvrlDistrStsTxt | _CentralPurchaseContractTP | PurchasingProcessingStatus | Proc. State | |
| PurchasingProcessingStatus | _CentralPurchaseContractTP | CntrlPurContrOvrlDistrStsTxt | Distribution Status | |
| PurchasingDocumentStatus | _CentralPurchaseContractTP | PurchasingProcessingStatus | Status | |
| ValidityEndDate | _CentralPurchaseContract | ValidityEndDate | ValidTo | |
| ValidityStartDate | _CentralPurchaseContract | ValidityStartDate | Validity Start Date | |
| PurchaseContractType | _CentralPurchaseContract | PurchaseContractType | Order Type | |
| Material | ||||
| MaterialGroup | ||||
| ProductType | ||||
| ProductTypeCode | ||||
| InternalComment | ||||
| PurchasingDocInclusionList | ||||
| PurchasingDocExclusionList | ||||
| PurOrdItemsAreSelected | ||||
| PurOrdHeadersAreSelected | ||||
| ContrHdrDistrIsCreated | Is New | |||
| TextIsDeleted | Deletion Indicator | |||
| PurchasingDocVersionReasonCode | Reason for Change | |||
| PurgDocNoteText | _PurchaseNote | Content | Purchaser Note | |
| _CentralPurchaseContract | _CentralPurchaseContract | |||
| _PurgInfoRecordUpdateCode | _PurgInfoRecordUpdateCode |
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_CntrlPurContrHdrDistr.
-- 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: CCNTRLPCHDRDIS
CREATE VIEW C_CntrlPurContrHdrDistr AS
SELECT
CentralPurchaseContract,
DistributionKey,
_CentralPurchaseContract.ActivePurchasingDocument AS ActivePurchasingDocument,
PurchasingDocumentCategory AS ProcmtHubPurgDocItmCategory,
CntrlPurContrDistributionPct,
CntrlPurContrDistributionPct AS CntrlPurContrItmDistrPct,
'0.000' AS CntrlPurContrGRConsumptionPct,
PurchasingOrganization AS ProcmtHubPurchasingOrg,
CompanyCode AS ProcmtHubCompanyCode,
Plant,
StorageLocation,
PurchasingDocumentType AS PurgDocumentDistributionType,
PurchasingGroup AS ProcmtHubPurchasingGroup,
ReferenceHeaderDistributionKey,
PurchasingInfoRecordUpdateCode,
Currency,
PaymentTerms,
LogicalSystem,
ProcurementHubSourceSystem,
cast(' ' as mmpur_d_source_sys ) AS ProcurementHubSourceSystemName,
_PurgDocumentCatText.PurchasingDocumentCategoryName AS PurchasingDocumentCategoryName,
_ProcmtHubPurgOrgVH.ProcmtHubPurgOrgName AS ProcmtHubPurgOrgName,
_ProcmtHubCompanyCodeVH.ProcmtHubCompanyCodeName AS ProcmtHubCompanyCodeName,
_ProcmtHubPlantVH.ProcmtHubPlantName AS ProcmtHubPlantName,
_ProcmtHubStorageLocationVH.StorageLocationName AS StorageLocationName,
_ProcmtHubSchedgAgrmtTypeVH.PurchasingDocumentTypeName AS PurchasingDocumentTypeName,
_ProcmtHubPurgGrpVH.PurchasingGroupName AS PurchasingGroupName,
SourceListIsUpdated,
_CentralPurchaseContract.Supplier AS Supplier,
_CentralPurchaseContract.PurchasingOrganization AS PurchasingOrganization,
_CentralPurchaseContract.PurchasingGroup AS PurchasingGroup,
_CentralPurchaseContract.CompanyCode AS CompanyCode,
_CentralPurchaseContractTP.PurchasingProcessingStatus AS CntrlPurContrOvrlDistrStsTxt,
_CentralPurchaseContractTP.CntrlPurContrOvrlDistrStsTxt AS PurchasingProcessingStatus,
_CentralPurchaseContractTP.PurchasingProcessingStatus AS PurchasingDocumentStatus,
_CentralPurchaseContract.ValidityEndDate AS ValidityEndDate,
_CentralPurchaseContract.ValidityStartDate AS ValidityStartDate,
_CentralPurchaseContract.PurchaseContractType AS PurchaseContractType,
cast ('' as matnr) AS Material,
cast ('' as matkl) AS MaterialGroup,
cast ('' as producttype) AS ProductType,
cast ('' as product_type) AS ProductTypeCode,
cast ('' as abap.char( 120 )) AS InternalComment,
cast ('' as abap.sstring( 1332 )) AS PurchasingDocInclusionList,
cast ('' as abap.sstring( 1332 )) AS PurchasingDocExclusionList,
cast ('' as abap.char( 1 )) AS PurOrdItemsAreSelected,
cast ('' as abap.char( 1 )) AS PurOrdHeadersAreSelected,
cast ('' as xfeld) AS ContrHdrDistrIsCreated,
cast(IsDeleted as boolean) AS TextIsDeleted,
cast( ' ' as rscod ) AS PurchasingDocVersionReasonCode,
_PurchaseNote.Content AS PurgDocNoteText
FROM I_CntrlPurContrDistribution
LEFT OUTER JOIN I_PurgDocumentCategoryText AS _PurgDocumentCatText ON ProcmtHubPurgDocItmCategory = _PurgDocumentCatText.PurchasingDocumentCategory AND _PurgDocumentCatText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN C_ProcmtHubSchedgAgrmtTypeVH AS _ProcmtHubSchedgAgrmtTypeVH ON _ProcmtHubSchedgAgrmtTypeVH.PurchasingDocumentType = PurgDocumentDistributionType AND _ProcmtHubSchedgAgrmtTypeVH.LogicalSystem = LogicalSystem -- association [0..1]
LEFT OUTER JOIN C_ProcmtHubCompanyCodeVH AS _ProcmtHubCompanyCodeVH ON _ProcmtHubCompanyCodeVH.ProcmtHubCompanyCode = ProcmtHubCompanyCode AND _ProcmtHubCompanyCodeVH.ProcurementHubSourceSystem = ProcurementHubSourceSystem -- association [0..1]
LEFT OUTER JOIN C_ProcmtHubPlantVH AS _ProcmtHubPlantVH ON _ProcmtHubPlantVH.ProcmtHubPlant = Plant AND _ProcmtHubPlantVH.ProcmtHubCompanyCode = ProcmtHubCompanyCode AND _ProcmtHubPlantVH.ProcurementHubSourceSystem = ProcurementHubSourceSystem -- association [1..1]
LEFT OUTER JOIN C_ProcmtHubPurgOrgVH AS _ProcmtHubPurgOrgVH ON _ProcmtHubPurgOrgVH.ProcmtHubPurchasingOrg = ProcmtHubPurchasingOrg AND _ProcmtHubPurgOrgVH.ProcurementHubSourceSystem = ProcurementHubSourceSystem -- association [0..1]
LEFT OUTER JOIN C_ProcmtHubCntrlContrPurgGrpVH AS _ProcmtHubPurgGrpVH ON _ProcmtHubPurgGrpVH.PurchasingGroup = ProcmtHubPurchasingGroup AND _ProcmtHubPurgGrpVH.ProcurementHubSourceSystem = ProcurementHubSourceSystem -- association [1..1]
LEFT OUTER JOIN C_ProcmtHubStorageLocationVH AS _ProcmtHubStorageLocationVH ON _ProcmtHubStorageLocationVH.StorageLocation = StorageLocation AND _ProcmtHubStorageLocationVH.Plant = Plant AND _ProcmtHubStorageLocationVH.ProcurementHubSourceSystem = ProcurementHubSourceSystem -- association [0..1]
LEFT OUTER JOIN C_CentralPurchaseContractTP AS _CentralPurchaseContractTP ON CentralPurchaseContract = _CentralPurchaseContractTP.CentralPurchaseContract -- association [1..1]
LEFT OUTER JOIN I_PurgInfoRecordUpdateCode AS _PurgInfoRecordUpdateCode ON PurchasingInfoRecordUpdateCode = _PurgInfoRecordUpdateCode.PurchasingInfoRecordUpdateCode -- association [1..1]
LEFT OUTER JOIN P_SGBT_NTE_CDS_APITP AS _PurchaseNote ON CentralPurchaseContract = _PurchaseNote.ObjectID AND _PurchaseNote.ObjectNodeType = 'CentralPurchaseContract' AND _PurchaseNote.NoteType = 'CH16' AND _PurchaseNote.LanguageCode = $session.system_language -- association [0..1]
;
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