I_RetailPromotionItem

DDL: I_RETAILPROMOTIONITEM Type: view_entity BASIC

Retail Promotion Item

I_RetailPromotionItem is a Basic CDS View that provides data about "Retail Promotion Item" in SAP S/4HANA. It reads from 1 data source (wakp) and exposes 46 fields with key fields RetailPromotion, Product, SalesQuantityUnit. It has 14 associations to related views.

Data Sources (1)

SourceAliasJoin Type
wakp wakp from

Associations (14)

CardinalityTargetAliasCondition
[1..1] I_RetailPromotion _RetailPromotion $projection.RetailPromotion = _RetailPromotion.RetailPromotion
[0..*] I_RetailPromotionItemStore _RetailPromotionItemStore $projection.RetailPromotion = _RetailPromotionItemStore.RetailPromotion and $projection.Product = _RetailPromotionItemStore.Product and $projection.SalesQuantityUnit = _RetailPromotionItemStore.SalesQuantityUnit
[1..1] I_RtlPromnBlockingReason _RtlPromnBlockingReason $projection.RetailPromnBlockingReason = _RtlPromnBlockingReason.RetailPromnBlockingReason
[0..1] I_RtlPromnDiscountStatus _RtlPromnDiscountStatus $projection.RetailPromotionDiscountStatus = _RtlPromnDiscountStatus.RetailPromotionDiscountStatus
[1..1] I_Product _Product $projection.Product = _Product.Product
[0..1] I_Product _GenericProduct $projection.CrossPlantConfigurableProduct = _GenericProduct.Product
[1..1] I_UnitOfMeasure _UnitOfMeasure $projection.SalesQuantityUnit = _UnitOfMeasure.UnitOfMeasure
[0..1] I_ClassHeader _ClassHeader $projection.ProductGroup = _ClassHeader.Class and _ClassHeader.ClassType = '026'
[0..1] I_AllocationTable _AllocationTable $projection.AllocationTable = _AllocationTable.AllocationTable
[0..1] I_AllocationTableItem _AllocationTableItem $projection.AllocationTable = _AllocationTableItem.AllocationTable and $projection.AllocationTableItem = _AllocationTableItem.AllocationTableItem
[0..1] I_Currency _PromnPlnItmCurrency $projection.PromnPlnItmCurrency = _PromnPlnItmCurrency.Currency
[0..1] I_Currency _PromnPlnItmPurchaseCurrency $projection.PromnPlnItmPurchaseCurrency = _PromnPlnItmPurchaseCurrency.Currency
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID

Annotations (8)

NameValueLevelField
Analytics.technicalName IRTLPROMNITEM view
EndUserText.label Retail Promotion Item view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #BASIC view
ObjectModel.representativeKey Product view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (46)

KeyFieldSource TableSource FieldDescription
KEY RetailPromotion aktnr
KEY Product
_Product _Product
KEY SalesQuantityUnit mebme
_UnitOfMeasure _UnitOfMeasure
RetailPromotionItem akpos
PromnPlnItmCurrency waela
_PromnPlnItmCurrency _PromnPlnItmCurrency
PromnPlnItmSalesPrice plvkp
RtlPromotionItemSalesPriceQty vpein
RetailPromnDiscountAmount reb_value
QuantityUnit
RetailPromotionDiscountPercent reb_perc
RetailPromotionDiscountStatus reb_status
_RtlPromnDiscountStatus _RtlPromnDiscountStatus
PromnPlnItmSalesQuantity pabbm
PromnPlnItmPurchaseCurrency waeek
_PromnPlnItmPurchaseCurrency _PromnPlnItmPurchaseCurrency
PromnPlnItmPurchasePrice plekp
PrcWithoutPrcCalcIsActive no_kalk
NmbrOfRtlPromnItmPriceActvtn activ
RetailPromnItemBlockDate spdat
RetailPromnBlockingReason spgru
_RtlPromnBlockingReason _RtlPromnBlockingReason
RetailPromotionSalesFromDate vk_aktiv_ab
RetailPromotionSalesToDate vk_aktiv_bi
PromnPlnItmTotalQtySalesPrice pumvp
PromnPlnItmTotalQtyPurPrice pumep
CrossPlantConfigurableProduct
_GenericProduct _GenericProduct
ProductGroup matkl
_ClassHeader _ClassHeader
AllocationTable abeln
_AllocationTable _AllocationTable
AllocationTableItem abelp
_AllocationTableItem _AllocationTableItem
AllocationUnit meauf
AllocationTableQty aufme
CreationDate erdat
CreatedByUser ernam
_CreatedByUser _CreatedByUser
LastChangeDate aedat
LastChangedByUser aenam
_LastChangedByUser _LastChangedByUser
_RetailPromotion _RetailPromotion
_RetailPromotionItemStore _RetailPromotionItemStore
@Analytics.technicalName: 'IRTLPROMNITEM'
@EndUserText: {label: 'Retail Promotion Item'}

@AccessControl: {authorizationCheck: #CHECK }
@VDM: {viewType: #BASIC}

@ObjectModel: {
    semanticKey: ['RetailPromotion', 'RetailPromotionItem'],
    representativeKey: 'Product',
    usageType: {
        serviceQuality: #A,
        sizeCategory: #L,
        dataClass: #TRANSACTIONAL
   }
}

define view entity I_RetailPromotionItem
  as select from wakp

  association [1..1] to I_RetailPromotion          as _RetailPromotion             on  $projection.RetailPromotion = _RetailPromotion.RetailPromotion
  association [0..*] to I_RetailPromotionItemStore as _RetailPromotionItemStore    on  $projection.RetailPromotion   = _RetailPromotionItemStore.RetailPromotion
                                                                                   and $projection.Product           = _RetailPromotionItemStore.Product
                                                                                   and $projection.SalesQuantityUnit = _RetailPromotionItemStore.SalesQuantityUnit

  association [1..1] to I_RtlPromnBlockingReason   as _RtlPromnBlockingReason      on  $projection.RetailPromnBlockingReason = _RtlPromnBlockingReason.RetailPromnBlockingReason
  association [0..1] to I_RtlPromnDiscountStatus   as _RtlPromnDiscountStatus      on  $projection.RetailPromotionDiscountStatus = _RtlPromnDiscountStatus.RetailPromotionDiscountStatus

  association [1..1] to I_Product                  as _Product                     on  $projection.Product = _Product.Product
  association [0..1] to I_Product                  as _GenericProduct              on  $projection.CrossPlantConfigurableProduct = _GenericProduct.Product
  association [1..1] to I_UnitOfMeasure            as _UnitOfMeasure               on  $projection.SalesQuantityUnit = _UnitOfMeasure.UnitOfMeasure
  association [0..1] to I_ClassHeader              as _ClassHeader                 on  $projection.ProductGroup = _ClassHeader.Class
                                                                                   and _ClassHeader.ClassType   = '026' // is unique with Retail Class Type

  association [0..1] to I_AllocationTable          as _AllocationTable             on  $projection.AllocationTable = _AllocationTable.AllocationTable
  association [0..1] to I_AllocationTableItem      as _AllocationTableItem         on  $projection.AllocationTable     = _AllocationTableItem.AllocationTable
                                                                                   and $projection.AllocationTableItem = _AllocationTableItem.AllocationTableItem
  association [0..1] to I_Currency                 as _PromnPlnItmCurrency         on  $projection.PromnPlnItmCurrency = _PromnPlnItmCurrency.Currency
  association [0..1] to I_Currency                 as _PromnPlnItmPurchaseCurrency on  $projection.PromnPlnItmPurchaseCurrency = _PromnPlnItmPurchaseCurrency.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: {foreignKey: {association: '_RetailPromotion'}}
  key aktnr                                        as RetailPromotion,

      @ObjectModel: {foreignKey: {association: '_Product'}}
  key cast(artnr as productnumber preserving type) as Product,
      _Product,

      @ObjectModel: {foreignKey: {association: '_UnitOfMeasure'}}
  key mebme                                        as SalesQuantityUnit,
      _UnitOfMeasure,


      akpos                                        as RetailPromotionItem,

      waela                                        as PromnPlnItmCurrency,
      _PromnPlnItmCurrency,

      @Semantics.amount.currencyCode: 'PromnPlnItmCurrency'
      plvkp                                        as PromnPlnItmSalesPrice,

      @Semantics.quantity.unitOfMeasure: 'SalesQuantityUnit'
      vpein                                        as RtlPromotionItemSalesPriceQty,

      @Semantics.amount.currencyCode: 'PromnPlnItmCurrency'
      reb_value                                    as RetailPromnDiscountAmount,

      cast( '%' as mebme )                         as QuantityUnit,

      @Semantics.quantity.unitOfMeasure: 'QuantityUnit'
      reb_perc                                     as RetailPromotionDiscountPercent,

      @ObjectModel: {foreignKey: {association: '_RtlPromnDiscountStatus'}}
      reb_status                                   as RetailPromotionDiscountStatus,
      _RtlPromnDiscountStatus,

      @Semantics.quantity.unitOfMeasure: 'SalesQuantityUnit'
      pabbm                                        as PromnPlnItmSalesQuantity,

      waeek                                        as PromnPlnItmPurchaseCurrency,
      _PromnPlnItmPurchaseCurrency,

      @Semantics.amount.currencyCode: 'PromnPlnItmPurchaseCurrency'
      plekp                                        as PromnPlnItmPurchasePrice,

      @Semantics.booleanIndicator: true
      no_kalk                                      as PrcWithoutPrcCalcIsActive,

      activ                                        as NmbrOfRtlPromnItmPriceActvtn,

      spdat                                        as RetailPromnItemBlockDate,


      @ObjectModel: {foreignKey: {association: '_RtlPromnBlockingReason'}}
      spgru                                        as RetailPromnBlockingReason,
      _RtlPromnBlockingReason,

      vk_aktiv_ab                                  as RetailPromotionSalesFromDate,


      vk_aktiv_bi                                  as RetailPromotionSalesToDate,


      @Semantics.amount.currencyCode: 'PromnPlnItmPurchaseCurrency'
      pumvp                                        as PromnPlnItmTotalQtySalesPrice,

      @Semantics.amount.currencyCode: 'PromnPlnItmCurrency'
      pumep                                        as PromnPlnItmTotalQtyPurPrice,

      @ObjectModel: {foreignKey: {association: '_GenericProduct'}}
      cast(satnr as productnumber preserving type) as CrossPlantConfigurableProduct,
      _GenericProduct,

      @ObjectModel: {foreignKey: {association: '_ClassHeader'}}
      matkl                                        as ProductGroup,
      _ClassHeader,

      @ObjectModel.foreignKey.association: '_AllocationTable'
      abeln                                        as AllocationTable,
      _AllocationTable,

      @ObjectModel.foreignKey.association: '_AllocationTableItem'
      abelp                                        as AllocationTableItem,
      _AllocationTableItem,

      meauf                                        as AllocationUnit,


      @Semantics.quantity.unitOfMeasure: 'AllocationUnit'
      aufme                                        as AllocationTableQty, //AllocationTableQuantity,




      @Semantics.systemDate.createdAt: true
      erdat                                        as CreationDate,
      ernam                                        as CreatedByUser,
      _CreatedByUser,

      @Semantics.systemDate.lastChangedAt: true
      aedat                                        as LastChangeDate,
      aenam                                        as LastChangedByUser,
      _LastChangedByUser,



      @ObjectModel.association.type: [#TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT]
      _RetailPromotion,

      _RetailPromotionItemStore

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"WAKP"
],
"ASSOCIATED":
[
"I_ALLOCATIONTABLE",
"I_ALLOCATIONTABLEITEM",
"I_CLASSHEADER",
"I_CURRENCY",
"I_PRODUCT",
"I_RETAILPROMOTION",
"I_RETAILPROMOTIONITEMSTORE",
"I_RTLPROMNBLOCKINGREASON",
"I_RTLPROMNDISCOUNTSTATUS",
"I_UNITOFMEASURE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/