C_PurchaseContractLeakage1
Purchase Contract Leakage Cube
C_PurchaseContractLeakage1 is a Consumption CDS View (Cube) that provides data about "Purchase Contract Leakage Cube" in SAP S/4HANA. It reads from 4 data sources (P_PurchaseContractLeakage, P_PurchaseContractleakage4, I_PurchasingCategoryMatlGroup, P_UnasgndMatGrpText) and exposes 43 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber. It has 13 associations to related views.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| P_PurchaseContractLeakage | P_PurchaseContractLeakage | from |
| P_PurchaseContractleakage4 | P_PurchaseContractleakage4 | left_outer |
| I_PurchasingCategoryMatlGroup | PurchasingCategoryMatlGroup | left_outer |
| P_UnasgndMatGrpText | UnasgndMatGrpTex | left_outer |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_StartDate | bedat | |
| P_EndDate | bedat |
Associations (13)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_PurchasingOrganization | _PurchasingOrganization | $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization |
| [1..1] | I_PurchasingGroup | _PurchasingGroup | $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup |
| [1..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [1..1] | I_CalendarDate | _CalendarDate | $projection.PurchaseOrderDate = _CalendarDate.CalendarDate |
| [1..1] | I_Country | _Country | $projection.SupplierCountry = _Country.Country |
| [1..1] | I_MaterialGroup | _MaterialGroup | $projection.MaterialGroup = _MaterialGroup.MaterialGroup |
| [1..1] | I_Material | _Material | $projection.Material = _Material.Material |
| [1..1] | I_Supplier | _Supplier | $projection.Supplier = _Supplier.Supplier |
| [1..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_CompanyCode | _ReceivingCompanyCode | $projection.ReceivingCompanyCode = _ReceivingCompanyCode.CompanyCode |
| [1..1] | I_PurgDocumentItemCategory | _PurgDocumentItemCategory | $projection.PurchaseOrderItemCategory = _PurgDocumentItemCategory.PurchasingDocumentItemCategory |
| [1..1] | I_PurchasingDocumentType | _PurchasingDocumentType | $projection.PurchaseOrderType = _PurchasingDocumentType.PurchasingDocumentType and $projection.PurchaseOrderCategory = _PurchasingDocumentType.PurchasingDocumentCategory |
| [1..1] | I_PurchasingDocumentCategory | _PurchaseOrderCategory | $projection.PurchaseOrderCategory = _PurchaseOrderCategory.PurchasingDocumentCategory |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| AbapCatalog.sqlViewName | CMMCONTRLEAKAGE1 | view | |
| EndUserText.label | Purchase Contract Leakage Cube | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Analytics.dataCategory | #CUBE | view | |
| Metadata.allowExtensions | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (43)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrderItem | PurchaseOrder | Purchasing Document |
| KEY | PurchaseOrderItem | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item |
| KEY | AccountAssignmentNumber | AccountAssignmentNumber | Account Assgmt No. | |
| PurchaseOrderCategory | PurchaseOrderCategory | Doc. Category | ||
| PurchaseOrderType | PurchaseOrderType | PO Type | ||
| PurchaseOrderItemCategory | PurchaseOrderItemCategory | Item Category | ||
| PurchaseContract | ||||
| PurchaseContractItem | ||||
| Material | PurchaseOrderItem | Material | Vehicle Model | |
| Plant | PurchaseOrderItem | Plant | Valuation Area | |
| MaterialGroup | PurchaseOrderItem | MaterialGroup | Product Group | |
| PurchasingCategory | ||||
| Supplier | PurchaseOrderItem | Supplier | Supplier | |
| SupplierCountry | ||||
| PurchasingOrganization | PurchaseOrderItem | PurchasingOrganization | Purchasing Organization | |
| PurchasingGroup | PurchaseOrderItem | PurchasingGroup | Purchasing Group | |
| PurgCatNameendasPurgCatName | ||||
| CompanyCode | PurchaseOrderItem | CompanyCode | Receiver Company Code | |
| ReceivingCompanyCode | PurchaseOrderItem | ReceivingCompanyCode | Rcvg Co Code | |
| ProfitCenter | ProfitCenter | Profit Center | ||
| ControllingArea | ControllingArea | Controlling Area | ||
| CostCenter | CostCenter | Cost Center | ||
| WBSElementInternalID | WBSElementInternalID | WBS Internal ID | ||
| GLAccount | GLAccount | General Ledger | ||
| CalendarYear | _CalendarDate | CalendarYear | Year | |
| CalendarQuarter | _CalendarDate | CalendarQuarter | Calendar Quarter | |
| CalendarMonth | _CalendarDate | CalendarMonth | Calendar Month | |
| CalendarWeek | _CalendarDate | CalendarWeek | Calendar Week | |
| PurchaseOrderDate | PurchaseOrderItem | PurchaseOrderDate | PO Date | |
| CreatedByUser | CreatedByUser | User Name | ||
| DisplayCurrency | ||||
| _PurchaseOrderCategory | _PurchaseOrderCategory | |||
| _PurchasingDocumentType | _PurchasingDocumentType | |||
| _PurgDocumentItemCategory | _PurgDocumentItemCategory | |||
| _MaterialGroup | _MaterialGroup | |||
| _Material | _Material | |||
| _PurchasingOrganization | _PurchasingOrganization | |||
| _PurchasingGroup | _PurchasingGroup | |||
| _Plant | _Plant | |||
| _Supplier | _Supplier | |||
| _Country | _Country | |||
| _CompanyCode | _CompanyCode | |||
| _ReceivingCompanyCode | _ReceivingCompanyCode |
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_PurchaseContractLeakage1.
-- 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: CMMCONTRLEAKAGE1
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : bedat, P_EndDate : bedat
CREATE VIEW C_PurchaseContractLeakage1 AS
SELECT
PurchaseOrderItem.PurchaseOrder AS PurchaseOrder,
PurchaseOrderItem.PurchaseOrderItem AS PurchaseOrderItem,
AccountAssignmentNumber,
PurchaseOrderCategory,
PurchaseOrderType,
PurchaseOrderItemCategory,
cast(substring(identifier,9,10) as vdm_purchasecontract ) AS PurchaseContract,
cast(substring(identifier,19,5) as vdm_purchasecontractitem ) AS PurchaseContractItem,
PurchaseOrderItem.Material AS Material,
PurchaseOrderItem.Plant AS Plant,
PurchaseOrderItem.MaterialGroup AS MaterialGroup,
PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory AS PurchasingCategory,
PurchaseOrderItem.Supplier AS Supplier,
cast( _Supplier.Country as mm_a_supplier_country ) AS SupplierCountry,
PurchaseOrderItem.PurchasingOrganization AS PurchasingOrganization,
PurchaseOrderItem.PurchasingGroup AS PurchasingGroup,
case when PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName is null then UnasgndMatGrpTex.PurgCatName else PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName end as PurgCatName AS PurgCatNameendasPurgCatName,
PurchaseOrderItem.CompanyCode AS CompanyCode,
PurchaseOrderItem.ReceivingCompanyCode AS ReceivingCompanyCode,
ProfitCenter,
ControllingArea,
CostCenter,
WBSElementInternalID,
GLAccount,
_CalendarDate.CalendarYear AS CalendarYear,
_CalendarDate.CalendarQuarter AS CalendarQuarter,
_CalendarDate.CalendarMonth AS CalendarMonth,
_CalendarDate.CalendarWeek AS CalendarWeek,
PurchaseOrderItem.PurchaseOrderDate AS PurchaseOrderDate,
CreatedByUser,
cast(:P_DisplayCurrency as displaycurrency) AS DisplayCurrency
FROM P_PurchaseContractLeakage
LEFT OUTER JOIN P_PurchaseContractleakage4 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PurchasingCategoryMatlGroup AS PurchasingCategoryMatlGroup ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_UnasgndMatGrpText AS UnasgndMatGrpTex ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PurchasingOrganization AS _PurchasingOrganization ON PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization -- association [1..1]
LEFT OUTER JOIN I_PurchasingGroup AS _PurchasingGroup ON PurchasingGroup = _PurchasingGroup.PurchasingGroup -- association [1..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [1..1]
LEFT OUTER JOIN I_CalendarDate AS _CalendarDate ON PurchaseOrderDate = _CalendarDate.CalendarDate -- association [1..1]
LEFT OUTER JOIN I_Country AS _Country ON SupplierCountry = _Country.Country -- association [1..1]
LEFT OUTER JOIN I_MaterialGroup AS _MaterialGroup ON MaterialGroup = _MaterialGroup.MaterialGroup -- association [1..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material -- association [1..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _ReceivingCompanyCode ON ReceivingCompanyCode = _ReceivingCompanyCode.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_PurgDocumentItemCategory AS _PurgDocumentItemCategory ON PurchaseOrderItemCategory = _PurgDocumentItemCategory.PurchasingDocumentItemCategory -- association [1..1]
LEFT OUTER JOIN I_PurchasingDocumentType AS _PurchasingDocumentType ON PurchaseOrderType = _PurchasingDocumentType.PurchasingDocumentType AND PurchaseOrderCategory = _PurchasingDocumentType.PurchasingDocumentCategory -- association [1..1]
LEFT OUTER JOIN I_PurchasingDocumentCategory AS _PurchaseOrderCategory ON PurchaseOrderCategory = _PurchaseOrderCategory.PurchasingDocumentCategory -- association [1..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