SAP Virtual/Onsite Trainings

Document Categories:

What's New?

Contribute?

Sample Specs

What's Hot?

Web Dynpro for ABAP Tutorials 


Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe  Unsubscribe 

Capture Rejection Reason Text from User Decision in Workflow

By Anirban Bhattacharjee, KPIT Cummins and Infosystems

Purpose: The purpose of this document is to capture the rejection reason text from the user decision step in workflow.

Business Scenario: When a user decision with the APPROVE and REJECT options are sent to the approver, there always comes a business need to allow the user to enter a “Rejection Reason” text, when the approver does a rejection. In the older SAP Releases, the standard User Decision step did not have a process to capture the rejection reason. The latest release of SAP includes this feature.

In this document we will see how to use this feature and capture the rejection reason text and also pass it to an e-mail sending step. This e-mail we can send to the original requestor so that he gets to know the cause of the rejection and resubmit for approval after the necessary corrections.

Process: This demo creation will involve the following steps

·         Create a user decision step with APPROVE and REJECT options and model the Rejection Reason only for the REJECT Branch.

·         Capture the rejection reason text and pass to an e-mail sending step via a container.

Pre-requisites: There are a few pre-requisites before doing this demo.

·         You should know how to build a basic workflow with the send e-mail step and user decision step. (SAP Technical.Com already has these tutorials)

·         SCOT and SAP Connect must be configured for e-mail sending.

·         All other workflow configurations via SWU3 are already done.

·         You know how to create methods in a custom BOR and call in workflows. (These will not be covered in details)

Create Custom Workflow and Method to read the REJECTION Reason for Demo

(Please read the tutorials on creation of Custom BOR/Method and Custom Workflow with user decisions and e-mail sending steps in SAP Technical.Com to get the details)

We create the user decision step and mark the two branches APPROVE and REJECTED as shown

Notice that in the latest SAP version, we have an option to configure the Rejection / Approval reasons.

You can use this for any reason you want as per the branch you have created.

We can mark the Reason as Mandatory or Required.

Mandatory: This means, that the Reason has to be mandatorily entered when the corresponding action is performed, else the user decision work item cannot be completed.

Required: This means, that entering the Reason is optional. The pop-up to enter the reason will appear, but it is not needed to enter anything to complete the work item.

Here we will mark this Reason as MANDATORY for our REJECT Branch as shown

The step is saved. When the user enters the Reason, it will get appended into the _Attach_Objects standard container of the workflow.

This multiline element points to the SOFM Business Object.

We will now write a method to read this attachment and transfer to a text string.

This method will be an instance independent method. This means, it can be called without instantiating the BOR.

The parameters for this method are shown below

Click here to continue..

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image