cancel
Showing results for 
Search instead for 
Did you mean: 

Making Rejection reason mandatory during SC approval WF

Former Member
0 Kudos

Hi All,

I have a requirement to make the approval note mandatory when an approver is rejecting a shopping cart. I have been following all the related discussions on scn, but now I am stuck at a particular point for which I need some help.

I have implemented Doc_check_Badi wherein I am checking if the approval note is filled or not (E_LONGTEXT has TDID = NOTM). If not, I am giving an error message. The BADI does get triggered during rejection and the message is updated as well. However while debugging I found that the message gets deleted in class /SAPSRM/CL_PDO_BO_SC method CHANGE_DOCUMENT.

I got some inputs from scn which  tried when the above option dint work. I implemented an enhancement to /SAPSRM/IF_PDO_ADV_BASE~SUBMIT_DECISION and added a error message to the message log (lt_messages).

When I tested this, this worked. The error msg was displayed.

Now I need to stop find out how to check whether the approval note is filled or not and if not filled, the rejection should not happen. I am looking into avoid the rejection action to happen now, specifically at /SAPSRM/IF_PDO_ADV_BASE~REJECT. When this method is called, I should not allow it to continue with the standard approach.

It should give an error msg and come back to the prev screen.

Please let me know if anyone has implemented this code before/ or has some tips on how I can proceed here. Any sample code will be helpful as well.

Thanks, Liz

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi All,

Any ideas on the above issue? I believe this is  very common requirement for SRM WF.

Pls let me know if anyone has faced this issue before.

Thanks a bunch!

Liz

konstantin_anikeev
Active Contributor
0 Kudos

Hi Liz,

how do you wand to handle offline approval?

Or offline approval is not used?

Regards

Konstantin

Former Member
0 Kudos

Hello,

Offline approval is not in use. We are using a custom Process schema/ process controlled WF which is tested & working as expected.

In case of rejection, we need to make the approval note mandatory.

Pls advise.

TIA, Liz

Former Member
0 Kudos

Hello,

Take a look at class CL_BBP_EVENTS_SHC method ANALYZE_DIFF_EVENTS.

 

In this method, there is code to check if an Approval note (NOTM) has been added by calling FM 'BBP_PD_ALL_GET_DIFF'.

 

You can take hints from this code ( you can reuse most of it) and write your logic in /SAPSRM/IF_PDO_ADV_BASE~REJECT.

 

Let me know if you have any questions.

 

Regards,

Sushil.