cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Partial Approval/Rejection Functionality

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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 Kudos

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 Kudos

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 Kudos

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 Kudos

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 Kudos

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 Kudos

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 Kudos

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 Kudos

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 Kudos

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 Kudos

Hi Masayuki,

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

Regards,

Nikki

Former Member
0 Kudos

Hi Jay

Have you tried BADI BBP_WFL_SECUR_BADI which we can use to regulate our own rules for changing or displaying the buttons.

we can use this with roles Employee or Manager roles and even set Security levels 0-4.

read the documentatio of BADI BBP_WFL_SECUR_BADI

regards,

Nimish Sheth

Former Member
0 Kudos

Hi Nimish,

Thank you for your response. Correct me if I am wrong but the documentation seem to suggest that this is regarding the change of the SHC contents not the actual approval - which can be done at the work item processing. I am thinking perhaps I need to gray out the save button in the SHC details screen so that they can only conf/reject fully from the initial work item screen. Or possible option would be to gray out the radio buttons if possible.

-Jay

Former Member
0 Kudos

Hi jay,

You can go to tcode SWL1,for the WF task in the approval WF for SHC,the attributes EC_DECISION and EC_MAIL are maintained..These attributes control the enabling/disbling of the radiobuttons "Approve/reject" in teh approval screen...

Regards,

Disha.

Pls reward points for helpful answers.

Former Member
0 Kudos

Hi Disha,

Would you be able to provide a bit more detail on this?

I am not sure exactly what I am looking at...

Do I erase an entry in this table? Or add... I think the task is an WF task.

Thank you.

Former Member
0 Kudos

Hi Jay

I am not sure about looking at the configuration, but you might want to try looking at the BBP_DOC_CHANGE_BADI and adding some checks there that does not allow the shopper to do partial approval.

I have not looked at this possibility myself, but it seems a viable option.

Nicholas

Former Member
0 Kudos

HI Jay

If you are looking for a solution that approver can either reject all items in SC or Either Apporove all the items in the SC. correct me ??

If this is the case you need to user BBP_Change_Document_BADI.

Chk the properties of Approve = 0

Rejected - 1

Check for the first line . If it is 0(Approve) try to compare the same for all lines and throw an error message through BBP_Document_Check_Badi

You need to use both the Badis Change and Check.

And pass the value whether Approved or Reject from change BAdi to the global memory area and use the same in Check badi to throw an error message.

regards,

Nimish Sheth

Former Member
0 Kudos

Hi,

Yeah if these entries are not present... the radio buttons are disabled..You can try this..

BR,

Disha.

Pls reward points if the answers are helpful.

Former Member
0 Kudos

Hi Nimish,

Thank you again for the response. I was wondering where are the properties "Approve" and "Rejected?" Is it in the import table or is there some other method to retrieve it.

Disha, that seems to only work for the header level approval/rejection - I am concerned w/ the item level approval for Shopping Carts with multiple line items.

Thank you all.

Former Member
0 Kudos

Hi Nimish

I am with J, what variable do I look for to check the approval/reject status.

I must apologize J, I did not check the fields available before posting my answer. I do not see a approval/reject property.

Nimish, any help here?

Nicholas