0% found this document useful (0 votes)
146 views5 pages

E - 20250409 SAP Note

SAP Note 2337368 provides guidance on adjusting customer enhancements and functionalities for the new Inventory Valuation data model in S/4HANA 1610. It outlines changes in data retrieval methods, the impact of customer appends on database tables, and necessary adjustments for maintaining compatibility with the new model. Additionally, it emphasizes performance considerations and recommends specific coding practices to optimize database operations.

Uploaded by

Muhammad Uzair
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views5 pages

E - 20250409 SAP Note

SAP Note 2337368 provides guidance on adjusting customer enhancements and functionalities for the new Inventory Valuation data model in S/4HANA 1610. It outlines changes in data retrieval methods, the impact of customer appends on database tables, and necessary adjustments for maintaining compatibility with the new model. Additionally, it emphasizes performance considerations and recommends specific coding practices to optimize database operations.

Uploaded by

Muhammad Uzair
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

SAP Note

2337368 - Inventory Valuation (part of Materials Management - Inventory


Management) : Change of data model in S/4HANA 1610
Component: MM-IM-GF-VAL (Materials Management > Inventory Management > Basic Functions > Goods
Movement Valuation), Version: 10, Released On: 10.01.2020

Symptom
You want to install SAP S/4HANA 1610 Inventory Management and need additional information how to adjust your customer
enhancements, modifications or own functionalities to the new, simplified Inventory Valuation data model.

Other Terms
S4TC, S/4 transition, S4HANA 1610, Migration, S4 HANA, MM-IM, Material Management, Inventory Valuation, Material
Valuation, MBEW, compatibility view

Reason and Prerequisites


You have customer enhancements, modifications or own functionalities in the area of inventory valuation (component MM-
IM-GF-VAL) which were built for SAP ERP 6.0.
Before S/4HANA, the inventory valuation tables xBEW(H) (tables: EBEW, EBEWH, MBEW, MBEWH, OBEW, OBEWH,
QBEW, QBEWH) contain transactional as well as master data attributes.
With S/4HANA, the inventory valuation tables do still exist as DDIC definition as well as database object. However, they will
only be used to store material master data attributes. The transactional fields LBKUM SALK3 and VKSAL will be retrieved
from the Universal Journal Entry Line Items table (ACDOCA) with on-the-fly aggregation. And the transactional field SALKV
will be retrieved from the Material Ledger table. Hence, those fields are not updated anymore in the original xBEW(H) tables.
As a consequence, the above mentioned tables need to be updated less often, which leads to a higher throughput due to less
database locks.
For compatibility reasons there are Core Data Service (CDS) Views assigned as proxy objects to all those tables ensuring that
each read access to one of the mentioned tables still returns the data as before. The CDS-views consist of database joins in
order to retrieve both master data from the original xBEW(H) table and transactional data from Universal Journal Entry Line
Items table and Material Ledger table.
Hence all customer coding, reading data from those tables, will work as before because each read access to one of the tables
will get redirected in the database interface layer of NetWeaver to the assigned CDS view. Write accesses to those tables have
to be adjusted, if transactional fields are affected.
The following table gives an overview of the new relevant database objects in the S/4HANA Inventory Valuation data model:

Tabl Table description DDL source of CDS Redirecte View to read the content of the o View to read ma
e view for redirect (pr d view in riginal database table (w/o redir ster data attribu
oxy view) ABAP ect to proxy view) tes only

EBE Sales Order Stock Val MBV_EBEW MBVEBEW MBVEBEWOLD V_EBEW_MD


W uation

EBE History of Sales Orde MBV_EBEWH MBVEBEW MBVEBEWHOLD V_EBEWH_MD


WH r Stock Valuation H

MBE Material Valuation MBV_MBEW MBVMBE MBVMBEWOLD V_MBEW_MD


W W

MBE History of Material V MBV_MBEWH MBVMBE MBVMBEWHOLD V_MBEWH_MD


WH aluation WH

OBE Valuated Stock with MBV_OBEW MBVOBEW MBVOBEWOLD V_OBEW_MD


W Subcontractor (Japa
n)
OBE History of Valuated S MBV_OBEWH MBVOBEW MBVOBEWHOLD V_OBEWH_MD
WH tock with Subcontrac H
tor (Japan)

QBE Project Stock Valuati MBV_QBEW MBVQBEW MBVQBEWOLD V_QBEW_MD


W on

QBE History of Project Sto MBV_QBEWH MBVQBEW MBVQBEWHOLD V_QBEWH_MD


WH ck Valuation H

Table 1: Affected tables with information about corresponding proxy objects, views for accessing original database table and views for reading master data
only

Solution
One impact of the simplified MM-IM Inventory Valuation data model does exist if there are customer appends on the
mentioned tables. The NetWeaver redirect capability requires that database table and assigned proxy view is compatible in
the structure: number of fields and their type. Thus, if there is an append on one of the above mentioned tables then the
assigned DDL source of the CDS proxy view must be made compatible.
Another impact of the simplified inventory valuation data model is a performance decrease of database read operations on the
above mentioned tables just because a data fetch on one of the mentioned tables is in S/4HANA slower than in SAP ERP 6.0
due to JOIN operations and on-the-fly aggregation. Hence performance critical customer coding may be adjusted to improve
performance.

1. Customer appends on xBEW(H) tables


With SAP Note 2194618 SAP offers a pre-check to be executed on the start release to identify append issues described in the
following sub chapters. Hence customer is not forced to scan all above listed tables manually.
Please note that this check contains not only the xBEW(H)-tables. Instead, it also analyzes other MM-IM tables.

If the pre-check identifies appends on an xBEW(H) tables, the corresponding CDS views, listed in the following table, needs
to be enhanced or replaced.

Table with customer appe DDL sources of CDS-views which needs to be enhanced or replaced in case of custom
nds er appends

EBEW MBV_EBEW

EBEWH MBV_EBEWH

MBEW MBV_MBEW

MBEWH MBV_MBEWH

MBEWH MBV_MBEWH_BASE

OBEW MBV_OBEW

OBEWH MBV_OBEWH

QBEW MBV_QBEW

QBEWH MBV_QBEWH

Table 2: Affected CDS views which needs to be enhanced or replaced in case of customer appends
If you upgrade from S/4HANA 1511 to S/4HANA 1610, you do not need the view extensions for the views listed in table 3
anymore. These view extensions should be deleted.

Table with customer appends DDL sources of CDS-views for which view extensions are not needed anymore
EBEW MBV_EBEW_EXT
MBV_EBEW_ML_ONLY

MBV_EBEW_BASIS

MBV_EBEW_CASE

EBEWH MBV_EBEWH_EXT

MBV_EBEWH_ASSOC

MBV_EBEWH_ML_ONLY

MBV_EBEWH_BASIS

MBV_EBEWH_CASE

MBEW MBV_MBEW_EXT

MBV_MBEW_ML_ONLY

MBV_MBEW_BASIS

MBV_MBEW_CASE

MBV_MBEW_MOTH_SEG

MBEWH MBV_MBEWH_EXT

MBV_MBEWH_ASSOC

MBV_MBEWH_ML_ONLY

MBV_MBEWH_BASIS

MBV_MBEWH_CASE

MBV_MBEWH_MOTH_SEG

OBEW MBV_OBEW_EXT

MBV_OBEW_ML_ONLY

MBV_OBEW_BASIS

MBV_OBEW_CASE

OBEWH MBV_OBEWH_EXT

MBV_OBEWH_ASSOC

MBV_OBEWH_ML_ONLY

MBV_OBEWH_BASIS

MBV_OBEWH_CASE

QBEW MBV_QBEW_EXT

MBV_QBEW_ML_ONLY

MBV_QBEW_BASIS

MBV_QBEW_CASE

QBEWH MBV_QBEWH_EXT

MBV_QBEWH_ASSOC

MBV_QBEWH_ML_ONLY

MBV_QBEWH_BASIS

MBV_QBEWH_CASE

Table 3: Affected CDS views for which view extensions are not needed anymore

1.1 Fields containing material master data attributes


If customer appends only contain material master data attributes, the views could be made compatible by extension views.
Extension views take care that fields, defined in the extension view, are appended at the end of the extended view.
An extension view needs to be defined for the CDS-view, listed in table 2, for the corresponding xBEW(H) table.
For more information about view extension see SAP NetWeaver 7.4 documentation
Note: if you need to enhance the CDS view (MBV_EBEWH, MBV_MBEWH, MBV_MBEWH_BASE, MBV_OBEWH or
MBV_QBEWH) for the corresponding history table, please apply SAP note 2407605 firstly.

1.2 Fields representing a customer defined quantity/value to be aggregated


If customer appends contain aggregated fields, the proxy view (same approach as described for material master data
attributes) and most probably also the views in the view-hierarchy needs to be replaced by new CDS views in customer
namespace. This view must contain the same fields and types as the corresponding xBEW(H) table. The newly created CDS
view must be specified as a new proxy view via transaction SE11 --> Menu --> Extras --> Proxy Object.
In most cases extension views cannot be used, since currently they do not support aggregate expressions.

1.3 Customer appends on views


There are several views in SAP Standard which also do have an assigned proxy view because the view reads transactional data
from an xBEW(H) table. Since transactional data are not updated anymore in the xBEW(H) table, view accesses are
redirected to corresponding proxy views.
View and assigned proxy view must be compatible in structure too. If there are customer appends on such view the same rules
as for tables apply. Views with assigned proxy compatibility view are identified by the provided pre-check (SAP note
2194618).

1.3.1 Customer views using material master attributes


Such views using only material master data attributes from the xBEW(H) tables do not need to be changed.

1.3.2 Customer views using transactional attributes


Customer views, accessing xBEW(H) tables and having at least one transactional attribute (LBKUM, SALK3, VKSAL, SALKV
or own customer transactional fields) need to be re-build by creating a new CDS view with a new name.
Instead of accessing the original xBEW(H) table, the corresponding DDL source, listed in table 1, needs to be accessed.
There are two options how to handle accesses to the old DDIC SQL view:
1. Redirect accesses to new CDS proxy view via transaction SE11 (Extras --> Proxy Object)
2. Code adaption of accesses to old SQL DDIC SQL view

2 Code adjustments and optimizations


Technically it is still possible to do database write operations (INSERT, UPDATE, DELETE, MODIFY) on transactional fields.
But such write operations are without any effect, since transactional data is read from the Universal Journal Entry Line Items
table and the Material Ledger table!
Therefore, write operations on xBEW(H) tables, affecting transactional fields, shall be removed from customer coding.
Write operations on material master data attributes shall still happen on the xBEW(H) tables.

DB read operations on the xBEW(H) tables have a performance decrease, since transactional data is retrieved from the
Universal Journal Entry Line Items table and the Material Ledger via database joins and aggregation. Consequently, it shall
be avoided to read transactional data when only master data is required. Therefore it is recommended to adjust the customer
coding in the following way:
If material master data as well transactional data is required then the SELECT <table> should be replaced by using a
data access method from class CL_MBV_SELECT_<table>. These classes provide access methods for single
(SINGLE_READ) as well as array (ARRAY_READ) read operations.
If only material master data is required then the SELECT <table> should be replaced by SELECT on view
V_<table>_MD. Alternatively, corresponding material master data read methods (READ_MASTER_DATA) in the class
CL_MBV_SELECT_<table> can be used. Also the data type declarations should be adjusted from TYPE <table> to
TYPE V_<table>_MD.
If only transactional fields are required then the SELECT <table> could be replaced by using the data access methods
ARRAY_READ_TRANSACTIONAL_DATA and SINGLE_READ_TRANSACTIONAL_DATA from class
CL_MBV_SELECT_<table>.

For performance critical coding parts these adjustments are strongly recommended. For non critical parts it is optional short
term but recommended on long term.
To identify such locations, it is required to make use of the where-used functionality of transaction SE11 and considering
other techniques like transaction CODE_SCANNER to find locations which SE11 cannot handle – like dynamic programming
or native SQL statements.
Consider SAP Note 28022, if there are issues with the where-used functionality in the customer system. In the where-used
dialog it is possible via the button "Search Range" to search specific for key words like SELECT, INSERT and so on.

Attributes
Key Value

Other Components Materials Management > Inventory Management > Basic Functions (MM-IM-GF)

Software Components
Software Component From To

S4CORE 101 101+

This document refers to


SAP Note/KBA Component Title

2194618 MM-IM-GF S4TC SAP_APPL - Checks for MM-IM

This document is referenced by


SAP Component Title
Note/KBA

2595627 Accessing table from SE16/SE16N shows different results to SAP HANA database

2000002 HAN-DB-PERF FAQ: SAP HANA SQL Optimization

2713495 CO-PC-ACT S/4HANA: Performance issues in custom code when using the obsolete stock data model

2337383 MM-IM-GF- S4TWL - Material Valuation Data Model Simplification in S/4HANA 1610 and Higher
VAL

2365503 LO-RFM-LG- S4TWL - Retail Revaluation


SPV

2217299 MM-IM-GF- Inventory Valuation (part of Materials Management - Inventory Management) : Change of data
VAL model in S/4HANA 1511

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy