P_DMVCMaterialActivity

DDL: P_DMVCMATERIALACTIVITY SQL: PDMVCMATLACTY Type: view COMPOSITE Package: ODATA_ML_MATLVCA_DISP

DMVC: Material Activity

P_DMVCMaterialActivity is a Composite CDS View that provides data about "DMVC: Material Activity" in SAP S/4HANA. It reads from 3 data sources (P_MLActivityHeader, I_Plant, I_Purreqvaluationarea) and exposes 14 fields with key fields CostEstimate, ProcessCategory. Part of development package ODATA_ML_MATLVCA_DISP.

Data Sources (3)

SourceAliasJoin Type
P_MLActivityHeader _ActivityHeader inner
I_Plant _Plant inner
I_Purreqvaluationarea _Purreqvaluationarea inner

Parameters (4)

NameTypeDefault
P_DateFrom calendardate
P_DateTo calendardate
P_CurrencyType curtp
P_Ledger fins_ledger

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PDMVCMATLACTY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate _MaterialLedgerDocument CostEstimate Cost EstimateNo
KEY ProcessCategory _MaterialLedgerDocument ProcessCategory
ObjectInternalID P_MLActivityHeader objnr Val. Obj. No.
Plant P_MLActivityHeader Plant Valuation Area
ValuationArea I_Plant ValuationArea Valuation Area
CompanyCode I_Purreqvaluationarea CompanyCode Receiver Company Code
ControllingArea
objnr78endasCostCenter
objnr176elseendasCostCtrActivityType
objnr711elseendasBusinessProcess
ReferenceDocument _MaterialLedgerDocument awref Reference Doc.
ReferenceDocumentItem _MaterialLedgerDocument awitem Ref. Doc. Line Item
ValuationQuantityUnit _MaterialLedgerDocument ValuationQuantityUnit
Currency _MaterialLedgerDocument Currency Valuation Crcy

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 P_DMVCMaterialActivity.
-- 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: PDMVCMATLACTY
-- Parameters: P_DateFrom : calendardate, P_DateTo : calendardate, P_CurrencyType : curtp, P_Ledger : fins_ledger

CREATE VIEW P_DMVCMaterialActivity AS
SELECT
  _MaterialLedgerDocument.CostEstimate AS CostEstimate,
  _MaterialLedgerDocument.ProcessCategory AS ProcessCategory,
  _ActivityHeader.objnr AS ObjectInternalID,
  _ActivityHeader.Plant AS Plant,
  _Plant.ValuationArea AS ValuationArea,
  _Purreqvaluationarea.CompanyCode AS CompanyCode,
  substring(_ActivityHeader.objnr, 3, 4) AS ControllingArea,
  case substring(_ActivityHeader.objnr, 1, 2) when 'KL' then substring(_ActivityHeader.objnr, 7, 10) when 'BP' then substring(_ActivityHeader.objnr, 7, 8) end as CostCenter AS objnr78endasCostCenter,
  case substring(_ActivityHeader.objnr, 1, 2) when 'KL' then substring(_ActivityHeader.objnr, 17, 6) else '' end as CostCtrActivityType AS objnr176elseendasCostCtrActivityType,
  case substring(_ActivityHeader.objnr, 1, 2) when 'BP' then substring(_ActivityHeader.objnr, 7, 11) else '' end as BusinessProcess AS objnr711elseendasBusinessProcess,
  _MaterialLedgerDocument.awref AS ReferenceDocument,
  _MaterialLedgerDocument.awitem AS ReferenceDocumentItem,
  _MaterialLedgerDocument.ValuationQuantityUnit AS ValuationQuantityUnit,
  _MaterialLedgerDocument.Currency AS Currency
INNER JOIN P_MLActivityHeader AS _ActivityHeader ON /* join condition not captured in parsed metadata */
INNER JOIN I_Plant AS _Plant ON /* join condition not captured in parsed metadata */
INNER JOIN I_Purreqvaluationarea AS _Purreqvaluationarea ON /* join condition not captured in parsed metadata */
;