cancel
Showing results for 
Search instead for 
Did you mean: 

SC - BBP_DOC_CHECK_BADI - Save Should not happen in CASE of ERRORS

Former Member
0 Kudos

Hi All,

Iam using BBP_DOC_CHECK_BADI for validating the data in SC.I want to stop the SAVING of SC, if  there is any error.I'm able to Stop the Order,but not SAVE.

Please can you let me know,how can i stop saving of Shopping Cart,if there is any error.

Thanks,

Sriram

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hello Sriram,

One way is to do a document check on action "Save" before the document is actually saved. You can create an internal enhancement on method /SAPSRM/IF_PDO_BASE~SAVE (Class /SAPSRM/CL_PDO_BO_SC) and do a document check. In case of errors, return without executing the following code. Additionally, throw an information message that all the errors need to be cleared if the user wants to save the SC.

Alternatively, you can make use of metadata framework and do not enable the "Save" button unless all the errors are cleared.

But, I would agree with the responses above that why would you like to have such feature. You have "Order" to order a document without errors. "Save" is meant to hold SC irrespective of any errors.

Regards,

Arun Singh

Former Member
0 Kudos

Hi Sriram

I have few questions before I can answer, you mentioned any SC with error shouldn't be saved

my point is if all the workflow steps are executed and still the SC is faulty, what would you expect from that SC to do ,the shopping cart is saved by default and the status could be error in process this case may arise.

Regards

Former Member
0 Kudos

What do you mean by not SAVE?

You can hold the shopping cart , after you correct the errors ,you can order it.

Regards,

Hayashi.

ThomasZloch
Active Contributor
0 Kudos

I think this is by design, as one should "normally" be able to save an incomplete shopping cart in order to finalize and order it later on, without having to start all over.

Are you sure your users will be happy if they cannot even save the current status in case of errors?

You might have to investigate and find the right spot for an implicit enhancement to achieve what you want.


Thomas

Former Member
0 Kudos

Hi,

Yes ,they don't want to save the SC if there is any error.

Thanks,

Sriram