cancel
Showing results for 
Search instead for 
Did you mean: 

Approve work item manually in SRM

Former Member
0 Kudos

Goodday,

We have a requirement to approve a work item in our process controlled workflow in SRM. From the Shopping cart number, we are fetching the current work item number. We need to find some function module to approve this work item. Here is the work we did so far:

1. Using function module: SAP_WAPI_READ_CONTAINER, SAP_WAPI_WRITE_CONTAINER followed by SAP_WAPI_WORKITEM_COMPLETE.

We tried to update the container and complete the work item. The issue here is that we are not sure which element (in the container) needs to be populated for the approval. We compared the container of workitems that have been approved and rejected (from the Portal), and we were surprised that the entries are the same!. This lead us to think that approve/ reject actions are somehow handled with UWL and not container.

2. We tried using function SAP_WAPI_DECISION_COMPLETE; this did not work

3. BBP_PDH_WFL_WI_APPROVE - This function module did complete the work item, however rendered the workflow in error status. We debugged the function as well; but could not find anything.

Please advise if there is any other function module in SRM that suffices our requirement.

Thanks, MS

Accepted Solutions (1)

Accepted Solutions (1)

former_member184741
Active Contributor
0 Kudos

hi,

try  /SAPSRM/FU_WF_RFC_DECISION, pass  APPROVAL for iv_mode  ACCEPTED for iv_decision 'O' for iv_approval_type

thanks,

sankar.

Former Member
0 Kudos

Thanks Sankar!! This function module is working now.

The only change we made is the iv_mode should be 'APPROVED'.

Thanks! MS

Answers (0)