Skip to main content

Example of Working of SAP Workflow

This section will guide you through the steps that are required to configure Email Runner to work with SAP workflow for purchase requisition ME51 transaction code.

Prerequisites:

  • Process Runner
  • Email Runner
  • SAP System and SAP Workflow
  • Emails

We have used following two emails in this example:

  • sapwf@zpas.us
  • sapwf1@zpas.us

sapwf@zpas.us: used in SAP, to send email to approver. Configure this email id in SAP and Email Runner for processing of incoming emails. Below are steps through which you can configure the email in SAP Workflow.

To configure Email Runner to work with SAP workflow,

  1. Login to SAP System and go to SWU3 transaction code. Expand Maintain Runtime Environment.
  2. Select the step Configure RFC destination and select F8 (or click button).
  3. Note the User ID in the Configure RFC Destination window.

  4. Go to transaction SU01, enter the user ID as above.
  5. Enter the email address which will be used by SAP Workflow to send email to approvers. This email also needs to be configured in Email Runner for processing of incoming emails.

    sapwf1@zpas.us: end user email id, has to be configured in Email Runner under Users.

  6. To know more on how to configure email on SAP, please refer Configure Email Settings in SAP.

Steps to configure Email Runner to work with SAP Workflow

This section will show you the steps to configure Email Runner to work with SAP workflow for purchase requisition ME51 transaction code.

  • Process Runner: Create two process files for ME51 and SAP_WAPI_DECISION_COMPLETE
  • Email Runner: Configure the process files , generate XML code for SAP Workflow
  • SAP Workflow: Create Email template
  • Approve or Reject Purchase Requisition by email

Process Runner: Create two process files for ME51 and SAP_WAPI_DECISION_COMPLETE

Note: Refer to the Process Runner Help for information about how to create a Process file.

  • ME51 - Create Purchase Requisition: This process file is required to create the single line item purchase requisition and create workflow from SAP.
  • SAP_WAPI_DECISION_COMPLETE: This process file is required to release the purchase requisition and approve or reject SAP Workflow.

Email Runner: Configure the process files , generate XML code for SAP Workflow

To configure the process file and generate XML code,

  1. Open Email Runner and select Engine Settings link in the Email Runner Management Console window.
  2. Select the appropriate engines, browse to select the process file created in Steps to configure Email Runner to work with SAP Workflow and configure the engine.
  3. Configure ME51-Create Purchase Requisition process file in SAP Process Engine of Email Runner.

  4. Configure SAP_WAPI_DECISION_COMPLETE process file in SAP Workflow engine of Email Runner.
  5. Once the process file is configured successfully, select Generate XML. Email Template window is displayed as shown in screenshot.

  6. Copy and paste the highlighted details in the body of email notification while configuring the SAP Workflow in SAP System with specific Work Item ID.

SAP Workflow: Create Email Template

To create email template in SAP workflow,

  1. Launch SAP GUI and open SWDD transaction for SAP workflow definition.
  2. Copy XML format generated by Email Runner in the email template of SAP workflow and set Work Item ID variable.

This is a sample email template code shown in this example.

Approve or Reject Purchase Requisition by Email

To approve/reject purchase requisition by email,

  1. Run process file ME51-Create Purchase Requisition through Email Runner. As you create the purchase requisition, a new email will come on sapwf1@ zpas.us from SAP (sapwf@zpas.us account) with the required data.

  2. After receiving the email, reply that email to sapwf@zpas.us (or any other email that need to be configured in incoming email settings in Email Runner) for approve or reject workflow.
  3. Once you approve or reject the workflow, you will again receive an email from SAP (sapwf@zpas.us email account), which gives the approved/ rejected status of the purchase requisition.
  4. To check the approved Purchase Requisition, go to SAP and enter the transaction code, ME54N. Enter the given Purchase Requisition number.

Was this article helpful?

We're sorry to hear that.