on 10-08-2013 10:33 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.