A_MKT_SpendHeader
Marketing Spend Header
A_MKT_SpendHeader is a CDS View that provides data about "Marketing Spend Header" in SAP S/4HANA. It reads from 1 data source (I_MKT_SpendHeader) and exposes 15 fields with key field MarketingSpendHeaderUUID. It has 5 associations to related views. Part of development package CUAN_CDS_MRM.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MKT_SpendHeader | spend_header | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | A_MKT_SpendItem | _MKT_SpendItem | $projection.MarketingSpendHeaderUUID = _MKT_SpendItem.MarketingSpendHeaderUUID |
| [0..1] | I_MKT_CalendarMonth | _MKT_CalendarMonthStart | $projection.MarketingSpendPeriodStartMonth = _MKT_CalendarMonthStart.CalendarMonth |
| [0..1] | I_MKT_CalendarMonth | _MKT_CalendarMonthEnd | $projection.MarketingSpendPeriodEndMonth = _MKT_CalendarMonthEnd.CalendarMonth |
| [0..*] | A_MKT_SpendHeaderTimeSplit | _MKT_SpendHeaderTimeSplit | $projection.MarketingSpendHeaderUUID = _MKT_SpendHeaderTimeSplit.MarketingSpendHeaderUUID |
| [1..1] | I_Mkt_Initiative | _MKT_Initiative | $projection.CampaignUUID = _MKT_Initiative.Campaign |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | AMKT_SPENDHEADER | view | |
| VDM.viewtype | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Marketing Spend Header | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (15)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MarketingSpendHeaderUUID | I_MKT_SpendHeader | MarketingSpendHeaderUUID | |
| MarketingSpendStatus | I_MKT_SpendHeader | MarketingSpendStatus | ||
| CampaignUUID | ||||
| PlannedMktgSpendIsDetailed | I_MKT_SpendHeader | PlannedMktgSpendIsDetailed | ||
| MarketingSpendPeriodStartYear | I_MKT_SpendHeader | MarketingSpendPeriodStartYear | ||
| MarketingSpendPeriodStartMonth | I_MKT_SpendHeader | MarketingSpendPeriodStartMonth | ||
| MktgSpendPeriodStartMonthName | ||||
| MarketingSpendPeriodEndYear | I_MKT_SpendHeader | MarketingSpendPeriodEndYear | ||
| MarketingSpendPeriodEndMonth | I_MKT_SpendHeader | MarketingSpendPeriodEndMonth | ||
| MktgSpendPeriodEndMonthName | ||||
| PlannedMktgSpendHeaderAmt | I_MKT_SpendHeader | PlannedMktgSpendHeaderAmt | ||
| PlannedMktgSpendHeaderCrcy | I_MKT_SpendHeader | PlannedMktgSpendHeaderCrcy | ||
| MarketingArea | _MKT_Initiative | MarketingArea | ||
| _MKT_SpendItem | _MKT_SpendItem | |||
| _MKT_SpendHeaderTimeSplit | _MKT_SpendHeaderTimeSplit |
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 A_MKT_SpendHeader.
-- 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: AMKT_SPENDHEADER
CREATE VIEW A_MKT_SpendHeader AS
SELECT
spend_header.MarketingSpendHeaderUUID AS MarketingSpendHeaderUUID,
spend_header.MarketingSpendStatus AS MarketingSpendStatus,
cast(spend_header.Campaign as cuan_api_campaign_uuid preserving type ) AS CampaignUUID,
spend_header.PlannedMktgSpendIsDetailed AS PlannedMktgSpendIsDetailed,
spend_header.MarketingSpendPeriodStartYear AS MarketingSpendPeriodStartYear,
spend_header.MarketingSpendPeriodStartMonth AS MarketingSpendPeriodStartMonth,
cast(_MKT_CalendarMonthStart._Text[1: Language=$session.system_language].CalendarMonthName as cuan_calendarmonthname preserving type ) AS MktgSpendPeriodStartMonthName,
spend_header.MarketingSpendPeriodEndYear AS MarketingSpendPeriodEndYear,
spend_header.MarketingSpendPeriodEndMonth AS MarketingSpendPeriodEndMonth,
cast(_MKT_CalendarMonthEnd._Text[1: Language=$session.system_language].CalendarMonthName as cuan_calendarmonthname preserving type ) AS MktgSpendPeriodEndMonthName,
spend_header.PlannedMktgSpendHeaderAmt AS PlannedMktgSpendHeaderAmt,
spend_header.PlannedMktgSpendHeaderCrcy AS PlannedMktgSpendHeaderCrcy,
_MKT_Initiative.MarketingArea AS MarketingArea
FROM I_MKT_SpendHeader AS spend_header
LEFT OUTER JOIN A_MKT_SpendItem AS _MKT_SpendItem ON MarketingSpendHeaderUUID = _MKT_SpendItem.MarketingSpendHeaderUUID -- association [0..*]
LEFT OUTER JOIN I_MKT_CalendarMonth AS _MKT_CalendarMonthStart ON MarketingSpendPeriodStartMonth = _MKT_CalendarMonthStart.CalendarMonth -- association [0..1]
LEFT OUTER JOIN I_MKT_CalendarMonth AS _MKT_CalendarMonthEnd ON MarketingSpendPeriodEndMonth = _MKT_CalendarMonthEnd.CalendarMonth -- association [0..1]
LEFT OUTER JOIN A_MKT_SpendHeaderTimeSplit AS _MKT_SpendHeaderTimeSplit ON MarketingSpendHeaderUUID = _MKT_SpendHeaderTimeSplit.MarketingSpendHeaderUUID -- association [0..*]
LEFT OUTER JOIN I_Mkt_Initiative AS _MKT_Initiative ON CampaignUUID = _MKT_Initiative.Campaign -- association [1..1]
;
Learn More
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- 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