cancel
Showing results for 
Search instead for 
Did you mean: 

BBP_DOC_CHECK_BADI during SC Approval

Former Member
0 Kudos

Hi,

We wanted to make certain validations during the approval of SC. We have written our logic in BBP_DOC_CHECK_BADI; it is getting triggered; we can see in the debug mode that, ET_MESSAGES is getting filled too... but still the message does not appear in message area.

Are we sure that, BBP_DOC_CHECK_BADI works while approving? Is it a bug, or are we missing anything? Anyone has done custom validations during approval? Any other ideas to do the custom validations here?

Ganapathi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ganapathi,

During approval process if there is no change in the UI, and if you click on submit button then it will not do any validation check. If you try to select either reject or approve ( radiobuttons) then it adjusts the screen( which means that UI is changed, then you can see the error).

Please put a break point in below method

class : /SAPSRM/CL_CH_WD_BOM_SC

method : /SAPSRM/IF_CLL_BOM_SC~submit

This may help you..

Regards,

Krishna K

Former Member
0 Kudos

Hi Preeti, Venkat, Krishna K,

Sorry for the delay in Response... Thanks for your replies... With this a new thing which I realized was, the system can do validations only for accepted items, it won't do the validations for the rejected items, as it needs to be returned the SC creator along with the error...

In fact we wanted to make validations for rejected items... our actual requirement was, we wanted to ensure that, the approver must enter comments if he/she rejects one or more item in the SC.... i.e..if the approver  rejects at least one item, then the approver comment's should be mandatory...

Dear Krishna K.... do you think we can accomplish our requirements with an enhancement in the class/method you suggested? anyway we are trying that...

If anyone has any other ideas, kindly suggest...

Ganapathi

Former Member
0 Kudos

Hi Ganapathi,

Yes, it is possible to validations in this method( in implicit enhancement at the begining of the method). And set this error message as validation error using method add_validation_error.

Hope this helps you.

Regards,

Krishna

Answers (2)

Answers (2)

venkatakrishna
Active Participant
0 Kudos

Hi Ganapathi,

Try to check  iv_mode in the Badi.

Eg-  iv_mode eq 'C'  or iv_mode eq 'T'.

Regards,

Venkat

preeti_negi
Explorer
0 Kudos

Hi Ganapathi,

Yes it should work.

Note 1845735 should help you.

Best Regards,

Preeti