Hello Maia,
As per Workflow Best Practices, when a object (sales order, PO, request) is changed while it is still under approval, old WF instance should be cancelled and new WF instance should be triggered. This ensures that approver has no duplicate approval items. We implement this functionality by making the WF template listen to change event during approval process. BOR object/Class used in WF should have changed event and we need to ensure that this event gets triggered when object is changed.
In some cases there is a requirement that approver can change a request on behalf of requester (sales order, Shopping cart) and then approve. This option should not be encouraged because ideally changes should be done by requester. But if we have to implement this functionality then we have to:
Call the transaction to change the request when user clicks "Change" and then use macro "exit_cancelled" in standard user decision task code to keep the workitem in the approvers inbox.
CASE lv_subrc.
WHEN 00.
*- set result
* swc_set_element container result wi_result.
WHEN OTHERS.
exit_cancelled.
ENDCASE.
Regard
Sandy