Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
mich_vollmer
Contributor
Customers using the Request for Change and the new CRM approval procedure have the functionality that the general approval has three potential outcomes.
1.) For example if there are three customized approvers and all approve, the Request for Change is approved in general.
2.) If one approver rejects, the approval is not given, the Request for Change is set to status 'Rejected' after all approvers have decided their step..
3.) Then there is the not so known case, if all approvers select 'Not Relevant', the Request for Change just stays in the status 'To be approved' with an active approval procedure until another approver is added which approves and rejects.
But what if the Request for Change in general is valid but cannot be not implemented right now (capacity reasons, etc...), meaning you want to 'Postpone' it, put it 'On Hold' ?
It is technically very easy to add a further status to the approval procedure status profile 'IT000003'.
But having the new user status in the approval procedure does not mean you can use it easily.
Each user status in the approval procedure status profile is customized to set special system status which actually do the trick. The approval procedure checks hard-coded these system status and excutes the closing or activation of the approval procedure and further approval procedure functionality by it.
This means, if someone would enhance the approval procedure with another step status, the approval procdure code would have to be enhanced, too. You would need a developer and enhance SAP standard.
This blog is showing an alternative, how to build the process of the 'On Hold/Postponed' functionality in the approval procedure via PPF action and with the help of the ChaRM Framework. Just with another created user status in the Request for Change user status profile and not the approval procedure user status profile.
With customizing alone :-). Here is the process map. I have used the standard SMCR naming.
The example is already an copied YMCR Request for Change and has been implemented by at least one customer:
For first-timers in the user status, PPF and ChaRM customizing, please refer to my blogs here where you can find more detailed descriptions for the customizing steps:
  • Create an additional user status 'On Hold/Postponed' in the user status profile YMCRHEAD
  • Create an PPF Action YMCR_ON_HOLD to set the User status 'On Hold/Postponed'.
        A fast way would be to copy PPF action 'YMCR_AWAITING_APPROVAL'. Then change the container element USER_STATUS to value 'E0016'
       (the  user status 'On Hold/Postponed'). Remember that if you copy a PPF action, the translated texts are copied as well and you might have to adopt

       them.

The PPF condition should be customized to be executable in user status 'To be approved' (E0012).
  • Create an PPF action YMCR_BACK_TO_APPROVAL to set the User status from 'On Hold/Postponed' back to 'To be Approved'.
        A fast way would be to copy PPF action 'YMCR_AWAITING_APPROVAL'. Then change the container element USER_STATUS to value 'E0012'
       (the  user status 'On Hold/Postponed'). Remember that if you copy a PPF action, the translated texts are copied as well and you might have to adopt
       them.
       Adopt the PPF condition, so it is executable in user status 'E0016' (On Hold/Postponed).
Last but not least customize the ChaRM action 'APP_PROC_INI to user status E0016 'On Hold/Postponed'.
The ChaRM action initialzes the Approval Procedure when the user status E0016 is reached, so the approval procedure can be activated again if the user status is set from 'On Hold/Postponed' back to 'to be Approved'.
Go to transaction SPRO->....section: Change Request Management->Change Request Management Framework->Make Settings for Change Transaction Types.  There in the area Assign Actions. The ChaRM action 'APP_PROC_INI' is a s well assigned to the 'Extend scope' user status (E0011), just copy the entry and change to user status 'E0016'.
Add the authorizations of B_USERSTAT to set the new status
Add the authorithy B_USERSTAT with value YMCR_016 to the profiles who should be able to set the user status 'On Hold/Postponed'.
In case, you need a more complicated logic like alllow it only change manager assigned as approver, a BadI implementation in BADI

EVAL_STARTCOND_PPF has to be done and customized in the PPF condition for both actions, so the PPF action is visible only for those roles.

That's it. In the UI you will have a new PPF action available to set the user status to 'On Hold/Postponed' during an active approval procedure and back from the status to 'To be Approved' to again start the approval procedure process.
If you find errors or have comments, get in touch,
Thanks,
Michael
1 Comment