LOW Effort: S — Small (hours) Architecture

How to remediate: Hardcoded message class/numbers

MESSAGE statements with hardcoded message class and number instead of exception classes.

Is this issue in your codebase?

A1 scans all 30 rules across your custom ABAP — results in minutes.

Scan your codebase free →

What changes in S/4HANA

ABAP Cloud restricts MESSAGE statement. Exception-based error handling is the clean-core pattern.

Before and after: ABAP code example

Before (ECC)
* ECC: hardcoded message class and number
MESSAGE e042(zsd_messages) WITH lv_order.
After (S/4HANA)
* S/4HANA ABAP Cloud: exception class pattern
RAISE EXCEPTION TYPE zcx_sd_error
  MESSAGE e042(zsd_messages) WITH lv_order.
" Or use cx_sy_* standard exceptions where applicable

Effort estimate and common pitfalls

Effort estimate

S — Small (hours)

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

  • ! Forgetting to update all occurrences in the same program
  • ! Not running ATC after the change to confirm the finding is resolved

Related rules to check

Find every instance of this issue in your codebase

The A1 scanner checks all 30 compatibility rules — including Hardcoded message class/numbers — 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.