10-10-2007 11:02 AM
Hi everyone,
I m using the user exit exit_sapmm07m_001 in the enhancement mbcf0002.I have written a code to display a warning mesg and error mesg in the exit.
When I checked the user-exit with the transaction MIGO for error message it is working fine.But for warning message,i m getting a warning mesg but it is not the message what i wrote in the code.It is getting a different warning mesg from somewhere.any suggestions please.
Thank you.
10-10-2007 11:19 AM
Hi,
U check the message class U might have written in some message class.
That message class may not be available in that program.
Assign points if useful.
10-10-2007 11:27 AM
Hi yugnadhar,
Thanks for the reply.I think i m using the correct message class.
my code looks like this,
If mess_type = 'W'.
message w000(z1) with '...........................'.
elseif mess_type = 'E'.
message e000(z1) with '...........................'.
endif.
I m getting the error mesg perfectly for what i wrote.but the warning is displaying something else instead of what i wrote in the code.any more ideas?
10-10-2007 11:23 AM
Hi,
have u used message syntax as below:
MESSAGE E000(message_class_name) WITH '&'.
10-10-2007 11:29 AM
Hi,
Have you debug the code till the message you have given.
Many a times a standard msg may be triggereing before or after your message hence ovewritting it.
so please check that with a break point in your exit.
thanks.
taher
10-10-2007 11:33 AM
Hi,
In the message class Z1 define the messages for example
number text
000 ->its a warning message
001 ->its a error message.
now do like this
If mess_type = 'W'.
message w000(z1) .
elseif mess_type = 'E'.
message e001(z1) .
endif.
Regards,
Nagaraj
10-10-2007 11:52 AM
Hi nagraj,
Thanks for the reply.I tried giving different message numbers from the message class.Even though for warning it is picking up the message from somewhere.I kept break point and i debugged it.It is executing the warning mesg line what i have written in the code but bringing a different warning mesg alltogether.Any more ideas will be helpful?
10-10-2007 12:00 PM
Hi d_p,
The new warning message is actually over writting your warning message. As the control does stop on error message, the control does not stop on warning message.
So the code is working fine, i guess.
Thank you.
10-10-2007 12:09 PM
Hi,
Can you please post ur warning message getting from System.
Thanks,
Siva.
10-10-2007 12:18 PM
Hi sivantham,
The warning mesg i m getting instead of the warning mesg i kept in the program is:
<b>Deficit of PU Ordered quantity 18 EA : 04/501900 6020 6021</b>
The Message no for that is M7021.
10-10-2007 12:29 PM
HI,
as far as ur code is concerned ,the logic is coorect..what is happening is that ur warning message is overwritten by standard message.after ur warning message is triggered somewhere in the program the system also throwing the warning message and is over written,so for testing purpose give error message instead of warning and check..whether the error message is triggering or not..
Reward if helpful.
Regards,
Nagaraj
10-10-2007 12:36 PM
Hi nagraj,
As u said i kept the message as error and tried.I got the my message as error mesg in a dialog box but in the list the first one is the warning mesg which is coming before when i changed from warning to error.
But for this message the user wants it as a warning mesg only not as error.
10-10-2007 12:47 PM
Hi d_p,
Put this code.
IF condition
Message S000(xxx) DISPLAY LIKE 'W'.
<b>EXIT.</b>
ENDIF.
10-10-2007 1:05 PM
Hi srinivas,
I tried with ur way,but still the standard warning is coming instead of mine.
05-30-2011 9:39 PM
Hi everyone,
I think the problem is over. But for someone with the same problem, you could tried executing the function BAL_LOG_MSG_ADD
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = (SAPLMICK)g_s_msg_defaults-log_handle
i_s_msg = l_msg
Bye.