P_InvtryTurnoverPricing

DDL: P_INVTRYTURNOVERPRICING SQL: PINVTRNOVRPRICE Type: view CONSUMPTION

Inventory Turnover Pricing

P_InvtryTurnoverPricing is a Consumption CDS View that provides data about "Inventory Turnover Pricing" in SAP S/4HANA. It reads from 1 data source (mbew) and exposes 10 fields with key fields CostEstimate, Material, ValuationArea, InventoryValuationType.

Data Sources (1)

SourceAliasJoin Type
mbew mbew from

Parameters (1)

NameTypeDefault
P_EndDate sydate

Annotations (11)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PINVTRNOVRPRICE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Inventory Turnover Pricing view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate mbew kaln1
KEY Material mbew matnr
KEY ValuationArea mbew bwkey
KEY InventoryValuationType mbew bwtar
StandardPriceInCoCodeCrcy
MovingAveragePriceInCoCodeCrcy
MaterialPriceControl
MatPriceUnitInCoCodeCurrency
CompanyCodeCurrency cc Currency
CompanyCode cc CompanyCode
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PINVTRNOVRPRICE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED

@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass:#TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE

@EndUserText.label: 'Inventory Turnover Pricing'
@VDM.private: true
@VDM.viewType: #CONSUMPTION
define view P_InvtryTurnoverPricing
with parameters 
P_EndDate:    sydate 

as select from mbew

    left outer to one join I_Purreqvaluationarea as va
        on mbew.bwkey = va.ValuationArea
    
    left outer to one join I_CompanyCode as cc
        on va.CompanyCode = cc.CompanyCode
    
    left outer to one join I_FiscalCalendarDate as fcd
        on fcd.FiscalYearVariant = cc.FiscalYearVariant
        and fcd.CalendarDate = $parameters.P_EndDate

    left outer to one join ckmlcr as cr
        on mbew.kaln1 = cr.kalnr 
        and cr.untper = '000'
        and cr.curtp = '10'
        and cr.bdatj = fcd.FiscalYear
        and cr.poper = fcd.FiscalPeriod

{
    key mbew.kaln1 as CostEstimate,
    key mbew.matnr as Material,
    key mbew.bwkey as ValuationArea,
    key mbew.bwtar as InventoryValuationType,

    @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
    coalesce(cr.stprs, mbew.stprs) as StandardPriceInCoCodeCrcy,
    @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
    coalesce(cr.pvprs, mbew.verpr) as MovingAveragePriceInCoCodeCrcy,
    coalesce(cr.vprsv, mbew.vprsv) as MaterialPriceControl,
    coalesce(cr.peinh, mbew.peinh) as MatPriceUnitInCoCodeCurrency,
    @Semantics.currencyCode: true
    cc.Currency as CompanyCodeCurrency,
    cc.CompanyCode
} 
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_FISCALCALENDARDATE",
"I_PURREQVALUATIONAREA",
"CKMLCR",
"MBEW"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/