SAP Virtual/Onsite Trainings

Document Categories:

What's New?


Sample Specs

What's Hot?

Web Dynpro for ABAP Tutorials 

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

Modify the run-time value of workflow containers

By Anirban Bhattacharjee, KPIT Cummins and Infosystems

Purpose: The purpose of this document is to demonstrate how to modify the values of workflow containers from the workflow logs running instance. This means, you can actually modify and manipulate the workflow runtime values after the workflow has triggered and the work items are created. This will help you restore stuck workflow instances even when the SWPR transaction cannot restore.

Business Scenario: This manipulation has a number of uses, but for our demo we will consider the following scenario. In the workflow to send e-mails to outlook we use the send-mail step in the workflow. The e-mail ID is generally retrieved via a background task prior to calling the send mail step. This e-mail ID is retrieved from SU01 (User Master) or Info-Type 105 (Communication Info Type) Subtype 10. Many times it happens that the business forgets to maintain the e-mail ID. The e-mail ID is not retrieved thus and the e-mail step in the workflow goes into error putting the whole workflow into ERROR status. Simply running SWPR (Restart Workflow after ERROR) T-Code after maintaining the e-mail ID will also not help since the e-mail retrieving step has already executed and workflow is stuck at the e-mail sending step. Restarting the complete workflow will not be acceptable to the business since it will start the approval process again from the start, thus wasting precious business time.

It is at this difficult scenario, this container manipulation technique will come to your rescue.

Process: To set up a demo for this we will have the following steps

·         Build a custom workflow with just a send e-mail step with the e-mail field as importing. (Simplified for demo purpose)

·         Test-run this demo workflow via SWUS T-Code but do not pass the e-mail ID. This will put the workflow in ERROR status.

·         We will simply use SWPR T-Code first to try and restart the workflow instance. This will fail.

·         We will then modify the workflow runtime container and pass the e-mail ID.

·         We will restart the workflow via SWPR again. It will work this time.

·         We can check in SOST to see that e-mail is sent via SAP-Connect.

Pre-requisites: To follow and set up this demo, following are the pre-requisites

·         You should know how to build a basic workflow with the send e-mail step.

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

·         All other workflow configurations via SWU3 are already done.

Building the Custom Workflow with the send e-mail step

The e-mail ID container created is as shown below. It is marked as importing, but not mandatory

The e-mail step will contain this container EMAILID as the e-mail ID variable

After building the custom workflow with the send e-mail step, it will look as 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