code pal for ABAP > Documentation > Message Easy To Find
Since the specification of message classes and numbers by variables creates no entry in the where-used list of the corresponding message, this check searches for MESSAGE
statements that do not statically specify their message by literals since these cannot be found in the where-used list of the message.
Specify the message used by literals.
In exceptional cases, you can suppress this finding by using the pseudo comment "#EC MSG_FIND
which has to be placed after the message statement:
DATA(message_class) = '00'.
MESSAGE i002(message_class). "#EC MSG_FIND
Before the check:
DATA(message_class) = '00'.
DATA(message_id) = '002'.
MESSAGE i002(message_class).
MESSAGE ID message_class type 'I' NUMBER message_id.
After the check:
MESSAGE i002(00).
MESSAGE ID 00 type 'I' NUMBER 002.