04-13-2016 8:06 AM
Hi.
I have one doubt. Need Your suggestions.I need to validate the Down payment with Total po amount.
So, i used Badi ME_PROCESS_PO_CUST-> PROCESS_HEADER Method.
I have found some posts that i should not used the Normal error message Like Below
message 'error' Type 'E'..
If i want to Add error message in Error log. I need to use INCLUDE mm_messages_mac.
I am raising the Error message like below.
MMPUR_MESSAGE 'E' 'ZME21NER' '001' '' '' '' ''. (i created custom message using Se91)
While adding first time,Error message is triggering, But After Some times If i press Enter,
Error message is Not in the log. Please have a look on below attached image. After some time also.
The custom message should be there. May i know what should i do.
04-13-2016 8:30 AM
Did you invalidate the header to trigger next execution of BAdI method at next enter?
ls_header = im_header->get_data( ).
* Clear messages (case of multiple call)
mmpur_context mmcnt_context_badi.
IF NOT ls_header-id IS INITIAL.
mmpur_remove_msg_by_context ls_header-id mmcnt_context_badi.
ENDIF.
* Add some error error
IF invalid_data.
mmpur_metafield mmmfd_vendor.
mmpur_message_forced 'E' 'ZFSM' '999' ls_header-lifnr ' ' ' ' ' '.
im_header->invalidate( ).
EXIT.
ENDIF.
Regards,
Raymond
04-13-2016 8:30 AM
Did you invalidate the header to trigger next execution of BAdI method at next enter?
ls_header = im_header->get_data( ).
* Clear messages (case of multiple call)
mmpur_context mmcnt_context_badi.
IF NOT ls_header-id IS INITIAL.
mmpur_remove_msg_by_context ls_header-id mmcnt_context_badi.
ENDIF.
* Add some error error
IF invalid_data.
mmpur_metafield mmmfd_vendor.
mmpur_message_forced 'E' 'ZFSM' '999' ls_header-lifnr ' ' ' ' ' '.
im_header->invalidate( ).
EXIT.
ENDIF.
Regards,
Raymond
04-13-2016 10:00 AM
Hi,
Thanks for your reply.
Are you asking me to do the Delete the id of the Error.
What about the Standard Error. Like line item does not have plant , qty, it is deleting the Standard errors also.
04-13-2016 10:42 AM
Don't worry the context is set by mmpur_context, so no "damage" to standard messages, nor to BAdI error message on line item or account records or other part of the PO.
Regards,
Raymond