cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How do I add an error message to the shopping cart screen?

Former Member
0 Likes
270

I'm somewhat new to programming in SRM. I'm trying to add some error checking to our shopping cart process. I thought I could add these checks to the BBP_SC_CHANGE method, but I don't want the type of pop-up box that comes up if I just use the 'Message' command. I'd like to have a message come up at the top of the shopping cart screen, similar to the system-standard messages that come up, once you click 'Order' or 'Check'. Should I be using a different method than BBP_SC_CHANGE, and what can I do to get messages to appear on the shopping cart screen?

Accepted Solutions (0)

Answers (1)

Answers (1)

ricardo_cavedini
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello,

In order to generate error messages, you should use BBP_DOC_CHECK_BADI instead of BBP_DOC_CHANGE_BADI.

This badi has a message table, which will be populated by your own code and raised in the screen when provided.

Regards,

Ricardo

Former Member
0 Likes

Thanks for the reply. I noticed that the BBP_DOC_CHECK_BADI doesn't have a lot of useful information passed into it, like the BBP_DOC_CHANGE_BADI does. I'm trying to do a check between the purchasing group and location partner (which are both available in internal tables that are passed into BBP_DOC_CHANGE_BADI. Is there any way to access this data in the BBP_DOC_CHECK_BADI?

laurent_burtaire
Active Contributor
0 Likes

Hello Robert,

First, read wiki below:

[Documentation BBP_DOC_CHECK_BADI|http://wiki.sdn.sap.com/wiki/display/SRM/Documentation+BBP_DOC_CHECK_BADI]

Then to get Shopping Cart data details, call function module BBP_PD_SC_GETDETAIL using BAdI parameter IV_DOC_GUID as importing parameter.

Regards.

Laurent.

Former Member
0 Likes

Thanks very much - this worked

Edited by: Robert Cusolito on Jun 1, 2011 8:12 PM

Edited by: Robert Cusolito on Jun 1, 2011 8:13 PM

Edited by: Robert Cusolito on Jun 2, 2011 3:19 PM