cancel
Showing results for 
Search instead for 
Did you mean: 

Validate manually added approvers in BBP_DOC_CHECK_BADI

Former Member
0 Kudos

Hi all,

We have a requirement to check if the requisitioner has added approvers manually or not by clicking the add approver button in approval preview. This check has to be put in the BBP_DOC_CHECK_BADI before the shopping cart is ordered.

Below are the options which I tried but failed to achieve.

1. Used the BBP_PDH_WFL_APPROVAL_SIMULATE and BBP_PDH_WFL_PARAM_APPLET_FILL2 to get the approvers list. But using these function modules in the BBP_DOC_CHECK_BADI is giving wierd results in approval preview.

2. The workitem id is initial before the shopping cart is created. So the option of using the BBP_PDH_WFL* function modules to get the approvers list is also ruled out.

3. Before shopping cart is created, the manually added approvers are stored in the global table GT_WF_APPROVER of the function group BBP_PDH_WFL. I need any way to access this global table in the BBP_DOC_CHECK_BADI. Any suggestions?

4. When Transfer button is clicked i set a flag and import it into memory and later export and put a check in the doc_check badi - if the flag is set it is assumed that the approver is added else throw an error message "Please add approver". But I am facing an issue with the display of error messages. Even if i add the approver the error message is still displayed. Only when i click the check button the correct messages are shown.

Pointers to achieve this is very much helpful.

Thanks and Regards,

Asha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Which flag are you setting in the memory??

Also see the solution in the foll thread which deals with the same reqt:

BR,

Disha.

Do reward points for useful answers.

Former Member
0 Kudos

Hi Disha,

I am setting a temporary flag which identifies that the transfer button has been clicked or not. And coming to the thread which you suggested, I have used the same logic in the simulate_approval_pbo subroutine - the function modules BBP_PDH_WFL_APPROVAL_SIMULATE and BBP_PDH_WFL_PARAM_APPLET_FILL2. But as I mentioned earlier, using these function modules in the BBP_DOC_CHECK_BADI before clicking the aproval preview is causing problems in the approval preview because it is clearing some of the global variables and tables in the function group.

Any other suggestions are welcome

Thanks and Regards,

Asha

Former Member
0 Kudos

Hi,

Pls see the routine simulate_approval_pbo in function group bbp_pdh_wfl.

You can use the same logic in your BADI.

BR,

Disha.

Do reward points for useful answers.