on 04-04-2014 7:33 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean by not SAVE?
You can hold the shopping cart , after you correct the errors ,you can order it.
Regards,
Hayashi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.