You are on page 1of 9

How to Get Work Items from

Workflow in your Outlook Inbox

Applies to:
Ecc 6.0 & Above ABAP- Workflow. For more information, visit the ABAP homepage.

Summary
The frequent question will come into your mind that can I configure my work item such that it comes to my
outlook inbox? Is it possible to execute the work item from user’s outlook inbox?

Author: Abhijit Mandal


Company: Capgemini India
rd
Created on: 23 February 2011

Author Bio
Abhijit Mandal working at Capgemini India for last 2 years as ABAP-Workflow consultants.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 1
How to Get Work Items from Workflow in your Outlook Inbox

Table of Contents
Objective ............................................................................................................................................................. 3
Scope…………….. .............................................................................................................................................. 3
Technical Details ................................................................................................................................................ 3
Build the report ................................................................................................................................................ 3
Schedule it on the background. ...................................................................................................................... 4
Unit Test of quality Notification ........................................................................................................................... 5
Execute the Work Item from your Outlook Inbox. ............................................................................................... 7
Related Content .................................................................................................................................................. 8
Disclaimer and Liability Notice ............................................................................................................................ 9

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 2
How to Get Work Items from Workflow in your Outlook Inbox

Objective
The objective of this document is to send work item in such a way that it goes to outlook inbox of the
authorized users will be processed directly from the outlook inbox. Work items will come as executable
attachment in the inbox.

Scope
Usually, Processors (or agents) of a process step receive the corresponding work items in their outlook &
web mail. As an alternative to this, the system can send e-mail with link to the work item.

The recipients can then execute the work item from the e-mails. For that, I will build a sample report &
schedule it in background with specific interval. For example Quality Notification workflow.

Technical Details
Build the report
As an example I’m processing a quality notification workflow. I have used 5 workflows WS20000021,
WS24500047, WS00200063, and WS00400064 & WS00200062.
To send work item to outlook inbox the program rswuwfml2 need to submit. For sending specific task’s work
items we need to build the report in such a way so that specific tasks can be passed during submission of
rswuwfml2 report.
Example of a code sample:
// Report Z_SEND_WORKITEM_TO_OUTLOOK
<html>
<head>
<title> Send work item to outlook </title>
<link rel="stylesheet" type="text/css" href="/sdn/css/csin.css" />
<link rel="stylesheet" type="text/css" href="/sdn/css/sdn.css" />
</head>
<body>
REPORT z_send_workitem_to_outlook.

* P_new is the check box parameter of the program “New work Items only”
* P_tasks is the parameter of the program “Task” If you don’t fill with anything it
will take as a blank. Etc.
DATA: li_seltab TYPE TABLE OF rsparams,
lx_seltab LIKE LINE OF li_seltab.

lx_seltab-selname = 'P_NEW'.
lx_seltab-sign = 'I'.
lx_seltab-option = 'EQ'.
lx_seltab-low = 'X'.
APPEND lx_seltab TO li_seltab.

lx_seltab-selname = 'P_TASKS'.
lx_seltab-sign = 'I'.
lx_seltab-option = 'EQ'.
lx_seltab-low = 'TS90500147'.
APPEND lx_seltab TO li_seltab.

lx_seltab-selname = 'P_TASKS'.
lx_seltab-sign = 'I'.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 3
How to Get Work Items from Workflow in your Outlook Inbox

lx_seltab-option = 'EQ'.
lx_seltab-low = 'TS90500150'.
APPEND lx_seltab TO li_seltab.

lx_seltab-selname = 'P_TASKS'.
lx_seltab-sign = 'I'.
lx_seltab-option = 'EQ'.
lx_seltab-low = 'TS24500068'.
APPEND lx_seltab TO li_seltab.

lx_seltab-selname = 'P_TASKS'.
lx_seltab-sign = 'I'.
lx_seltab-option = 'EQ'.
lx_seltab-low = 'TS00008323'.
APPEND lx_seltab TO li_seltab.

lx_seltab-selname = 'P_TASKS'.
lx_seltab-sign = 'I'.
lx_seltab-option = 'EQ'.
lx_seltab-low = 'TS00008321'.
APPEND lx_seltab TO li_seltab.

lx_seltab-selname = 'X_14ALL'.
lx_seltab-sign = 'I'.
lx_seltab-option = 'EQ'.
lx_seltab-low = ' '.
APPEND lx_seltab TO li_seltab.

lx_seltab-selname = 'X_N14ALL'.
lx_seltab-sign = 'I'.
lx_seltab-option = 'EQ'.
lx_seltab-low = '1'.
APPEND lx_seltab TO li_seltab.

lx_seltab-selname = 'X_SC_EXE'.
lx_seltab-sign = 'I'.
lx_seltab-option = 'EQ'.
lx_seltab-low = 'X'.
APPEND lx_seltab TO li_seltab.

* Submit program with the table parameter.


SUBMIT rswuwfml2 WITH SELECTION-TABLE li_seltab.
</body>

Schedule it on the background.


Create a job & schedule it in specific interval. Within that interval whatever work item will be created for the
specific task it will be sent to outlook inbox.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 4
How to Get Work Items from Workflow in your Outlook Inbox

Unit Test of quality Notification


Create Notification of Type ‘A2’.
Go to Qm01:  Enter the Material & Plant.

Now Enter Partner details:

Now save it:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 5
How to Get Work Items from Workflow in your Outlook Inbox

If you want to see the mail you can check by using SOST:

In the outlook inbox the work item will come like below:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 6
How to Get Work Items from Workflow in your Outlook Inbox

Execute the Work Item from your Outlook Inbox.


Double click in the work item attachment.

Give user name and password.


It will directly take you to the required work item. Suppose, work item is for displaying quality notification.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 7
How to Get Work Items from Workflow in your Outlook Inbox

Related Content
Can we send work item to external mails like yahoo or Gmail?
See the Blog
For more information, visit the ABAP homepage

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 8
How to Get Work Items from Workflow in your Outlook Inbox

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 9

You might also like