I_MaterialValuationHist
Material Valuation History
I_MaterialValuationHist is a Composite CDS View that provides data about "Material Valuation History" in SAP S/4HANA. It reads from 3 data sources (I_CompanyCode, Mbv_Mbewh, I_ValuationArea) and exposes 17 fields with key fields Material, ValuationArea, ValuationType, FiscalYearCurrentPeriod, FiscalMonthCurrentPeriod.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CompanyCode | CompanyCode | inner |
| Mbv_Mbewh | MatValHist | from |
| I_ValuationArea | ValuationArea | inner |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Material Valuation History | view | |
| VDM.viewType | #COMPOSITE | view | |
| AbapCatalog.sqlViewName | IMMVALNHIST | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.representativeKey | Material | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view |
Fields (17)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Mbv_Mbewh | matnr | |
| KEY | ValuationArea | Mbv_Mbewh | bwkey | |
| KEY | ValuationType | bwtar | ||
| KEY | FiscalYearCurrentPeriod | Mbv_Mbewh | lfgja | |
| KEY | FiscalMonthCurrentPeriod | Mbv_Mbewh | lfmon | |
| TotalValStockQuantity | lbkum | |||
| StockValueInCCCrcy | salk3 | |||
| MaterialPriceControl | vprsv | |||
| MovingAveragePrice | verpr | |||
| StandardPrice | stprs | |||
| MaterialPriceUnitQty | peinh | |||
| ValuationClass | bklas | |||
| ValBsdOnMvgAvgPrcInCCCrcy | salkv | |||
| TotStkValAtSlsPrcInCoCodeCrcy | vksal | |||
| Currency | I_CompanyCode | Currency | ||
| CompanyCode | I_CompanyCode | CompanyCode | ||
| lfmon01aserdatasCreationDate |
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Material Valuation History'
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'IMMVALNHIST'
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.representativeKey: 'Material'
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
define view I_MaterialValuationHist as select from Mbv_Mbewh as MatValHist
inner join I_ValuationArea as ValuationArea on MatValHist.bwkey = ValuationArea.ValuationArea
inner join I_CompanyCode as CompanyCode on CompanyCode.CompanyCode = ValuationArea.CompanyCode
// Below given inner join to fetch Purch Organiztion has been commmeted since there would be multiple Org's against a plant.
// hence join would fetch multiple records out of this join. This would duplicate MovingAveragePrice data for key combination of ValuationArea and Material.
// inner join I_PlantPurchasingOrganization as PlantPurchOrg on ProductPlant.Plant = PlantPurchOrg.Plant
{
key MatValHist.matnr as Material,
key MatValHist.bwkey as ValuationArea,
key bwtar as ValuationType,
key MatValHist.lfgja as FiscalYearCurrentPeriod,
key MatValHist.lfmon as FiscalMonthCurrentPeriod,
lbkum as TotalValStockQuantity,
salk3 as StockValueInCCCrcy,
vprsv as MaterialPriceControl,
verpr as MovingAveragePrice,
stprs as StandardPrice,
peinh as MaterialPriceUnitQty,
bklas as ValuationClass,
salkv as ValBsdOnMvgAvgPrcInCCCrcy,
vksal as TotStkValAtSlsPrcInCoCodeCrcy,
CompanyCode.Currency as Currency,
CompanyCode.CompanyCode as CompanyCode,
cast ( concat( MatValHist.lfgja , concat( MatValHist.lfmon , '01' ) ) as erdat )as CreationDate
}
Learn More
- 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 Annotations — A Complete Guide
- 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