C_PurContrCalctLeakageAmount
Purcahse Contract Leakage Amount Calculation
C_PurContrCalctLeakageAmount is a Consumption CDS View (Cube) that provides data about "Purcahse Contract Leakage Amount Calculation" in SAP S/4HANA. It reads from 1 data source (P_PurcContractLeakagePC2) and exposes 17 fields with key fields PurchaseOrder, PurchaseOrderItem. Part of development package ODATA_MM_ANALYTICS.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_PurcContractLeakagePC2 | P_PurcContractLeakagePC2 | from |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_PurchaseContract | ebeln | |
| P_DisplayCurrency | displaycurrency | |
| P_StartDate | vdm_validitystart | |
| P_EndDate | vdm_validityend |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CMMPCCALCLEAKAMT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| EndUserText.label | Purcahse Contract Leakage Amount Calculation | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Analytics.dataCategory | #CUBE | view | |
| Metadata.allowExtensions | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (17)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | Purchasing Document | ||
| KEY | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | |
| PurchaseContract | ||||
| PurchaseContractItem | ||||
| Material | Material | Vehicle Model | ||
| Plant | Plant | Valuation Area | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| Supplier | Supplier | Supplier | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| PurchaseOrderDate | PurchaseOrderDate | PO Date | ||
| DisplayCurrency | ||||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| PurchaseOrderNetAmount | ||||
| LeakageAmountInDisplayCrcy | ||||
| NonLeakageAmtInDisplayCrcy |
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_PurContrCalctLeakageAmount.
-- 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: CMMPCCALCLEAKAMT
-- Parameters: P_PurchaseContract : ebeln, P_DisplayCurrency : displaycurrency, P_StartDate : vdm_validitystart, P_EndDate : vdm_validityend
CREATE VIEW C_PurContrCalctLeakageAmount AS
SELECT
cast( PurchaseOrder as vdm_purchaseorder) AS PurchaseOrder,
PurchaseOrderItem,
cast(substring(identifier,9,10) as vdm_purchasecontract ) AS PurchaseContract,
cast(substring(identifier,19,5) as vdm_purchasecontractitem ) AS PurchaseContractItem,
Material,
Plant,
MaterialGroup,
Supplier,
PurchasingOrganization,
PurchasingGroup,
CompanyCode,
PurchaseOrderDate,
cast(:P_DisplayCurrency as displaycurrency) AS DisplayCurrency,
DocumentCurrency,
cast(PurchaseOrderNetAmount * cast( case when IsReturnsItem = 'X' then -1 else 1 end as int2 ) as purchase_order_net_amount ) AS PurchaseOrderNetAmount,
cast(LeakageAmountInDisplayCrcy * cast( case when IsReturnsItem = 'X' then -1 else 1 end as int2 ) as mm_a_leakamount ) AS LeakageAmountInDisplayCrcy,
cast((PurchaseOrderNetAmount - LeakageAmountInDisplayCrcy) * cast( case when IsReturnsItem = 'X' then -1 else 1 end as int2 ) as mm_a_nonleakageamt ) AS NonLeakageAmtInDisplayCrcy
FROM P_PurcContractLeakagePC2
;
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