cancel
Showing results for 
Search instead for 
Did you mean: 

SRM 7.0 Process-Controlled (BRF) Workflow -- Error message to Shopping Cart

Former Member
0 Kudos

I am modifying a BRF Expression used to calculate approval levels. During this calculation, I may run into error conditions (e.g. Currency tranlsation not found) that I want to display to the user (in the Shopping Cart).

I have tried raising the following exceptions:

/sapsrm/CX_WF_RULE_ERROR.

/sapsrm/CX_WF_RULE_ABORT.

Raising these exceptions do result in SLG1 log entries being written, but the User is not informed of the error (ie. at top of shopping cart where other messages display).

I can probably jump out of the Webdynrpo to read logs, but thought there MUST be some standard way of passing error conditions from the BRF, back to WF, and then back to the Webdynpro Window.

Anybody raise error messages back to the online user from Process-Controlled Workflow?

Thanks,

- Tim

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Recode your own checks in DOC_CHECK_BADI

Former Member
0 Kudos

Hi Tim,

I am not sure about your business requirement, but if you want to display custom error message while user create a SC, SAP has provided a standard BADI - BBP_DOC_CHECK_BADI. You can implement this Badi to raise a custom error,warning message. You can build your brf logic in the BADI implementation..

Best Regards,

Saravanan Dharmaraj.

Former Member
0 Kudos

>

> Hi Tim,

>

> I am not sure about your business requirement, but if you want to display custom error message while user create a SC, SAP has provided a standard BADI - BBP_DOC_CHECK_BADI. You can implement this Badi to raise a custom error,warning message. You can build your brf logic in the BADI implementation..

>

>

> Best Regards,

> Saravanan Dharmaraj.

Hi Saravanan,

I am actually modifying the Approval Limit Checks (for multi-currency translations) that you recently coded in Maryland. It can occur that errors occur in determining limits (new Currency translation I just added), or during the lookup of agents (ie user config is inconsistent).

In these cases, I can make the shopping cart Dump, by raising untrapped error messages, or assertions. However, I would like to raise exceptions that get trapped (such as the ones I identified in original post), and then make their way to the shopping cart.

Unless I am missing something, I don't think the WF BADIs, or BRF are gonna communicate errors back to the shopping cart, even though these components are called during cart creation and checks.

I realize that I can recode the Agent Determination BADIs, BRF calls, or even read BRF logs within BBP_DOC_CHECK_BADI. I mentioned this in my original posting as well.

Anyway, any help is appreciated.

Thanks,

- Tim

Former Member
0 Kudos

Hi Tim,

I strongly recommend don't use exception to make shopping cart Dump or by raising untrapped error messages, you are going to lose the shopping cart if you have coded exception, say for example if you have coded an exception which is raising a Dump for 5 SC's out of 10, then you will be losing 5 SC's , Down the line next few years you will be ended up with Shopping Cart number range issue even 10 digits are maintained. I strongly recommend to use BBP_DOC_CHECK_BADI to raise any custom error message, in this case End user can put on hold the error SC and once the error rectify then End user can continue the same shopping cart later on. SAP use exception to identify the Standard issue and which will be fixed by SAP OSS note before the system will be gone to Go-LIVE.

I don't know what you are going achieve by raising Dump or untrapped error messages instead using BBP_DOC_CHECK_BADI?

Best Regards,

Saravanan.

Former Member
0 Kudos

The question was not whether to Dump or Not to Dump.

The original question was "is there a way to trap BRF errors during the original BRF call" (i.e. during display/edit agents button click) in SC. There are two trapped exceptions that can be raised in the BRF calls (e.g. CX_ABORT and CX_ERROR or something like that). It does not appear that those two make it all the way back to the cart (doesn't dump, but does write to SLGx application logs).

So to answer the question: No, you cannot pass the WF BRF errors back to SC during the original call.

Thx,

- Tim

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

What is the workflow status when you get error on BRF level? Is it error status or in process status?

Regards,

Masa

paul_klewans2
Explorer
0 Kudos

I am curious about this as well. Great question.