I_MKT_ProgramSpendByMktgPlan is a Composite CDS View (Fact) that provides data about "Marketing Proposed Spend By Mktg Plan" in SAP S/4HANA. It reads from 2 data sources (I_MKT_MarketingPlan, I_MKT_ProgramSpend) and exposes 31 fields. It has 2 associations to related views. Part of development package CUAN_CDS_MRM.
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 I_MKT_ProgramSpendByMktgPlan.-- 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: IMKT_PGMSPDMKTPL-- Parameters: P_DisplayCurrency : cuan_displaycurrency, P_ExchangeRateType : kurst_currCREATE VIEW I_MKT_ProgramSpendByMktgPlan ASSELECT
I_MKT_MarketingPlan.MarketingPlanUUID AS MarketingPlanUUID,
I_MKT_MarketingPlan.MktgObjVersHdrUUID AS MktgObjVersHdrUUID,
I_MKT_ProgramSpend.MarketingProgram AS MarketingProgram,
I_MKT_ProgramSpend.MarketingProgramPhaseUUID AS MarketingProgramPhaseUUID,
I_MKT_ProgramSpend.MarketingProgramMediaType AS MarketingProgramMediaType,
cast(coalesce(I_MKT_ProgramSpend.CalendarQuarter, '0') as cuan_calendarquarter preserving type) AS MarketingSpendCalendarQuarter,
cast(coalesce(I_MKT_ProgramSpend.CalendarMonth, '00') as cuan_calendarmonth preserving type) AS MarketingSpendCalendarMonth,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingBudgetPlanUUID AS MarketingBudgetPlanUUID,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.CalendarYear AS MktgBudgetPlanCalendarYear,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.Brand AS Brand,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingAudience AS MarketingAudience,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.Market AS Market,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.Country AS Country,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.Region AS Region,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension01 AS MarketingCustomDimension01,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension02 AS MarketingCustomDimension02,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension03 AS MarketingCustomDimension03,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension04 AS MarketingCustomDimension04,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension05 AS MarketingCustomDimension05,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension06 AS MarketingCustomDimension06,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension07 AS MarketingCustomDimension07,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension08 AS MarketingCustomDimension08,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension09 AS MarketingCustomDimension09,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingCustomDimension10 AS MarketingCustomDimension10,
I_MKT_ProgramSpend._MKT_BudgetSource._MKT_PlanCoordinate.MarketingPlanningModel AS MarketingPlanningModel,
I_MKT_ProgramSpend.MarketingProgramCurrency AS MarketingProgramCurrency,
I_MKT_ProgramSpend.ProposedMktgSpendAmt AS ProposedMktgSpendAmt,
$parameters.P_DisplayCurrency AS DisplayCurrency,
I_MKT_ProgramSpend.ProposedMktgSpendAmtInDC AS ProposedMktgSpendAmtInDC
FROM I_MKT_MarketingPlan
LEFTOUTERJOIN I_MKT_ProgramSpend ON /* join condition not captured in parsed metadata */
LEFTOUTERJOIN I_Currency AS _MarketingProgramCurrency ON MarketingProgramCurrency = _MarketingProgramCurrency.Currency -- association [0..1]LEFTOUTERJOIN I_Currency AS _DisplayCurrency ON DisplayCurrency = _DisplayCurrency.Currency -- association [0..1]
;