Application Development and Automation 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: 
Read only

Using error messages

Former Member
0 Likes
5,992

Hi

I have a program that I need if an error occours, the program doesn't get out of there until user correct the wrong field.

I define message zmm055 at SE91 and then at program I put this:

IF l_lgpla EQ '7' OR l_lgpla EQ '8'.
  IF wmvke-mvgr5 IS INITIAL.
    MESSAGE ID 'ZMM' type 'E' number '055' WITH wmlgt-matnr.
  ENDIF.
ENDIF.

the program do it very well but the message that appears it's of information and not of error.

Can somebody help me ?

Thanks

Edited by: Matt on Nov 10, 2008 7:16 PM - added tags around the ABAP

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
3,731

Set a breakpoint at that message, and make sure that it's really being triggered there.

matt

7 REPLIES 7
Read only

matt
Active Contributor
0 Likes
3,732

Set a breakpoint at that message, and make sure that it's really being triggered there.

matt

Read only

Former Member
0 Likes
3,730

U r message ID is zmm055.

But U declare as ZMM.

plz correct it.

Read only

Former Member
0 Likes
3,730

Hi,

zmm055 you created is the message class?

or

zmm is the message and 055 is the message number?

I want to confirm.

Thanks and Regards,

Chris Gu

Read only

0 Likes
3,730

Yes,

zmm is the class message and 055 is the message number

Read only

Former Member
0 Likes
3,730

Hi,

Try this.

MESSAGE e055('MM) WITH wmlgt-matnr.

The above will display the error message.

If u want the information and the error message, try this

MESSAGE i055(ZMM) display like 'E' WITH wmlgt-matnr.

Sharin.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
3,730

Hi Ricardo,

You are using:-

MESSAGE ID 'ZMM' type 'E' number '055' WITH wmlgt-matnr.

If this is not working try this out:-

mention your message class name at the very first line of your report i.e., next to your report name.

say your report name is ZABC and message class name is ZMSG then write:

REPORT ZABC MESSAGE-ID ZMSG.

and the place you want user to correct his/her error.

just write within your condition:

IF <condition>.

MESSAGE E001.

..

ELSE.

...

ENDIF.

say at 001 you write : 'Enter a valid value.'

then when that condition is encountered then a msg with will be displayed of Error type.

for Information type msg write I001.

for Warning type msg write W001.

and so on.....

Hope this solves your problem.

Thanks & Regards.

Tarun Gambhir.

Read only

Former Member
0 Likes
3,730

IF L_LGPLA EQ '7' OR L_LGPLA EQ '8'.

IF WMVKE-MVGR5 IS INITIAL.

MESSAGE E055(ZMM) WITH wmlgt-matnr.

ENDIF.

ENDIF.