ATC flags hundreds of reads on MSEG, KONV and BSEG. When can you rely on compatibility views, and when must you rewrite the access?
Say your answer out loud first.
Practise another way
A compatibility view is a CDS view registered as the replacement object of an old table, so ABAP SQL reads on MSEG are silently answered from MATDOC.
I rely on it for read-only, low-volume ABAP SQL. I rewrite when the code writes, or uses the table in a database view, native SQL or AMDP.
I also rewrite when it reads mass data where the view's aggregation hurts, or when the meaning changed. KONV has no data anymore, and BSEG is no longer the accounting truth.
The mechanism. A CDS view can be assigned to a DDIC table as its replacement object. Then:
- Redirected:
SELECTin ABAP SQL (also in subqueries,OPEN CURSOR,FETCH). Table buffering is bypassed. CDS access control of the view is not evaluated. - Not redirected: writes (a syntax warning),
SELECT SINGLE FOR UPDATE, native SQL (EXEC SQL, ADBC), AMDP, and any database view or CDS view built on the table.IMPORT FROM DATABASEgoes to the table too.
So a classic report doing SELECT ... FROM mseg keeps working, because the view reads MATDOC.
Safe to rely on
- Read-only ABAP SQL, moderate volumes, no database-level object on top.
- Code you plan to retire or rewrite later anyway.
Rewrite
- Writes. Writes to MKPF, MSEG or stock quantity fields have no effect; post through the standard application (for example the goods movement BAPI) instead.
- DDIC database views on MSEG/MKPF. They read the physical, now empty, table and return nothing.
- Performance hot spots. Stock tables such as MARD are aggregated from documents at every read; read MATDOC or a released CDS view directly in mass programs.
- KONV. Pricing results live in PRCD_ELEMENTS; KONV remains only as a structure. Switch the SELECT, or use the read-only fallback
V_KONV_CDS. An ADT quick fix exists (SAP Note 2220005). - BSEG. It still exists, but in S/4HANA it is the operational item (payables, receivables, tax, open items). It can be summarized, and some postings skip it entirely (
BSTAT = 'U'). Accounting reports must read ACDOCA (SAP Note 2431747; quick fix available).
" ECC: SELECT ... FROM konv WHERE knumv = ...
" S/4HANA: pricing results are stored in PRCD_ELEMENTS
SELECT knumv, kposn, kschl, kbetr, kwert
FROM prcd_elements
WHERE knumv = @ls_vbak-knumv
ORDER BY kposn, stunr, zaehk
INTO TABLE @DATA(lt_conditions).
For new or ABAP Cloud code. Do not read the tables at all: use the released CDS successors listed in SAP's Cloudification Repository, such as I_MaterialDocumentItem_2 for MSEG.
Explains the redirect mechanism precisely, including what is not redirected, and treats KONV and BSEG as different cases from MSEG.
Says 'compatibility views exist, so nothing needs changing' or rewrites every read regardless of risk.
Assuming every old table has a transparent redirect. KONV and BSEG do not behave like MSEG, and database views or AMDP never see the redirect.
- Why does a DDIC database view on MSEG return no rows in S/4HANA?
- What does BSTAT = 'U' tell you?
- Why is a mass read on MARD slower after conversion?
- Which released CDS view replaces MSEG for ABAP Cloud?
6 official pages, 1 prep guide and 1 technical reference. Confidence: high. Checked 3 Dec 2026.
- Official page Backs the answer.
- Technical reference Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Prep guide Gives the question.
- Official page Backs the answer.