C_PurContrCalctLeakageAmount

DDL: C_PURCONTRCALCTLEAKAGEAMOUNT SQL: CMMPCCALCLEAKAMT Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

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)

SourceAliasJoin Type
P_PurcContractLeakagePC2 P_PurcContractLeakagePC2 from

Parameters (4)

NameTypeDefault
P_PurchaseContract ebeln
P_DisplayCurrency displaycurrency
P_StartDate vdm_validitystart
P_EndDate vdm_validityend

Annotations (11)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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
;