Sourcing Cockpit- Process All/ Selected Drafts
Is there a way to put a Hard Stop during Process all/ selected draft during Sourcing 3 rd stage.
We have made some validations on the PO based on price in the BBP_DOC_CHECK_BADI. The PO should not be created if the criteria is not met.
This is working when the user selects - Edit Selected Draft.
However when the user selects Process All Draft/ Process Selected Draft, the error is coming up, however the PO still gets created. There is no hard stop for the PO creation, when the user selects Process All Draft/ Process Selected Draft. Has anyone worked on such a requirement before? Please let us know.
To prevent the PO creation, you can put a hard stop error in the same window (SoCo wizard step 3). To do this, you can create an enhancement on the UPDATE method of the mapper class.
In method /SAPSRM/IF_CLL_MAPPER~UPDATE of interface /SAPSRM/CL_CH_WD_DOM_SOCO_GAF3
<insert validation logic here>
*add error message
CALL METHOD mo_cll_message_handler->add_validation_error
iv_msgv1 = .
This should display an error on the message window to prevent the user from proceeding to the next step/window. This should fit your requirement.
Let me know should there be any questions.