I_MKT_MarketingScoreCube

DDL: I_MKT_MARKETINGSCORECUBE SQL: IMKTSCRC Type: view COMPOSITE Package: CUAN_CDS_SCORE

Mktg: Scores of Interaction Contacts - Cube

I_MKT_MarketingScoreCube is a Composite CDS View (Cube) that provides data about "Mktg: Scores of Interaction Contacts - Cube" in SAP S/4HANA. It reads from 1 data source (I_MKT_IntactnCntctScoreVal) and exposes 55 fields with key fields MarketingScoreUUID, MktgScoreVersion, InteractionContact. It has 7 associations to related views. Part of development package CUAN_CDS_SCORE.

Data Sources (1)

SourceAliasJoin Type
I_MKT_IntactnCntctScoreVal I_MKT_IntactnCntctScoreVal from

Parameters (2)

NameTypeDefault
P_StartDate cuan_start_date
P_EndDate cuan_end_date

Associations (7)

CardinalityTargetAliasCondition
[0..1] I_MKT_MktgScoreModelVH _MKT_ModelScenVH $projection.PredictiveModelUUID = _MKT_ModelScenVH.PredictiveModelUUID and $projection.predictivemodel = _MKT_ModelScenVH.PredictiveModel
[0..1] I_MKT_CorpAcctCntctsVH _MKT_CorpAcctCntctsVH $projection.CorporateAccountUUID = _MKT_CorpAcctCntctsVH.CorporateAccountUUID
[0..1] I_MKT_Market _MKT_Market $projection.market = _MKT_Market.Market
[0..1] I_Mkt_IcAgeRange _Mkt_IcAgeRange $projection.AgeRange = _Mkt_IcAgeRange.AgeRange
[1..1] E_MKT_CONTACT _ExtensionInteractionContact $projection.InteractionContact = _ExtensionInteractionContact.InteractionContact
[1..1] E_MKT_PERSON _ExtensionPerson $projection.InteractionContact = _ExtensionPerson.Person
[1..1] E_MKT_COMPANY _ExtensionCompany $projection.InteractionContact = _ExtensionCompany.Company

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName IMKTSCRC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Mktg: Scores of Interaction Contacts - Cube view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
Analytics.internalName #LOCAL view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view

Fields (55)

KeyFieldSource TableSource FieldDescription
KEY MarketingScoreUUID
KEY MktgScoreVersion I_MKT_IntactnCntctScoreVal MktgScoreVersion
KEY InteractionContact I_MKT_IntactnCntctScoreVal InteractionContact Contact Key
SumMarketingScoreValue I_MKT_IntactnCntctScoreVal MarketingScoreValue
NumberOfScores
MktgScoreValueCategory I_MKT_IntactnCntctScoreVal MktgScoreValueCategory
MktgScoreVersionDate I_MKT_IntactnCntctScoreVal MktgScoreVersionDate
CalendarYear
YearQuarter
YearMonth
YearWeek
MktgScoreIsCurrentVersion I_MKT_IntactnCntctScoreVal MktgScoreIsCurrentVersion
PredictiveScenario I_MKT_IntactnCntctScoreVal PredictiveScenario
PredictiveModelUUID I_MKT_IntactnCntctScoreVal PredictiveModelUUID NodeID
PredictiveModel
FullName
InteractionContactAge InteractionContactAge
char10endascuan_cds_age_rangeasAgeRange
Country
AddressRegion
GenderCode
Market
Industry
InteractionContactFunction
Department
ValidationStatus
EmailAddress
CompanyName
IsConsumer
IsContactPerson
InteractionContactType
InteractionContactOrigin I_MKT_IntactnCntctScoreVal InteractionContactOrigin
CorporateAccountUUID
CorporateAccountName
CorpAcctIsRlvtForAcctBasedMktg
_MKT_MktgScoreValueCategory I_MKT_IntactnCntctScoreVal _MKT_MktgScoreValueCategory
_MKT_CalendarDate I_MKT_IntactnCntctScoreVal _MKT_CalendarDate
_MKT_MarketingScore I_MKT_IntactnCntctScoreVal _MKT_MarketingScore
MarketingArea
PredictiveScenarioType
_MKT_MarketingScoreModel I_MKT_IntactnCntctScoreVal _MKT_MarketingScoreModel
_MKT_ModelScenVH _MKT_ModelScenVH
_MKT_IntactnCntctMktgArea I_MKT_IntactnCntctScoreVal _MKT_IntactnCntctMktgArea
_Mkt_Contact I_MKT_IntactnCntctScoreVal _Mkt_Contact
_MKT_Country
_MKT_Region
_MKT_Gender
_MKT_Industry
_MKT_Function
_MKT_Department
_MKT_ValidationStatus
_Mkt_IcAgeRange _Mkt_IcAgeRange
_MKT_CorporateAccount I_MKT_IntactnCntctScoreVal _MKT_CorporateAccount
_MKT_CorpAcctCntctsVH _MKT_CorpAcctCntctsVH
_MKT_Market _MKT_Market

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_MarketingScoreCube.
-- 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: IMKTSCRC
-- Parameters: P_StartDate : cuan_start_date, P_EndDate : cuan_end_date

CREATE VIEW I_MKT_MarketingScoreCube AS
SELECT
  cast(I_MKT_IntactnCntctScoreVal.MarketingScoreUUID as cuan_cds_pm_score_uuid) AS MarketingScoreUUID,
  I_MKT_IntactnCntctScoreVal.MktgScoreVersion AS MktgScoreVersion,
  I_MKT_IntactnCntctScoreVal.InteractionContact AS InteractionContact,
  I_MKT_IntactnCntctScoreVal.MarketingScoreValue AS SumMarketingScoreValue,
  cast (1 as cuan_cds_pm_number_of_score) AS NumberOfScores,
  I_MKT_IntactnCntctScoreVal.MktgScoreValueCategory AS MktgScoreValueCategory,
  I_MKT_IntactnCntctScoreVal.MktgScoreVersionDate AS MktgScoreVersionDate,
  cast ( I_MKT_IntactnCntctScoreVal._MKT_CalendarDate.CalendarYear as cuan_year_cds ) AS CalendarYear,
  I_MKT_IntactnCntctScoreVal._MKT_CalendarDate.YearQuarter AS YearQuarter,
  I_MKT_IntactnCntctScoreVal._MKT_CalendarDate.YearMonth AS YearMonth,
  I_MKT_IntactnCntctScoreVal._MKT_CalendarDate.YearWeek AS YearWeek,
  I_MKT_IntactnCntctScoreVal.MktgScoreIsCurrentVersion AS MktgScoreIsCurrentVersion,
  I_MKT_IntactnCntctScoreVal.PredictiveScenario AS PredictiveScenario,
  I_MKT_IntactnCntctScoreVal.PredictiveModelUUID AS PredictiveModelUUID,
  I_MKT_IntactnCntctScoreVal._MKT_MarketingScoreModel.PredictiveModel AS PredictiveModel,
  cast( I_MKT_IntactnCntctScoreVal._Mkt_Contact.FullName as cuan_pm_contact_name preserving type) AS FullName,
  InteractionContactAge,
  cast( case when ( InteractionContactAge > 0 and InteractionContactAge < 13 ) then cast ( 1 as abap.char( 10 ) ) when ( InteractionContactAge >= 13 and InteractionContactAge <= 17 ) then cast ( 2 as abap.char( 10 ) ) when ( InteractionContactAge >= 18 and InteractionContactAge <= 24 ) then cast ( 3 as abap.char( 10 ) ) when ( InteractionContactAge >= 25 and InteractionContactAge <= 34 ) then cast ( 4 as abap.char( 10 ) ) when ( InteractionContactAge >= 35 and InteractionContactAge <= 44 ) then cast ( 5 as abap.char( 10 ) ) when ( InteractionContactAge >= 45 and InteractionContactAge <= 54 ) then cast ( 6 as abap.char( 10 ) ) when ( InteractionContactAge >= 55 and InteractionContactAge <= 64 ) then cast ( 7 as abap.char( 10 ) ) when ( InteractionContactAge > 65 ) then cast ( 8 as abap.char( 10 ) ) else cast (0 as abap.char( 10 ) ) end as cuan_cds_age_range ) as AgeRange AS char10endascuan_cds_age_rangeasAgeRange,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.Country AS Country,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.AddressRegion AS AddressRegion,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.GenderCode AS GenderCode,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact._MKT_CountryMarket.Market AS Market,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.Industry AS Industry,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.Function AS InteractionContactFunction,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.Department AS Department,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.ValidationStatus AS ValidationStatus,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.EmailAddress AS EmailAddress,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.CompanyName AS CompanyName,
  cast (I_MKT_IntactnCntctScoreVal._Mkt_Contact.IsConsumer as cuan_isconsumer preserving type) AS IsConsumer,
  cast (I_MKT_IntactnCntctScoreVal._Mkt_Contact.IsContactPerson as cuan_iscontact_person preserving type) AS IsContactPerson,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact.InteractionContactType AS InteractionContactType,
  I_MKT_IntactnCntctScoreVal.InteractionContactOrigin AS InteractionContactOrigin,
  cast(I_MKT_IntactnCntctScoreVal.CorporateAccountUUID as cuan_cds_account preserving type) AS CorporateAccountUUID,
  cast(I_MKT_IntactnCntctScoreVal._MKT_CorporateAccount.FullName as cuan_api_corp_acct_name preserving type) AS CorporateAccountName,
  I_MKT_IntactnCntctScoreVal._MKT_CorporateAccount.CorpAcctIsRlvtForAcctBasedMktg AS CorpAcctIsRlvtForAcctBasedMktg,
  I_MKT_IntactnCntctScoreVal._MKT_MktgScoreValueCategory AS _MKT_MktgScoreValueCategory,
  I_MKT_IntactnCntctScoreVal._MKT_CalendarDate AS _MKT_CalendarDate,
  I_MKT_IntactnCntctScoreVal._MKT_MarketingScore AS _MKT_MarketingScore,
  I_MKT_IntactnCntctScoreVal._MKT_MarketingScore.MarketingArea AS MarketingArea,
  I_MKT_IntactnCntctScoreVal._MKT_MarketingScore.PredictiveScenarioType AS PredictiveScenarioType,
  I_MKT_IntactnCntctScoreVal._MKT_MarketingScoreModel AS _MKT_MarketingScoreModel,
  I_MKT_IntactnCntctScoreVal._MKT_IntactnCntctMktgArea AS _MKT_IntactnCntctMktgArea,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact AS _Mkt_Contact,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact._MKT_Country AS _MKT_Country,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact._MKT_Region AS _MKT_Region,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact._MKT_Gender AS _MKT_Gender,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact._MKT_Industry AS _MKT_Industry,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact._MKT_Function AS _MKT_Function,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact._MKT_Department AS _MKT_Department,
  I_MKT_IntactnCntctScoreVal._Mkt_Contact._MKT_ValidationStatus AS _MKT_ValidationStatus,
  I_MKT_IntactnCntctScoreVal._MKT_CorporateAccount AS _MKT_CorporateAccount
FROM I_MKT_IntactnCntctScoreVal
LEFT OUTER JOIN I_MKT_MktgScoreModelVH AS _MKT_ModelScenVH ON PredictiveModelUUID = _MKT_ModelScenVH.PredictiveModelUUID AND predictivemodel = _MKT_ModelScenVH.PredictiveModel  -- association [0..1]
LEFT OUTER JOIN I_MKT_CorpAcctCntctsVH AS _MKT_CorpAcctCntctsVH ON CorporateAccountUUID = _MKT_CorpAcctCntctsVH.CorporateAccountUUID  -- association [0..1]
LEFT OUTER JOIN I_MKT_Market AS _MKT_Market ON market = _MKT_Market.Market  -- association [0..1]
LEFT OUTER JOIN I_Mkt_IcAgeRange AS _Mkt_IcAgeRange ON AgeRange = _Mkt_IcAgeRange.AgeRange  -- association [0..1]
LEFT OUTER JOIN E_MKT_CONTACT AS _ExtensionInteractionContact ON InteractionContact = _ExtensionInteractionContact.InteractionContact  -- association [1..1]
LEFT OUTER JOIN E_MKT_PERSON AS _ExtensionPerson ON InteractionContact = _ExtensionPerson.Person  -- association [1..1]
LEFT OUTER JOIN E_MKT_COMPANY AS _ExtensionCompany ON InteractionContact = _ExtensionCompany.Company  -- association [1..1]
;