I_RetailPromotion

DDL: I_RETAILPROMOTION Type: view_entity BASIC Package: VDM_RFM_PROMOTION

Retail Promotion

I_RetailPromotion is a Basic CDS View that provides data about "Retail Promotion" in SAP S/4HANA. It reads from 1 data source (wakh) and exposes 51 fields with key field RetailPromotion. It has 21 associations to related views. Part of development package VDM_RFM_PROMOTION.

Data Sources (1)

SourceAliasJoin Type
wakh wakh from

Associations (21)

CardinalityTargetAliasCondition
[0..*] I_RetailPromotionT _Text $projection.RetailPromotion = _Text.RetailPromotion
[1..1] I_SalesOrganization _SalesOrganization $projection.SalesOrganization = _SalesOrganization.SalesOrganization
[1..1] I_DistributionChannel _DistributionChannel $projection.DistributionChannel = _DistributionChannel.DistributionChannel
[0..1] I_PurchasingOrganization _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[0..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[1..1] I_RtlPromotionAnnouncementSts _RtlPromotionAnnouncementSts $projection.PromotionAnnouncementStatus = _RtlPromotionAnnouncementSts.PromotionAnnouncementStatus
[1..1] I_RtlPromnSalesPriceActvtnSts _RtlPromnSalesPriceActvtnSts $projection.SalesPriceActivationStatus = _RtlPromnSalesPriceActvtnSts.SalesPriceActivationStatus
[1..1] I_RetailPromotionType _RetailPromotionType $projection.RetailPromotionType = _RetailPromotionType.RetailPromotionType
[1..1] I_RtlPromnCrtedByAppl _RtlPromnCrtedByAppl $projection.RetailPromotionCrtedByAppl = _RtlPromnCrtedByAppl.RetailPromotionCrtedByAppl
[1..1] I_RtlPromnBlockingReason _RtlPromnBlockingReason $projection.RetailPromnBlockingReason = _RtlPromnBlockingReason.RetailPromnBlockingReason
[1..1] I_RtlPromnProcessingStatus _RtlPromnProcessingStatus $projection.PromotionProcessingStatus = _RtlPromnProcessingStatus.PromotionProcessingStatus
[1..1] I_RtlPromnLstgStatus _RtlPromnLstgStatus $projection.RtlPromnListingStatus = _RtlPromnLstgStatus.RtlPromnListingStatus
[1..1] I_RtlPromnAllocTblStatus _RtlPromnAllocTblStatus $projection.RtlPromnAllocTableStatus = _RtlPromnAllocTblStatus.RtlPromnAllocTableStatus
[0..1] I_RetailPromotionDiscount _RtlPromnHeaderDiscount $projection.RetailPromotion = _RtlPromnHeaderDiscount.RetailPromotion and _RtlPromnHeaderDiscount.RetailPromnDiscountLevel = '05'
[0..*] I_RetailPromotionItem _RetailPromotionItem $projection.RetailPromotion = _RetailPromotionItem.RetailPromotion
[0..*] I_RetailPromotionDiscount _RetailPromotionDiscount $projection.RetailPromotion = _RetailPromotionDiscount.RetailPromotion
[0..1] I_RetailPromotionCategory _RetailPromotionCategory $projection.RetailPromotionCategory = _RetailPromotionCategory.RetailPromotionCategory
[0..1] I_RetailPromotionCustomerType _RetailPromotionCustomerType $projection.RetailPromotionCustomerType = _RetailPromotionCustomerType.RetailPromotionCustomerType
[0..1] I_Currency _PromnPlnHdrCurrency $projection.PromnPlnHdrCurrency = _PromnPlnHdrCurrency.Currency
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID

Annotations (10)

NameValueLevelField
Analytics.technicalName IRTLPROMN view
EndUserText.label Retail Promotion view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #BASIC view
ObjectModel.compositionRoot true view
ObjectModel.representativeKey RetailPromotion view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (51)

KeyFieldSource TableSource FieldDescription
KEY RetailPromotion aktnr
RetailPromotionSalesFromDate vkdab
RetailPromotionSalesToDate vkdbi
PurPriceCndnStartDate ekdab
PurPriceCndnEndDate ekdbi
RetailPromotionType akart
_RetailPromotionType _RetailPromotionType
RetailPromotionIsRefPromotion is_ref_promo
RetailPromotionCrtedByAppl erappl
_RtlPromnCrtedByAppl _RtlPromnCrtedByAppl
RetailPromnHeaderBlockDate spdab
RetailPromnBlockingReason spgru
_RtlPromnBlockingReason _RtlPromnBlockingReason
RetailPromotionRefPromotion ref_promo
SalesOrganization vkorg
_SalesOrganization _SalesOrganization
DistributionChannel vtweg
_DistributionChannel _DistributionChannel
PurchasingOrganization ekorg
_PurchasingOrganization _PurchasingOrganization
PurchasingGroup ekgrp
_PurchasingGroup _PurchasingGroup
RetailPromotionCategory aktyp
_RetailPromotionCategory _RetailPromotionCategory
RetailPromotionCustomerType customer_type
_RetailPromotionCustomerType _RetailPromotionCustomerType
SalesPriceActivationStatus
_RtlPromnSalesPriceActvtnSts _RtlPromnSalesPriceActvtnSts
PromotionAnnouncementStatus
_RtlPromotionAnnouncementSts _RtlPromotionAnnouncementSts
RtlPromnListingStatus akbst
_RtlPromnLstgStatus _RtlPromnLstgStatus
RtlPromnAllocTableStatus akast
_RtlPromnAllocTblStatus _RtlPromnAllocTblStatus
PromotionProcessingStatus akvst
_RtlPromnProcessingStatus _RtlPromnProcessingStatus
PromnPlnHdrCurrency waela
_PromnPlnHdrCurrency _PromnPlnHdrCurrency
PromnPlnTotalItemsPurchasePrc pduep
PromnPlnTotalItemsSalesPrice pduvp
PromnPlnNumberOfArticles pdanz
CreationDate erdat
CreatedByUser ernam
LastChangeDate aedat
LastChangedByUser aenam
_RtlPromnHeaderDiscount _RtlPromnHeaderDiscount
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_Text _Text
_RetailPromotionItem _RetailPromotionItem
_RetailPromotionDiscount _RetailPromotionDiscount
@Analytics.technicalName: 'IRTLPROMN'
@EndUserText: {label: 'Retail Promotion'}

@AccessControl: {
    authorizationCheck: #CHECK,
    personalData.blocking: #NOT_REQUIRED
}

@VDM: {viewType: #BASIC}
@ObjectModel: {
    compositionRoot: true,
    semanticKey: ['RetailPromotion'],
    representativeKey: 'RetailPromotion',
    usageType: {
        serviceQuality: #A,
        sizeCategory: #M,
        dataClass: #TRANSACTIONAL
   }
}

define view entity I_RetailPromotion
  as select from wakh

  association [0..*] to I_RetailPromotionT            as _Text                        on  $projection.RetailPromotion = _Text.RetailPromotion
  association [1..1] to I_SalesOrganization           as _SalesOrganization           on  $projection.SalesOrganization = _SalesOrganization.SalesOrganization
  association [1..1] to I_DistributionChannel         as _DistributionChannel         on  $projection.DistributionChannel = _DistributionChannel.DistributionChannel
  association [0..1] to I_PurchasingOrganization      as _PurchasingOrganization      on  $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
  association [0..1] to I_PurchasingGroup             as _PurchasingGroup             on  $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
  association [1..1] to I_RtlPromotionAnnouncementSts as _RtlPromotionAnnouncementSts on  $projection.PromotionAnnouncementStatus = _RtlPromotionAnnouncementSts.PromotionAnnouncementStatus
  association [1..1] to I_RtlPromnSalesPriceActvtnSts as _RtlPromnSalesPriceActvtnSts on  $projection.SalesPriceActivationStatus = _RtlPromnSalesPriceActvtnSts.SalesPriceActivationStatus
  association [1..1] to I_RetailPromotionType         as _RetailPromotionType         on  $projection.RetailPromotionType = _RetailPromotionType.RetailPromotionType
  association [1..1] to I_RtlPromnCrtedByAppl         as _RtlPromnCrtedByAppl         on  $projection.RetailPromotionCrtedByAppl = _RtlPromnCrtedByAppl.RetailPromotionCrtedByAppl
  association [1..1] to I_RtlPromnBlockingReason      as _RtlPromnBlockingReason      on  $projection.RetailPromnBlockingReason = _RtlPromnBlockingReason.RetailPromnBlockingReason
  association [1..1] to I_RtlPromnProcessingStatus    as _RtlPromnProcessingStatus    on  $projection.PromotionProcessingStatus = _RtlPromnProcessingStatus.PromotionProcessingStatus
  association [1..1] to I_RtlPromnLstgStatus          as _RtlPromnLstgStatus          on  $projection.RtlPromnListingStatus = _RtlPromnLstgStatus.RtlPromnListingStatus
  association [1..1] to I_RtlPromnAllocTblStatus      as _RtlPromnAllocTblStatus      on  $projection.RtlPromnAllocTableStatus = _RtlPromnAllocTblStatus.RtlPromnAllocTableStatus
  association [0..1] to I_RetailPromotionDiscount     as _RtlPromnHeaderDiscount      on  $projection.RetailPromotion                      = _RtlPromnHeaderDiscount.RetailPromotion
                                                                                      and _RtlPromnHeaderDiscount.RetailPromnDiscountLevel = '05' // maximum one entry with Level = 05


  association [0..*] to I_RetailPromotionItem         as _RetailPromotionItem         on  $projection.RetailPromotion = _RetailPromotionItem.RetailPromotion
  association [0..*] to I_RetailPromotionDiscount     as _RetailPromotionDiscount     on  $projection.RetailPromotion = _RetailPromotionDiscount.RetailPromotion

  association [0..1] to I_RetailPromotionCategory     as _RetailPromotionCategory     on  $projection.RetailPromotionCategory = _RetailPromotionCategory.RetailPromotionCategory
  association [0..1] to I_RetailPromotionCustomerType as _RetailPromotionCustomerType on  $projection.RetailPromotionCustomerType = _RetailPromotionCustomerType.RetailPromotionCustomerType
  association [0..1] to I_Currency                    as _PromnPlnHdrCurrency         on  $projection.PromnPlnHdrCurrency = _PromnPlnHdrCurrency.Currency

  // Administrative data

  association [0..1] to I_User                        as _CreatedByUser               on  $projection.CreatedByUser = _CreatedByUser.UserID
  association [0..1] to I_User                        as _LastChangedByUser           on  $projection.LastChangedByUser = _LastChangedByUser.UserID
{
      @ObjectModel: {text: {association: '_Text'}}
  key aktnr                                                                                                        as RetailPromotion,

      vkdab                                                                                                        as RetailPromotionSalesFromDate,
      vkdbi                                                                                                        as RetailPromotionSalesToDate,
      ekdab                                                                                                        as PurPriceCndnStartDate,
      ekdbi                                                                                                        as PurPriceCndnEndDate,
      @ObjectModel.foreignKey.association: '_RetailPromotionType'
      akart                                                                                                        as RetailPromotionType,
      _RetailPromotionType,
      is_ref_promo                                                                                                 as RetailPromotionIsRefPromotion,
      @ObjectModel.foreignKey.association: '_RtlPromnCrtedByAppl'
      erappl                                                                                                       as RetailPromotionCrtedByAppl,
      _RtlPromnCrtedByAppl,
      spdab                                                                                                        as RetailPromnHeaderBlockDate,
      @ObjectModel.foreignKey.association: '_RtlPromnBlockingReason'
      spgru                                                                                                        as RetailPromnBlockingReason,
      _RtlPromnBlockingReason,

      ref_promo                                                                                                    as RetailPromotionRefPromotion,


      @ObjectModel.foreignKey.association: '_SalesOrganization'
      vkorg                                                                                                        as SalesOrganization,
      _SalesOrganization,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      vtweg                                                                                                        as DistributionChannel,
      _DistributionChannel,
      @ObjectModel.foreignKey.association: '_PurchasingOrganization'
      ekorg                                                                                                        as PurchasingOrganization,
      _PurchasingOrganization,
      @ObjectModel.foreignKey.association: '_PurchasingGroup'
      ekgrp                                                                                                        as PurchasingGroup,
      _PurchasingGroup,

      @ObjectModel.foreignKey.association: '_RetailPromotionCategory'
      aktyp                                                                                                        as RetailPromotionCategory,
      _RetailPromotionCategory,
      @ObjectModel.foreignKey.association: '_RetailPromotionCustomerType'
      customer_type                                                                                                as RetailPromotionCustomerType,
      _RetailPromotionCustomerType,

      @ObjectModel.foreignKey.association:  '_RtlPromnSalesPriceActvtnSts'
      cast(vkgst as salespriceactivationstatus preserving type )                                                   as SalesPriceActivationStatus,
      _RtlPromnSalesPriceActvtnSts,
      @ObjectModel.foreignKey.association: '_RtlPromotionAnnouncementSts'
      cast(bekst as promotionannouncementstatus preserving type )                                                  as PromotionAnnouncementStatus,
      _RtlPromotionAnnouncementSts,
      @ObjectModel: {foreignKey: {association: '_RtlPromnLstgStatus'}}
      akbst                                                                                                        as RtlPromnListingStatus,
      _RtlPromnLstgStatus,
      @ObjectModel: {foreignKey: {association: '_RtlPromnAllocTblStatus'}}
      akast                                                                                                        as RtlPromnAllocTableStatus,
      _RtlPromnAllocTblStatus,

      @ObjectModel: {foreignKey: {association: '_RtlPromnProcessingStatus'}}
      akvst                                                                                                        as PromotionProcessingStatus,
      _RtlPromnProcessingStatus,


      waela                                                                                                        as PromnPlnHdrCurrency,
      _PromnPlnHdrCurrency,
      @Semantics.amount.currencyCode: 'PromnPlnHdrCurrency'
      pduep                                                                                                        as PromnPlnTotalItemsPurchasePrc,
      @Semantics.amount.currencyCode: 'PromnPlnHdrCurrency'
      pduvp                                                                                                        as PromnPlnTotalItemsSalesPrice,
      pdanz
                                                                                                                   as PromnPlnNumberOfArticles,
      // Administrative Data

      @Semantics.systemDate.createdAt: true
      erdat                                                                                                        as CreationDate,
      ernam                                                                                                        as CreatedByUser,
      @Semantics.systemDate.lastChangedAt: true
      aedat                                                                                                        as LastChangeDate,
      aenam                                                                                                        as LastChangedByUser,


      // Associations

      _RtlPromnHeaderDiscount,
      _CreatedByUser,
      _LastChangedByUser,


      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _Text,
      _RetailPromotionItem,
      _RetailPromotionDiscount
}