Skip to Content

SRM message rewrites

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 18, 2017 at 03:18 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 30, 2017 at 07:58 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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