cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Disable Partial Approval/Rejection Functionality

Former Member
0 Likes
1,705

SRM 5.0; R/3 46C; classic scenario

Hi everyone,

I was wondering if it's at all possible to disable the partial approval/rejection functionality (by line item).

I know that using BBP_WFL_SECURITY I can disallow any changes to the document but I am looking to disallow all but full rejection or full approval by the approver.

Thank you as always.

Jay

View Entire Topic
Former Member
0 Likes

Hi,

What you could do is use FM BBP_PDH_WFL_WI_FROM_OBJECT_GET to get the active step in the workflow, and then use FM BBP_PDH_WFL_CONTAINER_ELEM_GET to get the container element in which the approval state is stored. This should be either 0 or 1. If not, issue an error message in the bbp_doc_check_badi. I have used this construction for a similar problem, an it worked.

BR,

Sjoerd.

Former Member
0 Likes

Hi Sjoerd

It seems like I am unable to do this as:

1) In the doc change BAdI I do not seem to have the shopping cart number to use as one of the inputs to the first function module

2) It seems like this method will not return the individual item approval levels

Could you perhaps provide more information on how to get this done?

Thanks

Jay

Former Member
0 Likes

Hi Jay,

1. You should have the shopping cart number and the shopping cart guid in the header data. You can use this for the first FM.

2. I do think that you can use the second FM to check for item approval levels. The approval state is set to '4' when there is a partial approval/rejection. However, it is set to '0' or '1' in case of a complete approval/rejection.

BR,

Sjoerd.

Former Member
0 Likes

Hi Sjoerd,

Thank you truly for your help. I was able to get the SHC number and the SHC GUID. When I run the status check before the approval (BBP_PDH_WFL_CONTAINER_ELEM_GET) - it always is zero - only after the work item has been processed, the approval status is set.

Am I understanding this correctly?

Thank you again,

Jay

Former Member
0 Likes

Hi Jay,

This is correct. The initial value is 0. When the approver chooses one of the options, the approval state is changed, unless the shopping cart is fully approved. In this case, the approval state is also 0.

With the first FM you should be able to see which work item currently is active. Read the container for that work item, and check the approval state. If the approval state does not equal 0 or 1 it was not fully rejected/approved, and you should issue an error message.

BR,

Sjoerd.

Former Member
0 Likes

Hi Sjoerd,

Sorry about the confusion but I am a little lost.

It seems that the approval state isn't set unless you actually "save" the work item. How would I check the approval state if the item has yet to be saved? Am I understanding correctly that this validation can occur before the item is actually approved or rejected?

Thank you sooo much.

Jay

Former Member
0 Likes

Hi Jay,

You seem to be right. The approver first has to save the work item for this FM to be used, as this FM reads the database. Perhaps some other FM can be used to read the decision at runtime. You could try searching for the BBP_WFL* and BBP_PDH_WFL* FM's and testing if one of these works.

BR,

Sjoerd.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Jay,

I have got same requirement. What was the solution in your case ? My idea is disable the reject button in item level and if approver need to reject he should go back to the inbox.

Regards,

Masa

Former Member
0 Likes

Hi,

If you want to change the display of the button irrespective of the roles,then you can change the template SAPLBW02 1200 of service BBPAPPROVAL.

BR,

Disha.

Pls reward points for helpful answers.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

We are talking about the approval screen which you get after clicking a workitem, not the workitem list in the inbox. It looks like ...

-


Approved X Rejected _ Item1

Approved _ Rejected X Item2

Approved X Rejected _ Item3

-


SAVE button

Customer requirement is approver should approve all items or reject all items. Partial approve is not allowed.

Any idea ?

Regards,

Masa

Former Member
0 Likes

Hi Masayuki,

I have the exact requirement. Were you able to solve your issue?

Regards,

Nikki