2013 Nov 12 11:35 AM
Hi All,
We are customizing BADI 'IF_EX_ME_PROCESS_PO_CUST~POST' to validate the PO when it is created/modified.
We tried using mmpur_message & mmpur_message_forced as below:
IF sy-subrc ne 0.
CALL METHOD im_header->invalidate( ).
mmpur_message 'E' 'YSC' '014' space space space space.
endif.
OR
IF sy-subrc ne 0.
CALL METHOD im_header->invalidate( ).
mmpur_message_forced 'E' 'YSC' '014' space space space space.
endif.
Even if is successfully executing the statement (checked at run time), error message is not getting displayed & there by allowing Po to be created/modified.
What is it that is going wrong? Do we have to add any other piece of code or some flag? Please do the needful.
Thanks & Regards,
Jyotsna
2013 Nov 14 3:22 PM
2013 Nov 12 11:48 AM
Hi
I used some validation in similar badi ME_PROCESS_REQ_CUST and method PROCESS_ITEM
Try below code :
MESSAGE 'text'(001) TYPE 'E'
DISPLAY LIKE 'I'.
Let me know if it works fine .
2013 Nov 12 12:09 PM
2013 Nov 13 3:13 PM
I think that the method POST is not done to display messages.
2013 Nov 14 3:22 PM
2013 Nov 25 9:35 AM
Thank all for your guidance. Now we placed our code in check & able to populate the error in message log. But have a small issue. Even when the data entered is corrected, error remains in the log. Is there any way to remove the message from the log using any macros or FM?
2013 Dec 09 12:08 PM
You can add a small code at start of methods like IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER to remove your own error messages.
ls_header = im_header->get_data( ).
mmpur_context mmcnt_context_badi.
IF NOT ls_header-id IS INITIAL AND im_header->is_valid( ) EQ mmpur_yes.
mmpur_remove_msg_by_context ls_header-id mmcnt_context_badi.
ENDIF.
Regards,
Raymond
2013 Dec 19 7:12 AM
2016 Feb 23 1:11 PM