CHECK_103 - SELECT on table with replacement object
Improve this pageRFC enabled
CODE
In S/4HANA many old DB tables have now replacement objects/proxy objects which in many case decrease the performance of old SELECT statements when the DB table is used in the OpenSQL.
In many cases usage of dictionary views based on that tables is much faster. But we have to make sure that the selected field is still stored in the DB level. (Check OSS Note: 0002000002)
Example
MARC table has now replacement object and select on it can be really slow. If we replace it with V_MARC_MD it will be much faster to select basic plant level information.
DATA: materials TYPE HASHED TABLE OF MARC WITH UNIQUE KEY MATNR.
SELECT * FROM MARC
WHERE WERKS = '0001'
INTO CORRESPONDING FIELDS OF TABLE materials.
can be replaced by
DATA: materials TYPE HASHED TABLE OF MARC WITH UNIQUE KEY MATNR.
SELECT * FROM V_MARC_MD
WHERE WERKS = '0001'
INTO CORRESPONDING FIELDS OF TABLE materials.