cancel
Showing results for 
Search instead for 
Did you mean: 

Mass approval functionality for SRM work items

11-16-2010 11:10 AM
467 views 5 comments
0 Likes
Subscribe

Hi,

We want to implement mass approval functionality for SRM workflow, so that any user is able to approve/reject multiple requests at one go through UWL.

Please guide if it is possible to implement this functinality for task id TS40007952.

Regards,

Avantika

0 Likes

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

Hi Avantika,

Two things...make sure you are looking at the correct task on the backend and have defined that exact task in the xml file..triple check to make sure on the backend that this is of type user decision as well. Another way to check this would be to see the decisions in the backend through the decision keys. You can get these decision keys from:

SAP_WAPI_DECISION_READ or SWK_DECISION_READ on a given work item

So, my gut feeling is telling me that there is another subsequent task that you may need to be looking at?

Beth Maben

EP - Senior Support Consultant

AGS Primary Support, Business Suite & Technology

      • Please see the UWL Wiki @

https://www.sdn.sap.com/irj/scn/wiki?path=/display/bpx/uwl+faq ***

Former Member
0 Likes

Hi Beth ,

I am Avantika's colleague . We have tested out a few Task ids corresponding to the workflows in use . Unfortunately none of those turned out to be of user decision type . It would be realy nice if you could let us know the approach going forward .

Regards

Mayank

Former Member
0 Likes

Hi Avantika,

The mass approval functionality can be implemented for simple workflow items which have decisions to complete the work item. (User Decision Type)

In SAP Business Workflow, user can define a task as a decision task by assigning DECISION as the underlying business object type. The task definition allows user to create two or more decision options to complete the task.

The idea is to simply create a custom view/subview for the UWL item and configure it according to your needs.

Have a look at this blog:

and also check the documentation:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/4e/72112bc9ea484196f2a5fdc68f5f5f/frameset.htm

Let me know if you have any questions.

Thanks,

Shanti

Former Member
0 Likes

Hi Shanti,

Thanks for the reply.

Actually I have Already gone through both the links you have metioned.

We are having standard SRM workflow for approval and we donot want to change it.

When I implemented the way it is mentioned in the blog, it gives me error that 'workitem is not a user decision type'.

While the functional team says that TS40007952 is a user decision type. So, not able to figure out what is going wrong.

Can you suggest how to achieve this?

Regards,

Avantika

mithiljain
Participant
0 Likes

For SRM mass approval/rejection, you can use the standard function module /SAPSRM/FU_WF_RFC_DECISION.

CALL FUNCTION '/SAPSRM/FU_WF_RFC_DECISION'
            EXPORTING
              iv_header_guid = ls_header-guid
              iv_mode        = 'APPROVAL'
              iv_wiid        = ls_mass_approval-wiid
              iv_decision    = lv_decision
              iv_approver    = sy-uname
            TABLES
              message_lines  = DATA(lt_messages)
            EXCEPTIONS
              OTHERS         = 1.

 

You can call this FM for each selected workflow item from the mass approval process, passing the corresponding WIID, document GUID, decision (APPROVED/REJECTED, depending on your implementation), and approver.

I have used this approach for implementing mass approval/rejection for SRM workflow items.

You will still need to handle the selection of multiple work items and the UWL-side/UI logic, but /SAPSRM/FU_WF_RFC_DECISION can be used to process the actual workflow decision.