cancel
Showing results for 
Search instead for 
Did you mean: 

SRM message rewrites

MariusStoica
Active Participant
0 Kudos

Hi guys,

I have an issue with SRM 🙂

So it happens that the client wants to change the "budget exhausted" message type from "W" to "E" according to some conditions (it should be dynamic) before saving the Shopping Cart (UI5 or PSC) but some messages are rewritten, and using FM "BBP_PD_LOG_GET_MESSAGES" I see the "MSGNO" the same even if the messages differs.

Ex:

msgid = BBP_PD
msgno = 047
message = Item XXX Order YYYYYY budget almost exausted (needs to be "W")

actually has another message no and message ID when is it added to SRM's message log.

is the same with

msgid = BBP_PD
msgno = 047
message = Item XXX Order YYYYYY budget exceeded (needs to me "E")

So .. because SAP decided to rewrite the message No's, I am unable to read which actual message is given at a certain time in class "CL_IM_SRM_DOC_CHECK" method "BBP_DOC_CHECK" with the aforementioned FM.

Is there a way to get / read the actual message number of a given message in this particular spot (the class mentioned) or I can do the check in another place or use another function?

Regards,

Marius

Accepted Solutions (1)

Accepted Solutions (1)

MariusStoica
Active Participant
0 Kudos

Hi guys,

What I found out is that I could use the enhancement point in function module "B31I_ACC_PURCHASE_ORDER_CHECK" in order to catch, check and modify the original error message no / type.

Regads,

Marius

Answers (1)

Answers (1)

ricardo_cavedini
Employee
Employee
0 Kudos

Hi Marius,

Actually, message BBP_PD 047 is a dynamic message ID. It usually displays an ECC error message. Since there are many messages coming from ECC, BBP_PD 047 is used to display all these ones in SRM side.

You can have a look at BAdI BBP_MESSAGES_BADI, that is specific for accounting messages, but I think such change would require more efforts and custom enhancements.

Regards,
Ricardo

MariusStoica
Active Participant
0 Kudos

Hi Ricardo,

I created an implementation for it and checked the SC. The message doesn't appear there. I checked both methods "CHECK_ACCOUNT" and "FILTER_MESSAGES" for the output parameters and none where filled with the messages that the SC throws up "at me" :P.

Do you have any other ideas how to intercept the messages or where ?


Regards,

Marius

ricardo_cavedini
Employee
Employee

Hi Marius,

Maybe you can put a breakpoint in FM META_BAPI_DISPATCH, which will be called many times.
One of them will be related to the accounting checks performed in ECC side. From there the budget exceeded message would come.


Regards,
Ricardo