‎2008 Nov 10 6:15 PM
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
‎2008 Nov 10 6:18 PM
Set a breakpoint at that message, and make sure that it's really being triggered there.
matt
‎2008 Nov 10 6:18 PM
Set a breakpoint at that message, and make sure that it's really being triggered there.
matt
‎2008 Nov 10 7:28 PM
U r message ID is zmm055.
But U declare as ZMM.
plz correct it.
‎2008 Nov 11 3:17 AM
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
‎2008 Nov 11 9:25 AM
‎2008 Nov 11 3:25 AM
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.
‎2008 Nov 11 4:11 AM
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.
‎2008 Nov 11 9:54 AM
IF L_LGPLA EQ '7' OR L_LGPLA EQ '8'.
IF WMVKE-MVGR5 IS INITIAL.
MESSAGE E055(ZMM) WITH wmlgt-matnr.
ENDIF.
ENDIF.