03-12-2009 10:59 AM
Hi all,
Please tell me how to give error message inside badi.
Or please tell me how to give message in badi and then immediately come out of transaction.
Thank you.
03-12-2009 11:04 AM
03-12-2009 11:01 AM
Hi,
Give error message as:-
MESSAGE '<message_text>' TYPE 'E'.
"E - error message
"I - info message
"S - success message
"W - warning message
Regards,
Tarun
03-12-2009 11:02 AM
Hi,
If u have any exception parameters in the BAdi Interface methods, then u can raise those exceptions using the statement:
RAISE EXCEPTION_NAME.
Keerthi.
03-12-2009 11:04 AM
03-12-2009 11:07 AM
MESSAGE e001(sy) WITH 'Error Message' RAISING <badi_exception>.
Regards,
Joan
03-12-2009 11:23 AM
Hi all,
The W/I/E Messages not allowed in badi.Please provide alternative solution.
03-12-2009 11:27 AM
Hi,
Which BADI u r using?
Some of the BADIs wont allow message statement(Mentioned in documentation)
eg: ME_PROCESS_PO_CUST.
In this case they explains the error handling.
Try with below macro
DEFINE mmpur_message_enaco.
l_tabix = sy-tabix.
l_subrc = sy-subrc.
MESSAGE id &2 type lc_i number &3 with &4 &5 &6 &7 into l_dummy.
call method cl_message_mm=>create exporting im_msgid = &2
im_msgty = &1
im_msgno = &3
im_msgv1 = sy-msgv1
im_msgv2 = sy-msgv2
im_msgv3 = sy-msgv3
im_msgv4 = sy-msgv4
im_custom = 1
exceptions failure = 01
dialog = 02.
IF sy-subrc EQ 1 OR sy-subrc EQ 2.
MESSAGE id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
sy-subrc = l_subrc.
sy-tabix = l_tabix.
END-OF-DEFINITION.
mmpur_message_enaco space lc_00 lc_001 "Issue the message
text-001 text-002 text-003 space.
Thanks,
Vinod.
03-12-2009 12:07 PM
I am using BADI ZBADI_MATN1.Please tell me how to give error message for this or pop-up.
Thank you.
12-16-2009 1:56 PM
try this
message s000(class) with 'message' display like 'E'.
leave to screen 1000.
Good luck!
12-16-2009 1:57 PM
try this
message s000(class) with 'message' display like 'E'.
leave to screen 1000.
Good luck!