Skip to Content
avatar image
Former Member

Custom message ME59N/ME59

Hi all,

I've searched scn but not able to find the answer to my question: I need to show some custom messages (type E or W) in PO related transactions, at "save" or "check". I'm currently using EXIT_SAPMM06E_013 for "save" and EXIT_SAPMM06E_012 for "check". Now this works for ME21/ME21N/ME22/ME22N but is not working for ME59/ME59N: in this case no message (apart from one standard message) is shown. In debug I can see the handler is getting my message correctly, but I can't see it in output, even if I choose "all messages" in "detailed log". It seems that somehow my custom message is not considered.I've also tried adding it in T160M, without success.

Can anyone help?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 14, 2016 at 09:26 PM

    Please see the SAP Wiki on this : link

    A BAdI implementation for "ME_PROCESS_PO_CUST" should probably serve you best here.

    Please read the documentation / sample code of the BAdI on the appropriate way to call a Message in the MMPUR-BAdI's or see SAP-KBA 1709562.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 15, 2016 at 08:42 AM

    Hi Nic, thanks for your answer.

    I tried with ME_PROCESS_PO_CUST using cl_message_mm=>create(...), but this isn't giving message, instead it has a strange behaviour: it is blocking the "save" process as I can't find the PO number after process terminates, but the screen presented is the one given when the PO has been successfully created...

    Also, as per SAP wiki you linked me, the ME59 won't call BADIs, so given that I have to show this message also for this transaction, this is not the right solution for me.

    What seems strange to me is that debugging till the end (before ALV showing) i see that the handler has my message in EVENTS attribute table, but this is not showing. Do you have any clue?

    Thanks again

    EDIT: Hi Nic, you were right, ME_PROCESS_PO_CUST gives correct result in ME59N, I was using wrong method... :(

    I'll check how to get the same behaviour in ME59, in any case thank you.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Nic Teunckens

      Hi Nic,

      yes, I have some code found here to find user-exit,badis,etc, however i'll try the second one you posted (seems more interesting).

      Regarding ME59, as the user asked for it, so I found the exit EXIT_SAPLME59_001 that is useful to my request (posting it if anyone is interested in it).

      I'm closing this thread, again thanks.