cancel
Showing results for 
Search instead for 
Did you mean: 
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
View Entire Topic
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.