Prerequisites
You must already have specified a valid message class in your ABAP program.
Procedure
To add new messages to a message class from the ABAP Editor:
You can also create new messages using forward navigation. In the MESSAGE statement, enter a new message number and then double-click it. You should preferably enter the next free number in the message class. However, if you do not know it, you can enter any number and subsequently correct it.
Result
You can now use the message that you have defined in the MESSAGE statement in your program.