Using this BAdi, customers can decide the approval agents for the work item in My Inbox app for different purchasing documents.
App: Custom Fields and Logic
BAdi: Procurement: Agent Determination in Flexible Workflow (MM_WORKFLOW_AGENTS_V2)
This BAdi has the following filter parameters:
- businessobject = PurchaseOrder
- businessobject = PurchaseRequisition
- businessobject = CentralPurchaseRequisition
- businessobject = PurchaseContract
- businessobject = SchedulingAgreement
- businessobject = RequestForQuotation
- businessobject = SupplierQuotation
- businessobject = CentralPurchaseContract
- businessobject = ServiceEntrySheet
Note: Only one BAdi implementation can exist per business object
- This parameter provides the business object name (like PurchaseOrder, PurchaseRequisition or SupplierQuotation, etc.)
- Possible values are listed in the filter criteria
- This parameter provides the purchasing document number
- This parameter provides the item number of purchasing document
- This parameter provides the information about which workflow scenario is used, as there can be several scenarios for the same business object
- This parameter provides the approvers of the previous approval steps. This may be required to determine the approvers in the current approval workflow step.
- This parameter contains the approvers of the current approval level
- This parameter cannot be returned empty. If it is returned empty, then this would result in workflow error
- Like any other workflow step, if approval agents are not determined inside the BAdi implementation the work item will result in error.
- The workflow step information is not available in this BAdi
Requirement: Work item needs to be approved based on the net amount of the purchase requisition item as described below:
- Amount less than or equal to 10000 needs to be approved by the user "Manager"
- Net Amount in between 10000 and 20000 needs to be approved by user "Procurement Manager"
- Net Amount greater than 20000 needs to be approved by user "Purchasing Manager"
The above requirements are satisfied by the BAdi implementation given below: