Skip to Content
0

Custom message ME59N/ME59

Nov 14, 2016 at 05:57 PM

105

avatar image
Former Member

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?

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Nic Teunckens Nov 14, 2016 at 09:26 PM
1

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.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 15, 2016 at 08:42 AM
0

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

No worries, glad to be able to Help.

As an additional Tip : you could create a Local program that fetches most / all UserExits & BAdI's ...

There are some Code-Samples on that in the SAP Wiki : link / link ...

Create the program, run the Report for 'ME59' and you should get a (pretty big) list on Available BAdI's / Exits you could use.

On another Note : have you tried to convince your User-Base that the use of trx."ME59" is not recommended anymore? There are SAP-KBA's out there that indicate SAP will not provide Code-Changes to the 'older' MMPUR-Transactions and will only Actively maintain the 'Enjoy'-transactions ...

In addition, whenever some SAP-processes (for example 'Document Flow') point to these 'old' transactions, SAP assistance (KBA's) is available to allow Redirecting these to the 'Enjoy'-transactions. Thus, there would be little reason to perform a lot of additional Maintenance yourself ...

If your query is answered, please Close the Post ...

Kind Regards

Nic T.

0
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.

0