Make messages easy to find
To make messages easy to find through a where-used search from transaction SE91, use the following pattern:
MESSAGE e001(ad) INTO DATA(message).In case variable message is not needed, add the pragma ##NEEDED:
MESSAGE e001(ad) INTO DATA(message) ##NEEDED.Avoid the following:
" anti-pattern
IF 1 = 2. MESSAGE e001(ad). ENDIF.This is an anti-pattern since:
- It contains unreachable code.
- It tests a condition which can never be true for equality.