01-10-2009 5:21 AM
Hi Guys,
I have already checked the forum regarding this. There are lots of threads. Unfortunately none of them helped me. I must be missing some thing in my code.
I tried issuing warning message in BADI ME_PROCESS_PO_CUST and method PROCESS_ITEM.
First i tried with normal message statement
MESSAGE w001(00) WITH text-001 text-002.
Didn't worked.
Next tried calling standard macros
DATA:mmmfd_cust_01 TYPE mmpur_metafield VALUE 90000000.
call method cl_contextfield_mm=>set_current_field
exporting im_field = mmmfd_cust_01.
mmpur_metafield mmmfd_cust_01.
mmpur_message_config 'W' 'X' ' '. "Tried all permutations here
mmpur_message_forced 'W' '00' '001' text-001 text-002 '' ''.
Still no solution
Tried with macro mmpur_message also
Can some one helpme out to solve this issue.
Thanks,
Vinod.
01-10-2009 5:40 AM
01-10-2009 5:40 AM
01-10-2009 5:46 AM
Hi Amit,
Thanks for the reply.
This syntax won't allow. I am in 4.7 system. We have to specify message ID and number.
Tried like this.
MESSAGE W001(00) WITH text-001 text-002.
MESSAGE WITH text-001 TYPE 'W'.
No use again:(
I think we have to explicitly handle the I/W/S messages in BADI's. If i give the as error it works. But i need warning.
I have checked Example implementation class CL_EXM_IM_ME_PROCESS_PO_CUST. They are handling using the macros i told in my first post.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Jan 10, 2009 11:17 AM
01-10-2009 6:02 AM
Sorry for Syntax,though i'm away from SAP right now.I apologias for that.
01-12-2009 5:49 AM
Hi all,
Does any one has any ideas!!!
What will be the implications if i issue error message with MESSAGE statement.
In BADI documentation it is mentioned that we should not use message statement.
But my req is to give error message and should be able to save PO.
If i give error message with message statement that is what happening.
Thanks,
Vinod.
01-12-2009 5:57 AM
hi,
you can issue error messages in BADI.
We are using the same in IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM
IF ls_mepoaccounting-ps_psp_pnr NE
ls_mepoaccounting_prev-ps_psp_pnr.
MESSAGE 'Not Allowed to change Accounting data of Previous years WBS ' TYPE 'E'.
CALL METHOD im_item->invalidate( ).
CONTINUE.
ENDIF.
or
IF sy-subrc NE 0. " creating new line item in the old po
CHECK ls_mepoaccounting-psp_pnr NE space.
CHECK ls_mepoaccounting-psp_pnr(02) LT year+2(2).
CONCATENATE 'WBS Element of Fiscal Year:' year ' IN Item:'
ls_mepoaccounting-ebelp INTO l_text.
mmpur_message_forced 'E' 'ME' '083' l_text ' ' ' ' ' '.
CALL METHOD im_item->invalidate( ).
CONTINUE.
ENDIF.
01-12-2009 7:44 AM
Hi all,
Thanks for the responce.
Not sure whether you have looked into BADI documentation or not. Please check below.
"Further notes
The above-mentioned macros are defined in the program MM_MESSAGES_MAC. Please include this program in your own application.
Never issue messages in BAdI ME_GUI_PO_CUST! This is the task of the business logic and must therefore be done via the BAdI ME_PROCESS_PO_CUST.
"Never use the ABAP statement MESSAGE in the BAdI ME_PROCESS_PO_CUST. Please use the macro mmpur_message_forced only. This macro only writes a message in the message collector.
If you wish to mark the business object as invalid in order to prevent posting, you must additionally use the INVALIDATE ( ) method of the relevant interface. In this connection, see also the code example in the PROCESS_ITEM method of the BAdI ME_PROCESS_PO_CUST.
I have tried almost all macros including mmpur_message_forced 'E' 'ME' '083' l_text ' ' ' ' ' '.
Not sure where i am missing:(
If i give error using MESSAGE statement it is working perfectly i.e. give error and save the PO. Only wanted to know if there are any implications.
Thanks,
Vinod
08-06-2014 6:36 AM
Dear Sir,
Very Helpfull To Display error Message In ME29N..
Regards,
uday..,
01-12-2009 5:54 AM
Hi,
INCLUDE mm_messages_mac. "useful macros for message handling
mmpur_message_forced 'W' 'ME' '303' text-001 '' '' ''.
Regards
Sandipan
11-25-2013 8:31 AM
Work! Thank you. in this case:
i try use MESSAGE 'TEST' TYPE 'E', it can be display in PO check dialog.but MESSAGE 'TEST' TYPE 'W' not work!
At last
INCLUDE mm_messages_mac. "useful macros for message handling
mmpur_message_forced 'W' 'ME' '303' 'testtest' '' '' ''.
thank you again!
06-16-2009 9:20 AM
Hi Vinod,
Did you find any solution for this issue? as even I am facing the same issue.Request your help.
Thanks
SV
09-04-2009 5:08 PM
Hi,
Any solutions to issue warning message while creating a PO. I am also facing the same issue and searched all over the SDN but cudn't find exact solution for this.
If any one has found a solution please do post it.
Thanks & Regards.
Kumar.
07-09-2010 11:22 AM
Hi,
Any solutions to issue warning message while creating a PO. I am also facing the same issue and searched all over the SDN but cudn't find exact solution for this.
I would need to display the warning message at the bottom of ME21N tcode while creating PO.
If any one has found a solution please do post it.
Regards,
Rpn
06-13-2011 9:51 AM
Any solution for this ,even I'm facing the same issue now.Pls help me.
Pranitha
02-28-2014 8:59 PM
07-03-2014 9:23 AM
04-21-2019 12:24 AM
The macro mmpur_message should be work.
MMPUR_MESSAGE ‘W’ ‘MM’ ‘123’ msgv1 msgv2 msgv3 msgv4.
04-21-2020 6:24 AM
Hi vinod.vemuru2 and everyone,
I am facing issue while displaying warning message for multiple schedule quantity on status bar.
It shows warning message on status bar for only one schedule quantity out of 4, but it is showing all the 4 warning msg on information tab.
How can i display all warning msg on status bar as well.