Skip to Content

BADI Implementation for Custom Reimbursement workflow

May 24, 2017 at 06:30 AM


avatar image


We have Custom Workflow for Reimbursement Approvals. We have configured My Inbox FIORI App to allow user Approve/Reject Reimbursement requests.

but Approve/ Reject buttons are not working i.e. they are not approving work-item from Frontend. We have enabled similar actions for Purchase Order by Implementing

BADI - /IWWRK/BADI_WF_BEFORE_UPD_IB for which we found some helpful code on SCN.

Can you provide some code to implement this BADI for Reimbursements

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Pavan Bhamidipati May 24, 2017 at 06:58 AM

Hi Ankit

There is a table SOSP_T_WF_INFO in which you can maintain the applicaiton and workflow related information. Customization related view cluster is VC_SOSP_WF_CUSTOMIZE. You can also define a handler in the customization in the field APPL_CH_API of the table. This function module is called dynamically.

Sample function module with the needed signature of the FM would be something similar to this S_OSP_WF_PAT_DEFAULT_CH_IB

To come back to your point of view how to make sure the work item is approved first is first

  1. Make sure the service is enabled and active in gateway system.
  2. Make sure all the mandatory parameters are passes to the service.

The Badi you referred basically helps you update something before the work item is completed. I guess, this is because the interface signature already had the Decision key that is the action performed on the application level. For example, Approve / Reject. However, I would try something like this after checking all the prerequisites between the Front and end system communication and settings:

  1. Based on the decision key I would read the workflow container and application container table information which is passes into the method as importing.
  2. I update this information into the work item container which I get as a input into the BADI. by usinf SAP_WAPI_WRITE_CONTAINER.
  3. Ill make sure Commit the work.

This is just an Idea. I may be not correct as well. Just a suggestion.

Thanks, Pavan

10 |10000 characters needed characters left characters exceeded