How to remediate: VBAK/VBAP direct access
Direct reads from VBAK/VBAP (Sales Document header/item). S/4HANA adds fields that change the structure.
Is this issue in your codebase?
A1 scans all 30 rules across your custom ABAP — results in minutes.
What changes in S/4HANA
Use released CDS view I_SalesDocument. New fields in S/4HANA can cause issues with SELECT * or positional field access.
Before and after: ABAP code example
* ECC: direct VBAK/VBAP read with SELECT *
SELECT * FROM vbak AS h
INNER JOIN vbap AS i ON i~vbeln = h~vbeln
INTO TABLE @DATA(lt_so)
WHERE h~vkorg = @lv_vkorg
AND h~auart = @lv_auart. * S/4HANA: released CDS view with explicit fields
SELECT salesorder, salesorderitem, material,
requestedquantity, netamount
FROM i_salesorderitem
INTO TABLE @DATA(lt_so)
WHERE salesorganization = @lv_vkorg
AND salesordertype = @lv_auart. Effort estimate and common pitfalls
Effort estimate
Estimate is per affected object. Total effort scales with the number of occurrences in your codebase. Use the A1 scan to get an object-level count before estimating the full project.
Common pitfalls
- ! Missing related objects that contain the same pattern
- ! Not testing edge cases after replacing the API
- ! Skipping regression tests for dependent programs
Related rules to check
SELECT * usage
SELECT * reads all columns including new S/4HANA columns, causing unexpected results and performance issues.
BSEG direct access
BSEG is a cluster table in ECC. In S/4HANA, financial data moved to ACDOCA (Universal Journal).
EKKO/EKPO direct access
Direct reads from EKKO/EKPO (Purchase Order header/item). Use released API I_PurchaseOrder.
Find every instance of this issue in your codebase
The A1 scanner checks all 30 compatibility rules — including VBAK/VBAP direct access — across your custom ABAP objects and produces a prioritised remediation backlog.
Scan your codebase for this issue free →SAP, S/4HANA and ABAP are trademarks of SAP SE. s4ready.ai is an independent solution and is not affiliated with, endorsed by, or sponsored by SAP SE.