Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Message (ABAP Statement)

former_member184495
Active Contributor
0 Kudos

Hi,

I gave the following code in ECC 6 BOR ABAP editor and it works perfect.

-


IF text[] IS INITIAL.

MESSAGE 'Can not exit without entering text.' TYPE 'S'.

ENDIF.

-


But when I use the same in 4.6c BOR ABAP Editor(as I have the same requirement), it gives me the following error.

Three-digit error number XXX required in the "MESSAGE EXXX..." statement.

What could be the issue?

Aditya

7 REPLIES 7

former_member536879
Active Contributor
0 Kudos

Hi,

Its asking for the message class number.

if you want replicate same thing in 4.6 give the message in the message class and then use like below statement

message e300(zm) .

Here zm is the message class and 300 is the message (Can not exit with out entries) and the message type 'Error'

if you want 'S' give 'S' instead of 'E'.

With Regards,

Sumodh.P

Former Member
0 Kudos

Hey ,

the error it is giving is correct ,

You need to call the Message statement as below

MESSAGE { msg | txt } [message_options].

A three digit number along with type of error needs to be specified in this command

Eg

MESSAGE i014.

MESSAGE i014(MESSAGE CLASS)

where 014 is a message number where you have written your actual message

You can do a f1 on Message and can see its various syntax.

Hope this is helpful.

Regards,

Uma Dave

Former Member
0 Kudos

Hello

It will be work in 4.6


MESSAGE ID 'SD' TYPE 'S' NUMBER '775' WITH 'Can not exit without entering text.'.

0 Kudos

Hi Guys,

my problem is that am not using normal ABAP Editor(SE38), am using SWO1 (BOR ABAP Editor), so before I do any changes in the code I need to verify if Message class options which you gave would work.

Now as said earlier, if I use my code (which I have posted) it works perfect in ECC (BOR ABAP Editor), so why not with 4.6C?

Aditya.

P.S Dzed M, your code is working fine, could you tell me what your code means

MESSAGE ID 'SD' TYPE 'S' NUMBER '775'

Edited by: Aditya Varrier on Jun 22, 2010 11:51 AM

0 Kudos

Hello

It is because syntax for keyword Message is different in 4.6 and ECC.

This does not depend on editor.

0 Kudos

Hello

SD - it is message class

775 - it is message number in this class.

In this instance message 775 - it is empty message for free text.

You may to find it yourself in table T100 or in t-code SE91

former_member184495
Active Contributor
0 Kudos

thanks Dzed.