You are on page 1of 201

SAP® Business Workflow Tutorial

Developing a simple application using steps "User Decision" and "Mail"


By Suresh Kumar Parvathaneni

Basic terminology used in the workflow:

The workflow definition is the set of rules that determine the path that the process takes. For example,
how a purchase requisition is processed, from the initial request to the creation of the purchase order

A Workflow Instance, which is often simply referred to as the workflow, is a single workflow run. For
example, the processing of a single purchase requisition for computers.

The Tasks are the steps in the process, which have to be performed either by people or automatically by the
software. For example, to check for the availability of the spare computers in the company.

A Work item is the task instance that is performed as a single workflow step. For example, check that
there are no spare computers available in the company.

Agents are the people who process the tasks (via the work items). For example, requisitioner and a member
of the purchasing department.

Container is the place where all the data used in the workflow is collected.

Binding is the set of rules that define which data is passed to which part of the process.

Building a simple workflow application


The central tool for creating, displaying and processing a workflow is the workflow builder (Transaction SWDD). Within the
workflow builder you can create all components of a workflow, including all the containers you need for getting the data
from one step to another.

Generally, most of the workflows are started by an event (for example, when a material is created or when
a new purchase requisition arrives). You define which data from this event needs to be passed to the
workflow via binding.

However you can also start any workflow directly. Let us create a simple workflow and start the workflow
directly, using the testing tools.

Call transaction SWDD. When the workflow builder is called for the first time, a newly created initial workflow
definition appears or else last created workflow appears. In such cases you can opt to create a new workflow by
pressing “Create New Workflow”(ctrl + shft + F5). The following screen appears.
The initial workflow screen has the following parts:

a. The start of the workflow definition, indicated by .

b. The end of the workflow definition, indicated by .

c. The area in which you insert the new workflow definition is indicated by .

Now select the undefined step and select Create step or double click the undefined step. Now among the
different steps chose the User Decision by double clicking on it.
Contd..

SAP® Business Workflow Tutorial


Developing a simple application using steps "User Decision" and "Mail"
Previous

Now enter the title for the user decision “ Please make a decision”. Also enter the decision texts as Approve and
Reject. On pressing enter, the outcome values default to the Decision texts but you can specify your own names, if
desired. Now we need to select the agent. Agent is the person to whom the work item needs to be sent.. Since this is
just a beginning, we would hardcode the user name. Select the User from the drop down list and enter the user name
to whom the work item needs to be sent. In general, this type of agent assignment is not done. Agents are generally
assigned using the expression, agent assignment rule or organization object (job, position etc.).
Now select Transfer and to graphic button. Following screen appears:
Now we need to include a mail step to be sent to the requestor. Now select the line “Approve” and do a right click.
Different options on shown on the context menu. Select Create.

Now select the step “Send Mail” from the list.


Contd..

Developing a simple application using steps "User Decision" and "Mail"


...Previous

Now enter the subject and the body of the message for the mail to be sent.

Do not change the recipients. Our mail is intended for the persons who triggered this workflow.
&_WF_INITIATOR& contains the value who executed the workflow. Since this is a test object, we are using
&_WF_INITIATOR&. But we wouldn’t be using this variable in real time scenarios. We would discuss about this
in the coming documents.

Now select Transfer and to graphic button.

A popup appears requesting for the abbreviation and the name for this task. Enter the same and press enter.
Now enter the package as local object and press enter.

Follow the steps 5 through 9 for the step “Reject”. The following screen appears:

Press SAVE to save the workflow application. You need to enter an abbreviation and name for your workflow as
shown below. You can change any of these at any later point. After saving, a number is assigned to your
workflow starting with WS, as shown below.

Contd..

Developing a simple application using steps "User Decision" and "Mail"


...Previous

To execute the workflow, activate it by choosing the activate button.

Test the workflow by choosing Test. The following screen appears.

Now choose Execute to start the workflow.

Now the recipient would receive a work item in his SAP® inbox (Transaction SBWP).
Now execute the work item by pressing “Execute”. The following screen appears:

Choose one among Approve or Reject as part of the user decision. He can select the third option to retain the
work item in his inbox and make the decision later. Now suppose that the recipient has chosen one of the first
options. Now a mail would be sent to the requestor with the status of his request.
Including custom text in the step "User Decision"
Whenever we create a step “User Decision” (For creation of User Decision step, click here) and provide
with our own options like approve or reject, the work item would appear as follows:

As marked in green in the above screenshot, the description available in the work item is a default one
provided by SAP. In case we need to add our own text, do the following:

1. Identify the task being used in the step “User Decision”.

In the step “User Decision”, click on the tab “Control”:


In the tab “Control”, the standard task that is being used is displayed. In this case, the standard task that
is being used is “TS00008267”.

2. Go to transaction PFTC_COP to copy the standard task. Select “Standard task” in the task type and
enter the task number (without the prefix “TS”) in the “Task”.

Click on “Copy task”.


3. Enter the abbreviation and the name as required.

Click on “Copy Task”.

4. Enter the package name as required.

5. A new task would be created. Please note the task number that is created now.

6. To change the task description, you can use the transaction PFTC.

7. Now go back to workflow definition, transaction SWDD.

8. Click on “User decision” and then click on the tab “Control”.

9. Here replace the standard task number with the custom task created above.

10. Do the agent assignment and generate the same.

It is always advisable not to change any of the standard texts. The change would reflect in all the workflow
definitions the task is being used.

Creating a Container element


By Suresh Kumar Parvathaneni

This document details about creation of a container element in workflow and using it in the step "Mail".

Pre-requisites:

It is assumed that the reader of this Tutorial is aware of creating a workflow definition with the step “Mail”. If not, please go
through the document on creating the same available, by clicking here.

Steps:

1. Create a workflow definition using the transaction SWDD.


2. Let’s create a container element for Carrier id. Click on the “Workflow Container” on the left side of
the screen (as shown in the screenshot below):

3. Now double-click on “Double-Click to Create”


4. Enter the details pertaining to CARRID here.

5. Click on tab “Properties” and select “Import”.


6. Click on “Confirm (Enter)”.

7. Now the element created could be seen on the left side, below the “Workflow Container”.

Contd..

Creating a Container element


Previous

1. Create a “Mail” step by double-clicking on “Undefined” step in the workflow.


2. Enter the recipient details in the “Recipients” box.

3. In the subject line, enter “Carrid value entered is:” and click on “Insert Expression”.

4. Select the element “Carrid” from the list.


5. Similarly enter the content in the “Body” area.

6. Save and activate the application.

Testing the Workflow application:

7. Test the workflow by clicking F8.


8. Enter the value of the Carrid as shown above and press execute.

9. A mail would be sent to the recipient mentioned earlier with the carrid value entered.

Condition Step
By Suresh Kumar Parvathaneni

Agenda:

This document details about the steps “Condition”.

Pre-requisites: It is assumed that the reader of this document has a preliminary understanding of workflow
and has worked with the container elements earlier. If not, please go through the first two Tutorials of
workflow available in this site. (More details)

Procedure:

1. Create a new workflow definition.

2. Create a container element, CARRID (as demonstrated in tutorial 2).

3. Now click on undefined step and create the step “Condition”.


4. Enter the step name of your choice.

5. We would have the following condition here:

If carrid = ‘AA’.

Do this.

Else.

Do this.

Click on “Click here to create a new condition”. Following screen appears.


Double click on “Carrid”. Next click on “=” and enter the value “AA” in the constant field and press
ENTER.
Enter the outcome names of your choice as shown above.

Click on “Transfer and go to graphic”.


As shown above, there are two branches here. One navigates to true, if CARRID = ‘AA’ else the
control takes the branch “False”.

Test the above scenario by inserting mail steps in the above 2 branches and by passing different
CARRID values.

Condition Step
By Suresh Kumar Parvathaneni

Agenda:

This document details about the steps “Multiple Condition”.

Pre-requisites: It is assumed that the reader of this document has a preliminary understanding of workflow
and has worked with the container elements earlier. If not, please go through the first two Tutorials of
workflow available in this site. (More details)

Procedure:

1. Create a new workflow definition.

2. Create a container element, CARRID (as demonstrated in tutorial 2).

3. Now click on undefined step and create the step “Multiple Condition”.
4. Enter the step name of your choice.

5. We would have the following condition here:

If carrid = ‘AA’.

Do this.

Elseif carrid = ‘AH’

DO this.

Elseif carrid = ‘SQ’

Do this.

Else.

Do this.

Select the “CARRID” using the F4 help for the comparison basis field.

Enter the values of the carrid under the Comparison values with the corresponding outcome name (of
your choice)
Double click on “Carrid”. Next click on “=” and enter the value “AA” in the constant field and press
ENTER.

Click on “Transfer and go to graphic”.

As observed above, there are different branches for each value of CARRID mentioned above.
Test the above scenario by inserting mail steps in all the branches and by passing different CARRID
values.

Using "Container Operation" step

By Suresh Kumar Parvathaneni

Agenda: Usage of step “Container Operation”.

Pre-requisites: It is assumed that the reader of this tutorial has worked in the concepts that are dealt in
earlier tutorials. (click here for more details)

Scenario: In this tutorial, we would deal about how to work with the step “Container Operation” with an
example of calculating the available seats by subtracting occupied seats from the maximum seats at the
workflow level.

Procedure:

1. Create a new workflow definition using the transaction SWDD.

2. Create two container elements MaxSeats, Occ_Seats with the “import” property set. You can use the
reference fields sflight-seatsmax, sflight-seatsocc for this.
3. Create another container element AvailableSeats without setting either import or export property as this
is calculated within the workflow and used within the workflow. You might use any of the above
reference fields as data types.

4. Define a new step “Container Operation” in the workflow definition by double-clicking on the
“Undefined step”.
5. In this step, we would calculate the available seats from the max seats and seats occupied.

I would recommend entering all the container elements from the F4 help instead of typing them
manually.

6. Return to the main screen.

7. Create a mail step after this to send the available seats information.
8. Test the above functionality by passing some values to the maximum and the seats occupied.

9. Result would be as follows:

Triggering Events Programmatically


By Suresh Kumar Parvathaneni

Purpose: This document details the procedure in triggering the business object events programmatically.

Pre-requisites: It is assumed that the reader of this document is aware of the business object concepts and
good in ABAP.

Procedure:

In this document, we would take an example of the business object BUS1001006 (Material) and the event
CREATED. In general, this event is triggered whenever a material is created using a standard procedure
like MM01 or any others. Now we would trigger this event from our own programs.

Following are the screenshots of the business object BUS1001006 and the event CREATED. Go to
transaction SWO1 for more information of the business object.
Double-clicking on the key field parameter gives you technical information of the field.

In order to trigger an event programmatically, we would use the function module


SWE_EVENT_CREATE.

Following is the sample code to trigger the events programmatically:

REPORT ZDEMO_TRIGGER_EVENT.

DATA: KEY LIKE SWEINSTCOU-OBJKEY.

KEY = '1163'. “ Material Number (hard-coded)

CALL FUNCTION 'SWE_EVENT_CREATE'


EXPORTING
objtype = 'BUS1001006'
objkey = KEY
event = 'CREATED'
* CREATOR = ' '
* TAKE_WORKITEM_REQUESTER = ' '
* START_WITH_DELAY = ' '
* START_RECFB_SYNCHRON = ' '
* NO_COMMIT_FOR_QUEUE = ' '
* DEBUG_FLAG = ' '
* NO_LOGGING = ' '
* IDENT =
* IMPORTING
* EVENT_ID =
* TABLES
* EVENT_CONTAINER =
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
WRITE 'Event Triggered'.
ENDIF.

COMMIT WORK.

In order to test whether the event is getting triggered or not, we can make use of Event Trace. Switch on the
event trace using the transaction SWELS.

Press ‘Switch On”.

Now execute the program developed earlier. Now switch-off the event trace using the same transaction
SWELS.

Now go to transaction SWEL. Here you can list out the events triggered in the particular period of time.
Here is the event-trace list:
Deadline Monitoring in SAP Workflow

By Suresh Kumar Parvathaneni

A major advantage of workflow is the ability to monitor the workflow steps according to a predefined
schedule. Following are different deadlines that can be monitored against each workflow step:

 Requested Start

 Latest Start

 Requested End

 Latest End

In this example, we will define a deadline to the User Decision example created earlier (click here).
Following is the screenshot of the application developed using the User Decision example:
We would extend this example to the deadline monitoring.

In the User Decision step, click on the “latest end” tab.

By default, No deadline monitoring is active (as seen in the above screenshot).

Choose the “Work Item Creation” from the list box.


After selecting “Work Item Creation”, chose an offset of 5 minutes. This means that the work item must be
executed within 5 minutes of the creation, if not this would trigger.

Contd..

Deadline Monitoring in SAP Workflow

...Continued

Enter recipient details to whom the message to be escalated, if the work item is not executed with in 5
minutes after work item creation.
Save and activate the workflow definition.

Testing the workflow application:

 Execute your workflow.


 Check for the work item in the SAP Inbox. This time do NOT execute the work item.
 Wait for the deadline to be triggered. After that, a deadline message is delivered to the recipient mentioned in the
“Latest End” tab. See the screenshot below.

Don’t worry if the deadline message doesn’t appear immediately after 5 minutes. This depends on various
factors including how the deadline monitoring program is scheduled and also on the availability of the
background processors.

Use SWWA to check how the deadline monitoring program is scheduled in program.
For example, assume that our work item has been created at 09:10 hrs and the deadline message is
expected to trigger at 09:15 hrs. From the above screenshot, it is understood that the background program is
scheduled to execute for every 3 minutes. Assume that the last run of the program is at 09:14hrs and the
next run is expected at 09:17hrs. So even our deadline expires at 09:15, the deadline message would appear
only at 09:17hrs after execution of the background program.

Some more points

In our above example, we have used the deadline on the “Work Item” creation time. i.e., 5 minutes after
creation time, the deadline message would be sent. Now we would check the other option “Expression”.
Here we can mention the date and time, when the deadline message should appear irrespective of the work
item creation date/time.

As seen in the above screenshot, we can provide the target date and time by which the task should be
finished. Container elements could be used in this case. Please refer to our example on creation of container
elements (click here).

Creating a Container element


By Suresh Kumar Parvathaneni

This document details about creation of a container element in workflow and using it in the step "Mail".

Pre-requisites:

It is assumed that the reader of this Tutorial is aware of creating a workflow definition with the step “Mail”. If not, please go
through the document on creating the same available, by clicking here.

Steps:

1. Create a workflow definition using the transaction SWDD.


2. Let’s create a container element for Carrier id. Click on the “Workflow Container” on the left side of
the screen (as shown in the screenshot below):

3. Now double-click on “Double-Click to Create”


4. Enter the details pertaining to CARRID here.

5. Click on tab “Properties” and select “Import”.


6. Click on “Confirm (Enter)”.

7. Now the element created could be seen on the left side, below the “Workflow Container”.

Contd..

Creating a Container element


Previous

1. Create a “Mail” step by double-clicking on “Undefined” step in the workflow.


2. Enter the recipient details in the “Recipients” box.

3. In the subject line, enter “Carrid value entered is:” and click on “Insert Expression”.

4. Select the element “Carrid” from the list.


5. Similarly enter the content in the “Body” area.

6. Save and activate the application.

Testing the Workflow application:

7. Test the workflow by clicking F8.


8. Enter the value of the Carrid as shown above and press execute.

9. A mail would be sent to the recipient mentioned earlier with the carrid value entered.

Personal Substitute in Workflow

By Suresh Kumar Parvathaneni

Requirement: Need to have at least one substitute who can act upon work items in your absence.

Important: The appointed substitute would be able to see all your work items. A substitute cannot be
assigned for only particular area of organization or any other item. So need to ensure that the substitute
have the necessary authorizations to act upon the work items.

Procedure:

1. Go to SAP Business Work Place (TCode: SBWP)

2. Now from the menu bar, select Settings à Workflow settings à Maintain Substitute
3. Highlight/Select the name on the window, in this case SAPDEV02 and click on “Create
Substitute”.

4. List of users available in the system are displayed.


5. Select the required substitute user name. Following screen appears.

Validity field describes about the period in which the setting would be active. Note that the dates on the
screen would range from the current date to 31st Dec 9999.

Regarding the checkbox “Substitution active”, it is advised to leave this checkbox unchecked for
system performance reasons. A check in this box indicates that the substitution is “permanent” and if
left unchecked it is treated as “as-needed”. A permanent substitute will automatically receive the
primary users work items in their own box. In the case of “as-needed”, substitute must manually adopt
the work items from the primary user’s inbox.

6. Save the entries


7. Click Enter to leave the screen.

For information on how to adopt a substitution, click here.

Adopting a Substitute in Workflow

By Suresh Kumar Parvathaneni

If you have been designated as an “as-needed” substitute, you must manually adopt the substitution. If you
are designated as a “permanent” substitute, the work items would automatically appear in the inbox.

Before adopting a substitution, there are 19 work items in the inbox. See the screenshot below:
To adopt a substitution, select Settings à Workflow settings à adopt substitution.

Select the corresponding User-id (if you have been assigned as a substitute for multiple people, then this
option would allow you to select the user name of whom you would to check the work items)
The corresponding user’s work items would appear in our inbox now.

You can end the substitution, by selecting settings à Workflow settings à End substitution.

Note: Substitutes can only adopt work items that are directly routed to the person for whom they are a
substitute. If you are a substitute for a user (SAPDEV02) who has been made a substitute for another user
(SAPDEV01), you will only see work items for user SAPDEV02 and not of the user SAPDEV01.
Notification of Work Items via e-Mail

By Suresh Kumar Parvathaneni

SAP provides us with a facility of notifying the user via the email address of your choice when there are
any pending work items in the SAP Inbox..

1. Go to Transaction SO13.

2. Click on Automatic Forwarding tab.


3. Click on Create icon .

4. Enter the details in the above screen.


5. Click ENTER to complete the entries.

6. Now the notification would be received at the provided email address if there are any pending work
items in the inbox.

Filtering the Work Items in the SAP Inbox using BADI

This document details about the procedure in filtering some of the work items from the SAP inbox using a
BADi.

Following is the screenshot of the SAP inbox, before implementing BADi:


The BADi that is used in filtering the work items is WF_BWP_SELECT_FILTER. To implement the
BADi, go to transaction SE18. From the menu, select Implementation à Create. (See the screenshot
below)

Enter the implementation name and press ENTER

Enter any meaningful short text for the implementation and click on the tab “Interface”
The implementing class, ZCL_IM_BWP_SELECT_FILTER, is automatically proposed. Double click on
the implementing class name.

You are now navigated to the class builder. Now double-click on the method name shown on the screen
(see the snapshot below)
Now let us filter out the work items belonging to the task TS2000066. See the code below:

Activate the method and also the implementation. In the state of active, you wouldn’t be able to make any
changes. To make any changes, we need to deactivate it and then make the changes.

Now check the inbox and would notice that the work items related to that task are no more appearing.
To notice the differences, try activating and deactivating the BADi implementation.

Inserting the logo in the Work item preview

To upload the logo:

1. Go to transaction SMW0

2. Select “Binary data for Web RFC applications”.


3. Execute the transaction (No need to fill any values on the selection screen)

4. Click on “Create”. The following screen appears. Enter the “Obj. Name” and “Descriotion”.

5. Click on “import”. Select your company logo.


6. Your entry is now available in the table control on the screen.

Embedding this logo in the Work item preview

1. Create a workflow definition with a simple step “User decision”.

2. Now in the step “User decision”, go to tab “Work item display”.

3. Click on “Demo Function Modules”.

The function modules shown above need to be used as a template for defining the logo as per the
requirement. Using the function module “SWL0_PREVIEW_DEMO_GIF_ONLY”, we can only display
the logo of the company. Using “SWL0_PREVIEW_DEMO_TEXT_AND_GIF”, we can display both logo
and our own text below the logo. The FM “SWL0_PREVIEW_DEMO_TEXT_ONLY” is used to display
custom text only. For our demo purpose, we would use the FM
“SWL0_PREVIEW_DEMO_TEXT_AND_GIF”.

Continued....

Inserting the logo in the Work item preview


Previous

5. Copy the function module “SWL0_PREVIEW_DEMO_TEXT_AND_GIF” to a ‘Z’ function module.

6. Now change value of “e_info-gif-id” to the object-id created in “SMW0” (Logo id) and “e_info-
dialogtext” to the custom text we require.

Save and activate the function module.


7. Now in the workflow builder and in the tab “Work item display”, mention the name of the ‘Z’ function
module created earlier.

8. Execute your workflow definition. In your SAP inbox, you can see the logo and the custom text in the
preview pane of the work item.

Triggering Events Programmatically


By Suresh Kumar Parvathaneni

Purpose: This document details the procedure in triggering the business object events programmatically.

Pre-requisites: It is assumed that the reader of this document is aware of the business object concepts and
good in ABAP.

Procedure:

In this document, we would take an example of the business object BUS1001006 (Material) and the event
CREATED. In general, this event is triggered whenever a material is created using a standard procedure
like MM01 or any others. Now we would trigger this event from our own programs.

Following are the screenshots of the business object BUS1001006 and the event CREATED. Go to
transaction SWO1 for more information of the business object.
Double-clicking on the key field parameter gives you technical information of the field.

In order to trigger an event programmatically, we would use the function module


SWE_EVENT_CREATE.

Following is the sample code to trigger the events programmatically:

REPORT ZDEMO_TRIGGER_EVENT.

DATA: KEY LIKE SWEINSTCOU-OBJKEY.

KEY = '1163'. “ Material Number (hard-coded)

CALL FUNCTION 'SWE_EVENT_CREATE'


EXPORTING
objtype = 'BUS1001006'
objkey = KEY
event = 'CREATED'
* CREATOR = ' '
* TAKE_WORKITEM_REQUESTER = ' '
* START_WITH_DELAY = ' '
* START_RECFB_SYNCHRON = ' '
* NO_COMMIT_FOR_QUEUE = ' '
* DEBUG_FLAG = ' '
* NO_LOGGING = ' '
* IDENT =
* IMPORTING
* EVENT_ID =
* TABLES
* EVENT_CONTAINER =
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
WRITE 'Event Triggered'.
ENDIF.

COMMIT WORK.

In order to test whether the event is getting triggered or not, we can make use of Event Trace. Switch on the
event trace using the transaction SWELS.

Press ‘Switch On”.

Now execute the program developed earlier. Now switch-off the event trace using the same transaction
SWELS.

Now go to transaction SWEL. Here you can list out the events triggered in the particular period of time.
Here is the event-trace list:
Sending recursive mails upon reaching the deadline until the task is
completed
Recently, we encountered a scenario where-in we need to send recursive mails for every xx hours, when the deadline is
reached, until the task is completed. I am presenting the same here, with a simple example, hoping that this would be
useful to you all.

Start a new workflow and define a "User Decision" step. For steps on how to define a User Decision step, click here.

In the step "User Decision", switch to tab "Latest End" and provide the details as shown below:
In the action, select "Modeled" from the list. Enter the name of the outcome.

Click on "Transfer and to Graphic" (Green tick button).


You can notice that there are 3 branches now. Two belong to the User Decision Step (YES/NO) and the other one is of
Modeled deadline. So whenever a deadline is reached, this branch executes. When the user completes his task, it would
either take YES or NO branch accordingly.

Now assume that we need to send repetitive mails to the agent for every 3 minutes, until he completes the task (in this
case, acting on User Decision step).

Double-click on "Undefined step" in the "Modeled" branch and select LOOP(Until)


Using "Loop (Until)", we would be sending emails repetitively for every 3 minutes. To keep the loop open continuously, lets
define a condition which would never be met.

Enter a step name and then click on "Click here to create a new condition".

Since we intend to make this Loop indefinite, create a condition similar to the following one.

Now go back to the main screen.


The above screenshot is of the step "Loop (Until)". Now double-click on the "Undefined" step above and create an email
step.

Enter the recipient name and other details as shown above.

....To continue click here

Sending recursive mails upon reaching the deadline until the task is
completed
...Previous
Now we need to send mails once every three mails until the task is finished. To achieve this, we would need to create a
business object (or use an existing one) and create a dummy method (with no code in it). Ensure that the check box
"dialog" is unchecked in the properties of this method.

Now create a step "Activity" by double-clicking on undefined step after the email step in the Modeled branch.

Click on "Create new task"

Provide the details as shown below:


Don't forget to check the checkbox "Background processing".

SAVE and click on Back button.

In the activity step, switch to "Requested start" tab and provide details as shown below:

Using the above step, we are restricting the LOOP to send mails for every 3 minutes only.

Save and activate your workflow.

Test run the workflow. Do NOT execute the work item and wait for the alert mails.

Work item in inbox:


Work item along with the alert mails (after the deadline is reached):

Ad Hoc agent assignment in Workflow


By Sathis Kumar R, Quintegra Solutions

This Article is about the Adhoc Agent Assignment for workflow. The workflow initiator assigns a recipient to the steps
in the workflow at runtime.

Scenario:

Assigning Adhoc Agent for the task " create the leave form".

Step by step:

Create the new workflow named as "wf_4adhoc "


Drag and drop the activity from the step type.

Now create a new task for leave form.

In that give your own abbreviation and name for the task.
Object Category : BOR Object

Object Type : FORMABSENC.

Method : CREATE.

Now save the task and go back .Now the binding between the task and the workflow was shown like.
Click ok (Tick mark) button.

Now the task complete option was active.


You don't fill any agent for this task. You leave it as empty as shown in the figure.

Now we move to the Task properties. Click the agent assignment icon.

Click here to continue...

Ad Hoc agent assignment in Workflow


....Previous

Now choose the task and click the attributes button.


Choose the General Task and click the Transfer button.

You go back to the workflow builder now the Agent Assignment was active.
Click the Ok button.

Now Go to the Extras -> Ad_hoc functions -> Enable the Adhoc Agent Assignment.

Now the enable the Adhoc Agent Assignment Wizard will be opened.
Click the Continue Button.

Now it shows your Task Number and Name and check whether the "insert the workflow constructor and
workflow destructor" will be selected or not. If not means now you select that option.
Click the Continue Button.

Click here to continue...

Ad Hoc agent assignment in Workflow


....Previous

Now the wizard was completed click the Complete Button.

You check the task it will automatically filled the agent name as: &Agent_0001.Agents&

Now you can Save the Workflow and activate it.

Execute the Workflow.

Now its looks like the following figure.


You click the Ad_hoc Agent tab.
You enter the name of the user who wants to do this task . In my Example I entered Developer2. And then
click the Check Agent Button. It automatically creates the random key for that user and it will be assigned
to the Agent_001.

Now again click the execute Button.


Now the Leave Form will be waiting for the user to fill.
Triggering workflow to send an email whenever a material is created
By Sathis Kumar R, Quintegra Solutions

This article is about triggering the workflow whenever a material is created using MM01.

Scenario:

Whenever a material is created in the MM01 then the workflow triggers a mail to the responsible
person with the material information.

Step by Step:

Create a New Workflow definition named as "wf_4materialcreate".


Go to the Workflow Container and Create new Container Element.
Now fill the Following.

Element : Material_Object.

Name : Material_Object_Name.

Short Description : Container Element For Material Object

Object Type : BOR Object Type.

BUS1001006.
Now the element is shown in the Workflow Container as follows:

Now Click the Basic Data and then click the Start Events tab.
Click here to continue...

Triggering workflow to send an email whenever a material is created


....Previous

Now fill the following

Category : BO

Object Type : BUS1001006

Event Of The Object : Created.


Now Click the Binding Icon.

Now create a binding as shown below:

&_EVT_OBJECT& ----------- &Material_object&


Now Click the Active Button to Activate the Event.

Now the Workflow Builder looks like.


Click here to continue...

Triggering workflow to send an email whenever a material is created


....Previous

Drag and Drop the "Send Mail" step from the step type.
Now Click the Control tab and Create a New task for sending the mail.

Now Create the Task Container Element BUS1001006


Click the Work item text Expression Icon.

Now Choose the Material Number From the Material_Object

Object Type : SELFITEM


Method : SENDTASKDESCRIPTION.

Click the SAVE Button .


In the Recipients Tab you give the User-id to whom you want to send a mail about the material creation. In my
Example I used DEVELOPER1 as the Responsible Person.

Click here to continue...

Triggering workflow to send an email whenever a material is created


....Previous
Click the OK Button.

Now Workflow Definition would look Like

Save and Activate the Workflow.


Now go to the MM01 TCode for Creating the Material.

Click the Select Views.

Fill the Required Fields.


Now Click the Save Button.

It shows the Material Was Created.

Now a Mail is sent to the corresponding Person's Inbox with material information.
Defining Custom Rules for use in SAP Workflow
By Raghava Vakada, Mouri Tech Solutions

“I would like to explain about creating custom rules in SAP Workflow. The rules can be created or changed using the
standard SAP transaction PFAC. Once the rules are created you can call these rules in any workflow via the rule
container”.

In this article I am creating a rule, which will find the users based on Position id. I have created a custom function
module ZWF_FIND_USERS which will return me back a position under Asset Analyst (HRP1001-SOBID). The
custom function created should have the same interface as that of the SAP standard function module
RH_GET_ACTORS. The following table parameters have to exist in the custom function module.

“ACTOR_TAB STRUCTURE SWHACTOR”

“AC_CONTAINER STRUCTURE SWCONT”

Following is the function module code:

FUNCTION ZWF_FIND_USERS.
*"-----------------------------------------------------------
*"*"Local Interface:
*" TABLES
*" ACTOR_TAB STRUCTURE SWHACTOR
*" AC_CONTAINER STRUCTURE SWCONT
*" EXCEPTIONS
*" NOAGENT_FOUND
*"-----------------------------------------------------------
INCLUDE <CNTN01>.
DATA : POSITION_ID LIKE ZBUSAREA-OBJID,
LT_HOLDERS TYPE STANDARD TABLE OF SWHACTOR,
LWA_HOLDERS TYPE SWHACTOR,
LWA_USERS TYPE STANDARD TABLE OF HRP1001,
WA_USERS TYPE HRP1001,
NUM_LINES TYPE I.
*Read values assigned to the rule criteria
SWC_GET_ELEMENT AC_CONTAINER 'POSITION_ID' POSITION_ID.
SELECT * FROM HRP1001 INTO table LWA_USERS
WHERE OBJID = POSITION_ID.
IF NOT LWA_USERS IS INITIAL.
REFRESH LT_HOLDERS[].
loop at LWA_USERS into WA_USERS.
Condense WA_USERS-SOBID.
LWA_HOLDERS-OTYPE = 'US'.
LWA_HOLDERS-OBJID = WA_USERS-SOBID.
APPEND LWA_HOLDERS TO LT_HOLDERS.
APPEND LINES OF LT_HOLDERS TO ACTOR_TAB.
endloop.
ENDIF.
DESCRIBE TABLE ACTOR_TAB LINES NUM_LINES.
IF NUM_LINES IS INITIAL.
RAISE NOAGENT_FOUND.
ENDIF.
ENDFUNCTION.

Creating a rule using the PFAC Transaction

Assign the function module ZWF_FIND_USERS in the "Rule Definition Tab"


Go to the "Container Tab" and create a container element for the “Position id” which will be passed to the function
module

Our rule is created now. You can test the rule within the PFAC transaction by clicking the "Simulation" button on the
application toolbar. Now this rule is ready to be used in any workflow according to your requirement via the rule
container of the workflow.

Enter the Position Id, which is created in (PPOCW)


It displays Asset Analysts (users) in the “Rule resolution result”

Now you can use this rule in any of your workflow definitions.

Maintaining Translations for Work item texts and Outcome names


In this tutorial, we would look into a simple method of translating Work item texts and step names to the
desired language.

Let us open any existing workflow definition.


Check the same workflow definition by logging in German Language:

You can observe that the text remains in the English language, whereas “Workflow Started” is translated as
“Workflow gestartet” (As the SAP has already provided translation for this)

Now to translate the text to German, Click on Extras -> Translation -> Translation (As shown in the
screenshot below):
Following pop-up appears: Select German from the list box.

Now a screen with all the workflow steps and outcome names are displayed for maintaining the
translation.
For our testing purposes, let us maintain the German text for the first two step types.

Save and activate.

Now logon in German Language and check the workflow definition. You can observe that for the two step
types, the text is available in German.

Raising exceptions in a method and handling the same in the workflow


By Suresh Kumar Parvathaneni

This document details the procedure in defining exceptions in a method and using the same in a workflow.

Let us first look at raising exceptions in a method:


Go to Business Object Builder (Transaction SWO1).

Create a business object.

Now create a method.

Now select the method you have created and click on button “Exceptions” available on the toolbar.

Following screen appears:

Now click on Create. Following popup screen appears:


Enter the information as shown above. The error type “Temporary error” is chosen in the case wherein the record is
locked by somebody else or some required resource is not available. The error type “Application Error” is to be
chosen when there is no authorization for the document you are processing. The error type “System error” is to be
chosen if there are no values passed for the mandatory parameters.

Click on continue.

Go back to the main screen.

Now in the method, provide the following code:

Save the business object and release the same.


Try executing the method by clicking on Test/Execute (F8). The exception would be raised as shown below:

Capturing the exception raised by the method in the workflow:

Go to Workflow Builder (TCode: SWO1).

Create the step “Activity”

Create a task and provide the following details in the new task:
Save your entries and return to the previous screen.

Click on “Outcomes” tab. Here you can observe the exception you defined in your method:

As observed in the observe screen, the outcome is not active by default. If we do not handle the exception, the work
item might go into the error status. Activate the outcome:

Save your entries and go back to the main screen of Workflow builder. Please ensure that you have done the agent
assignment for this task.
You can now observe a new branch when the exception is raised. You can define your steps whenever the exception
is raised.

References:

http://help.sap.com/saphelp_nw04s/helpdata/en/c5/e4ad98453d11d189430000e829fbbd/frameset.htm

ALE - Error handling through workflow


By Abhijit Daptary & Siddharth Samal, Capgemini India

Pre-requisites.

It is assumed that the reader of this article has some knowledge in SAP workflow BOR objects and ALE Idoc process
like process code, Partner Profile etc.

Description

Here, we will be discussing in details the Error handling of an Inbound Idoc through triggering an event, which in turn
will be triggering a workflow attached to the workflow.

Steps:-

1. Create custom BOR object with the events, Start and Stop event
2. Create a workflow for the error handling, like generating a notification whenever an error occurred in the
Inbound Idoc.
3. Creation of Function Module and attachment with the Process Code
4. Create the settings for the Inbound Process of the Idoc through the Process Code.

Creation of BOR objects. Go to the transaction SWO1.


Enter a name for the Object type and click ‘CREATE’ button for creating the custom BOR object.

Enter the details required for creating the BOR objects...

Create the Key fields and events of the BOR object.

For creating the Key fields place the cursor on the Key fields and Click on the Create Button

Create events for triggering the workflow and stopping the workflow.

For creating the event place the cursor on the EVENTS and Click the create button like Key fields.
Create two events.

Enter the event name description etc and proceed further to create it.

Similarly create another event for ending the Workflow in the similar manner like that created earlier.

Now, Generate the BOR object through the generate button


Release the EVENTS and subsequently release the BOR object.

After the creation of BOR object

Create a workflow for the generation of notification whenever an error is reached in the Inbound Idoc.

Execute the transaction SWDD.

Click on the CREATE button for creating the workflow for error handling.

Choose the Step type to be inserted for the notification like here we are using Send Mail option for sending a mail to
the user whenever any error occurred.

To continue, click here

ALE - Error handling through workflow


...Previous

Activate the Workflow and test it whether it is working as per the requirement.

After the successful completion it is required to attach the workflow with the event.

Go to the Header section (Denoted by CAP).


Go to the Start Events TAB.

Enter the details of the event with which the workflow should be linked like the category, BOR object type and the
event with which that should be linked.

Enter here the BOR object that has been created and give the name of event created for starting the workflow.

Click on the Binding Button for generating the binding between the event and the workflow.
Generate the binding and click OK button to save the binding.

Click on Activate / deactivate button for activating the linkage.


After the successful linkage the following sign will appear on the workflow.....

This shows that the workflow has been linked to the event and it will be triggered whenever that particular event will
be triggered.

After the creation and successful linkage of workflow with the event it is required it is required to generate a function
module and attached it to the process code.

Go to SE37 transaction and copy a standard process code function module to a custom one. Do no delete any
parameters from the function module as the SAP standard program itself is calling this.

In that function module do the required validation and whenever the validation fails set a standard parameter
‘WORKFLOW_RESULT’ to 9999 from within the function module, otherwise normally proceed to set the status to 53.
After the creation of function module it is required to attach it to the process code and corresponding attached to the
message type at the Partner Profile stage.

To continue, click here

ALE - Error handling through workflow


...Previous

The process code is being created through the transaction WE42

Go to the change mode and click the New Entries button for creating new process code.
Enter the Process Code Name, description and choose the processing type as Processing by function module. Click
on the extension button of Identification.

The details for the of the Process Code after clicking the identification button will be
Whenever idoc arrives into the Destination system then the standard SAP triggers the Process code attached to the
Message type in the partner profile. The partner profile is being maintained in the transaction WE20.

Since, it is and inbound scenario so the message type and the corresponding process code will be maintained for the
Inbound Parameters.

Click on Create Inbound Parameters button for creating new Inbound Message type and the corresponding message
type.
Enter the process code for the corresponding message type.

Click SAVE button for saving the changes.

Whenever the IDOC arrives into the target system, it checks the partner profile and finds the corresponding process
code. The process code is being linked with the function module through which the IDOC is required to be
processed.
ABAP Classes in Workflow
By Anwesha Bhattacharya , Capgemini India

1. ABAP Classes and Business Workflow:

We can use ABAP classes in the definition and runtime components of SAP WebFlow Engine in the same
way as object types defined in the Business object Repository (BOR).

Before proceeding further we need to know where to create and maintain ABAP Classes and ABAP
Interfaces.

2. What is Class Builder and its purpose?

The Class Builder allows us to create and maintain global ABAP classes and interfaces. Both of these
object types, like global data types, are defined in the ABAP Repository, thus composing a central class
library. Together, they form a central class library and are visible throughout the system. We can display
existing classes and interfaces in the class library using the Class Browser.
We can define local classes as well as global classes. They are defined locally in programs, function groups
or as auxiliary classes of global classes of the class pools. Local classes are only visible within the defining
module.

ABAP classes are processed using the Class Builder.

3. How to reach Class Builder?

To reach the initial screen of the Class Builder, choose Development à Class Builder from the initial
screen of the ABAP Workbench or enter transaction code SE24.

4. How does it integrate?

The Class Builder allows us to create Web development objects within the ABAP Workbench. We can use
the Class Browser to display and maintain existing global object types from the class library.

The diagram below illustrates the architecture of the Class Builder and the relationships between its
components (including the Class Browser)
From here, we can either display the contents of the class library or edit a class using the Class Editor.
Once we have defined an object type, we can implement its methods. From the initial screen or the Class
Editor, we can also access the Class Builder’s test environment. We can define the object types
immediately after implementing the method in the ABAP Editor. It is also possible to access the test
environment from the initial screen or Class Editor.

5. How to use the Class Builder?

Use the Class Builder to:

 Display an overview (in the Class Browser) of global object types and their relationships.
 Maintain existing global classes or interfaces.
 Create new global classes and interfaces.
 Implement inheritance between global classes.
 Create compound interfaces.
 Create and specify the attributes, methods, and events of global classes and interfaces.
 Define internal types in classes.
 Implement methods.
 Redefine methods.
 Maintain local auxiliary classes.
 Test classes or interfaces in a simulated runtime environment.

6. What are the constraints?

We cannot define object types on the basis of graphical object modeling.

7. Note before creating global classes and interfaces:


Global classes and interfaces that we create in the Class Builder are stored in the class library and administered by the R/3
Repository: they therefore have the same namespace as all other Repository objects. It is therefore necessary to have
naming conventions for object types and their components and to use them uniformly within program development.

8. Naming Conventions in ABAP Objects:

The following naming convention has been conceived for use within the SAP namespace. If we do not
observe the naming conventions for object types (classes and interfaces), conflicts will occur when the
system creates persistent classes, since it will be unable to generate the necessary co-classes.

9. Conventions for Object Types:

Class in the class library CL_<class name>

Interfaces in the class library IF_<interface name>

Local classes in programs LCL_<class name>


(recommendation)

Local interfaces in programs LIF_<interface name>


(recommendation)

10. Conventions for Components:

Method name <method name>

Events <event name>

Local type definitions within a class TY_<type name>


(recommendation)

Data definitions (variables) <variable name>

Data definitions (constants) CO_<constant name>


(recommendation)

To Continue....Click here

ABAP Classes in Workflow


...Previous

11. Local Conventions within Methods:

For parameters:

IMPORTING parameters IM_<parameter name>

EXPORTING parameters EX_<parameter name>


CHANGING parameters CH_<parameter name>

RESULT RE_<result>

12. Using ABAP Classes in Workflow:

Within the SAP WebFlow Engine we can use ABAP classes that support the IF_WORKFLOW
interface. Classes that have implemented the IF_WORKFLOW interface are recognized as
workflow-enabled in the Class Builder.

13. How to create ABAP Classes that support IF_WORKFLOW interface?

 Go to transaction SE24 and create a customized class.

 Next the pop up appears where we need to mention the detail as follows:
 Save it and the class is created.
 Now the class is to implement IF_WORKFLOW interface. For this go to the tab and declare the
IF_WORKFLOW as the interface there and press Enter; two sub-interfaces appear: BI_OBJECT and
BI_PERSISTENT. Save the Class.

 The ZCL_TEST class now contains the existing methods of IF_WORKFLOW interface.

14. Lights on Key Attributes and Attributes:

The key attributes are used to define the object key. There can also be other defined attributes
other than key attributes. The SAP WebFlow Engine can access all public attributes of a class.

Key Attributes:

In the Class Builder there is an additional column Key Attributes on the tab page as
shown below:
We need to check this box when we are defining any attribute as the Key Attribute.

All key fields must be character-type fields (elementary types: CHAR, NUMC) and have a defined
length. The maximum length allowed for all key fields is 32 characters. The length of the key field
for the persistent display is 32 characters.

In the case of persistent ABAP objects we can use the GUID, which is generated automatically by
the object manager when an instance is created.

Attributes:

In addition to all the other data types that the Class Builder supports, we can also define
attributes with reference to an object from the Business Object Repository (BOR). To do this, we
have to use the structure SWOTOBJID as the data type. The BOR object is determined using the
corresponding value.

To assign a BOR object instance to an attribute we need to use the corresponding BOR macros.
Normally, this is implemented within the CONSTRUCTOR of a class.

To use the BOR macros in a class, two INCLUDES must be included.

  Include <CNTN03>……………contains the local types


  Include <CNTN02>……………contains the BOR macros
 An example to show how to define Attributes and Key
Attributes:

To Continue....Click here

ABAP Classes in Workflow


...Previous

15. Why IF_WORKFLOW Interface?

The IF_WORKFLOW interface is necessary when using an ABAP class within the SAP WebFlow Engine.
The interface contains methods that allow the object to be used within the SAP WebFlow Engine.

The SAP WebFlow Engine handles all objects generically. Objects have to be saved in the event of a
context change. Therefore, it is necessary to convert object references in such a way that they can be saved
persistently. Conversely, we have to be able to generate the corresponding instance of an ABAP class from
the persistently saved key.

There are also a number of SAP WebFlow Engine components, for example, the Workflow Log that can
display objects. In this case the object has to provide corresponding functions.

The IF_WORKFLOW interface puts a logical parenthesis round the BI_PERSISTENT (instance management)
and BI_OBJECT (object behavior) interfaces. The IF_WORKFLOW interface contains the following
methods:

 BI_PERSISTENT~FIND_BY_LPOR

 BI_PERSISTENT~LPOR

 BI_PERSISTENT~REFRESH

 BI_OBJECT~DEFAULT_ATTRIBUTE_VALUE

 BI_OBJECT~EXECUTE_DEFAULT_METHOD
 BI_OBJECT~RELEASE

A class that implements the IF_WORKFLOW interface can be used in any workflow. The class is
automatically released for use in workflows when the interface is implemented. Therefore, we can only
make compatible changes to a class after implementation (we cannot delete attributes, change types or
delete methods). There is no where-used list to show which workflows the class is used in.

Internal classes of an application should not implement the IF_WORKFLOW interface, since this could
mean that each method of the class is used in the workflow. Therefore, we should encapsulate the workflow
functions in another class that calls the selected methods of the internal class.

Each method of the IF_WORKFLOW Interface as mentioned earlier has its distinct functionality, which is
discussed below.

16. BI_PERSISTENT~FIND_BY_LPOR Method:

If we want to convert a persistent saved display of an object into an instance of the corresponding ABAP
class, SAP Webflow Engine calls the BI_PERSISTENT~FIND_BY_LPOR method.

Features:

The method parameter LPOR is the persistent object reference and is of SIBFLPOR structure type. A
reference of BI_PERSISTENT type is returned.

The following table shows the components of the SIBFLPOR structure:

Field Description
CATID Describes the object type ( CL for ABAP classes)
TYPEID ABAP class name
INSTID Object key. The key is limited to 32 characters.

We can implement this method in several ways. In the case of persistent classes we can create the ABAP
object instance using the generated classes. In the case of individual persistence management we have to
implement the individual actions (such as creating an instance, performing an existence check, entering
public attributes, and so on) manually within the class.

Instance management takes place automatically in the case of persistent classes. In the case of individual
persistence management we also have to carry out instance management by class. The SAP WebFlow
Engine does not provide any instance management. We must therefore implement our own instance
management in the case of individual persistence management.

The FIND_BY_LPOR method should always return the same instance if the following problems are to be
avoided:
 Inconsistency in the data display
 Instance data being overwritten by another instance
 Locking conflicts
There is an implementation example in the CL_SWF_FORMABSENC demo class.
17. BI_PERSISTENT~LPOR Method:

The BI_PERSISTENT~LPOR method is the counterpart to the BI_PERSISTENT~FIND_BY_LPOR


method. It provides the persistent display for an existing instance of an ABAP object.

Features:

The method returns the persistent display of an object reference as a SIBFLPOR type structure as described
earlier.

There is a close relationship between the BI_PERSISTENT~FIND_BY_LPOR method and the


BI_PERSISTENT~LPOR method. If we call the BI_PERSISTENT~FIND_BY_LPOR method first and
then the BI_PERSISTENT~LPOR method, the BI_PERSISTENT~LPOR method must return the same
value as was previously used to call the BI_PERSISTENT~FIND_BY_LPOR method.

There are also several ways of implementing this method in this case. There is an implementation example
in the CL_SWF_FORMABSENC demo class.
18. BI_PERSISTENT~REFRESH Method:

SAP WebFlow Engine calls the BI_PERSISTENT~REFRESH method when the system has to ensure that
all values of an object are valid or that they agree exactly with the persistent display of the object.

Features:

The method implementation depends on the internal organization of the class. We can check the object
instance data in the database, if necessary.

If we do not need the method in our class, then we need only to carry out a “dummy” implementation
(without further coding) to avoid program errors when the system calls the method.

There is an implementation example in the CL_SWF_FORMABSENC demo class.

To Continue....Click here

ABAP Classes in Workflow


...Previous
19. BI_OBJECT~DEFAULT_ATTRIBUTE_VALUE Method:

The BI_OBJECT~DEFAULT_ATTRIBUTE_VALUE method returns the display name of the


object.

Features:

We can display references to process objects or process step objects at different positions within
the SAP WebFlow Engine (for example, in Business Workplace and in Workflow Log). The object
key is normally displayed here. If, for example, we want to display a descriptive text instead, the
BI_OBJECT~DEFAULT_ATTRIBUTE_VALUE method has to return the corresponding value.

If the method does not contain implementation or does not return a value, the object key is
displayed.

If we do not need the method in our class, then we need only to carry out a “dummy”
implementation (without further coding) to avoid program errors when the system calls the
method.

There is an implementation example in the CL_SWF_FORMABSENC demo class.

20. BI_OBJECT~EXECUTE_DEFAULT_METHOD Method:

The BI_OBJECT~EXECUTE_DEFAULT_METHOD method is the standard method for the object.


This method is executed when, for example, we call the object in Business Workplace.

Features:

We can display process objects or process step objects at different positions within the SAP
WebFlow Engine (for example, in Business Workplace and in Workflow Log). The SAP WebFlow
Engine calls the BI_OBJECT~EXECUTE_DEFAULT_METHOD method.

If we do not need the method in our class, then we need only to carry out a “dummy”
implementation (without further coding) to avoid program errors when the system calls the
method.

There is an implementation example in the CL_SWF_FORMABSENC demo class.


21. BI_OBJECT~RELEASE Method:

The system indicates that the reference to the instance is no longer needed by using the
BI_OBJECT~RELEASE method. This means we can delete the reference from instance
management. Once the last reference has been deleted from instance management, the
GARBAGE COLLECTOR can release the corresponding memory area.

Features:

If we do not need the method in our class, then we need only to carry out a “dummy”
implementation (without further coding) to avoid program errors when the system calls the
method.

There is an implementation example in the CL_SWF_FORMABSENC demo class.

22. How to use ABAP Classes in Process Steps of Business Workflow?

In process steps we can use methods and attributes of ABAP classes in the same way as
methods and attributes of Business Object Repository (BOR) objects. We can call these methods
in the process context.
Features:

While using the ABAP Classes in the Process Steps the methods may contain dialogs, they can
be synchronous or asynchronous; they may appear in the workflow log, and so on.

In general, we can use any method that is implemented as a public method. The method can be
implemented in the class itself, in one of the super classes of the class, or by way of an interface.

The maximum permitted length for methods that are implemented by way of an interface, for
example IF_WORKFLOW~FIND_BY_LPOR, is 30 characters. If the method name is too long, we
can choose a shorter name for the method by defining an alias. If the method is implemented in
the class or in a super class, the name of the method cannot be longer than 30 characters, so this
limitation does not apply.

Parameters:

We can assign values from the workflow container to the method parameters. Conversely, export
parameters can be entered as workflow container values. The following overview shows how the
individual types can be used as parameters:

 Simple types (string, integer, and so on)

 Data Dictionary types (structures, tables, complex types)

 References to objects from the Business Object Repository

 References to ABAP classes (supporting the IF_WORKFLOW interface)

We can transfer method parameters that represent a persistent object (IF_WORKFLOW or BOR
Object) in the following ways:

 ABAP classes (with IF_WORKFLOW interface)

 TYPE SIBFLPORB

Object is transferred using the persistent display

 TYPE REF TO <Class name>

Object is transferred as object reference

 BOR objects

 TYPE SIBFLPORB

Object is transferred using the persistent display

 TYPE SWOTOBJID

Object is transferred using the persistent display; this display is only valid for BOR
objects

 TYPE SWC_OBJECT
Object is transferred as object reference

Exceptions:

The SAP WebFlow Engine can deal with exceptions that are triggered by the methods. It
differentiates between application exceptions and temporary exceptions. The two exception
categories are differentiated by the exception in the class hierarchy or by naming conventions. In
the case of a temporary exception, the SAP WebFlow Engine attempts to execute the method
again. In the case of a permanent error the status for the workflow is set to error.

Class-Based Exceptions:

To create a temporary exception, we can use, for example, the CX_BO_TEMPORARY class or a
corresponding subclass. It can be helpful to trigger an exception for dialog methods when the
user cancels the dialog. Here, for example, we could trigger the CX_BO_ACTION_CANCELED
exception (subclass of the CX_BO_TEMPORARY class).

Exceptions Not Based on Class:

We can also trigger exceptions not based on class. The SAP WebFlow Engine can differentiate
between the two exception categories (temporary and permanent) by the name. If the exception
begins with TMP or TEMP, it is a temporary exception; otherwise it is a permanent exception.

Using Document Template in Workflow


By Madhavi

This tutorial details about the usage of the step “Document from Template” in workflow.

Sometimes, it becomes a necessity to work with the documents (Word, Presentation, excel and others). Go to
Transaction SWDD and create a new workflow definition.

Before we go ahead and create a document template, we need to save the workflow definition. Save your workflow
definition.

Now select “Document templates” from the list as shown below (You can find this on the left side bottom of the
screen)
Click on “Double-click to create”

Click on “Change document class” and then select “Document” from the list provided (see the screenshot below):
The following screen appears:

Enter some text in the document:

Save your document.

After saving, go back to the main screen. You can observe the document template you just created, as shown below:
Now in your workflow definition, create a new step “Document from Template”:

Enter the step name.


To continue...click here

Using Document Template in Workflow


...Previous

In the section, Doc. Template(s), select the document we created earlier using the F4 help. Also enter the agent
details.

Save your entries.

The workflow definition would look like this:

Activate your workflow and execute the same.


Your work item would look as follows:

Execute the work item. The document would open as shown below:

Modify the document and Save.

Your work item is executed.


Demo on using Workflow Wizard
By Nihar Ranjan Barik & Sunil Ojha, Capgemini

Workflow wizards are one of the very strong tools available in workflow builder.

Dialog-oriented user guide that simplifies the definition of workflows in standard situations.

There are wizards that just create step sequences within a workflow definition. These can be found in the Workflow
Builder.

Wizards that create a new workflow definition are located in the Workflow Wizard Explorer. You can, however, also
use these wizards in existing workflow definitions. In this case, a new workflow definition is not created.

For example I want to attach a report in a workflow, workflow wizards will make this very easy and effective.

Step1. Go for the transaction SWDD (Workflow Builder)

Click on “Step type that can Be inserted” and the select Workflow Wizard (see the screenshot below)

After that Double Click On Include "Exclude Report" from Others tab
There will be two options for executing the report in Dialog/ Background Processing.

Give the Repot name, which is going to be executed. Here the report Name is ZWORKFLOWTEST.

Enter the select option name for the Selection screen of the report.
Here we are selecting For the report execution with the selection screen.

Enter the work Item text.


Continued...

Demo on using Workflow Wizard


....Previous

Edit the basic data of the task that the new step references.

With this we are into the last step of this process. Press the complete step from the screen.
In the further step agent assignment is done
In the general Task we are selecting for General task.

Now it is the time to test our work Flow


In Result to the work flow execution the following screen of the report program will result

The simple output for this testing workflow is shown.


Using the step "Form" in workflow
By Saumik Bhattacharya, Capgemini

Form is an important step type of workflow builder. We can use forms to enter data for processing in Business
Workflow, or to display and edit data.

Using the Forms step type we can generate a form from the workflow system with a structure that is saved in
workflow container. This form can be used for displaying and editing the form data. It can also contain additional
control elements that can be used, for example, for the approval of form content.

First of all we are creating a workflow container element in transaction code SWDD. You can use a form to display
or edit data of a container element of the workflow container that refers to a structure.

The element should be of type reference to an ABAP dictionary.


Then we will insert the forms in workflow:

Here we have to insert form type and action. Action can be of four types:
For it you have to create a form so that you can attach it to the workflow. Click on create button:
Here we are creating the form named Material info using the workflow container element Y_form_makt.

Now according to our requirement we are just using the material number & material description in the form layout.

For e.g. we are using the material number as input value and description field as output only.
We have also implemented the required changes in the flow logic of that form.

Finally we had attach two mail on approve and on reject.


After completing this, we will execute this workflow and will get the form:

We will go for approve this form and we will get description

And here is the approved mail:


Purchase Order Release Strategy
By Gowri Shankar, HCL Technologies

This document describes step-by-step procedure for triggering workflow while creating a PO.

Depends on PO value, it selects the level of approver one or two level.

Step1:

First we need to set the PO Release strategy.

Go to transaction SPRO.

Step 2: Click SAP Reference IMG.


Step 3:

Choose Material management à Purchasing à Purchase order à

Release Procedure for Purchase order à Define release Procedure for Purchase Order.

Step 4: The following screen appears.


Step 5: First let us set the release group

Press save and come back.

Step 6: Now the screen looks like this.


Step 7: Now select the Release code.
Step 8: After Release Codes, now select Release indicator.

Click here to continue...

Purchase Order Release Strategy


...Previous

Step 9:

Next you need to set the release strategy.


On double-clicking the record, the following screen appears. Here you need to set the conditions.

Step 10 :

Finally you need to set the workflow strategy.


Save your entries.

Now the release procedure is configured.

1) Go to transaction SWDD and open the standard SAP workflow definition WS20000075.
2) To tailor the workflow definition as per our requirements, let us take a copy of the standard workflow definition and
modify the same.

3) After that give the name for standard workflow.


Click here to continue...

Purchase Order Release Strategy


...Previous
4) Now a copy of the standard workflow is available. We can modify this workflow definition as per the client
requirements.

5) Note the workflow definition id. Go to the transaction PFTC.


6) Select the task type as Workflow template.

And task as 99900281(workflow definition id). Next click the change button.

7) Select the tab “Triggering events”. (The alternative method for getting into this screen is by selecting Basic data
(Hat symbol on the application toolbar) in the workflow definition)
8) Select the step and select “Call binding editor”.

The Following screen appears. Do the check and activate it.


Step 9 :
Step 11 : Go back to the earlier screen and activate the event.

The event linkage is now activated.

Hereafter whenever a purchase order is created, the workflow is automatically triggered.


Configuration of Purchase Requisition Release Strategy

By Suresh Kumar Parvathaneni

Following is the procedure for workflow enabling of “Purchase Requisition Release Strategy”:

1. The standard workflow template provided by SAP for PR Release is WS00000038. This information
could be retrieved from the SAP help.

2. It is assumed that the release procedure has been setup in the system by the functional consultant, as
shown below:

3. The customization of the PR Release Strategy could be verified at the following location:

SPRO à SAP Reference IMG à Material Management à Purchasing à Purchase Requisition à


Release Procedure à Procedure with classification à Setup procedure with classification

4. Click on workflow in the above screen (screenshot shown below):


5. Now define the recipients of the PR Release work item as per the release group (refer to screenshot
below). For testing purposes, the recipient type is taken as “US”, instead this can also be taken as
Position, Organization Unit and others.

6. Now go back to the previous screen and click on “Release Codes”. Here enter the value “1” in the
workflow column for the release groups the workflow has to be configured.
7. Activate the event linkage of the workflow either in SWDD or PFTC.

8. Mark all the tasks (unless background tasks) as “General Task” in the agent assignment and generate.

Triggering of Events/Workflow upon Status Change

By Suresh Kumar Parvathaneni

Scenario: Triggering of events upon Status Change of a Production Order

Creation of Production Order: Before configuring workflow for Production Order, we would first create
a production order and observe the events that are triggered by SAP (by default).

 Switch on the event trace using the transaction SWELS

 Go to transaction CO01 and create a Production Order.


Press SAVE and click on the following button.
 The Production order is created. Now go to either CO02/CO03 to understand the statuses set for the
document created.

Click on ‘i’ button.

The above statuses are set to this document.

 Switch of the event trace and check for the events triggered during the production order creation.

 Now the requirement is to trigger a custom event, when the status MANC is set (please refer to the
above screens for details).

Steps to trigger a custom event whenever the production order status is set to MANC:

 Go to transaction SWO1.

 Create a custom business object by taking BUS2005 (Production Order) as Super type.

 Create a new event, for example MANC.


 Implement and Release the business object component and the business object.

 Go to transaction BSVW (Status Management)

 Click on ‘Customer Settings’

 Go to change mode and click on ‘New Entries’.

 Enter the following:

 Press SAVE and select the above row and click on ‘Status restrictions’.

 Click on New entries

 Press F4 and select MANC from the list.


 Save the entries.

Now create a production order (Tcode CO01) and if the status of the document is MANC, then the above
event would be triggered.

Following is the screenshot from event trace:

Configuration of Quality Notification Workflow

By Suresh Kumar Parvathaneni

Following is the procedure to configure workflow for Quality Notifications:

Note: This document has prepared by taking screenshots from 4.6C system.

1. Activate the following linkages in the transactions SWETYPV:

The above screenshot is from the SAP 4.6C system.

2. Next, navigate to SPRO à SAP Reference IMG à Quality Management à Quality Notifications à
Notification Processing à Activate Workflow Template.
3. Click on Activate event linkage. Here activate the event linkage for Quality Notification INFO
(Screenshot shown below):

4. Now go back and click on “Assign agents to tasks”. Here make the quality notification tasks as
“General task” as shown below:

The screen for the above in 4.7 system is as follows:

5. Now create a quality notification using the transaction QM01. The work item would reach the
coordinator (User) that is mentioned/specified during the notification creation.
Trigger Workflow from Messages

By Suresh Kumar Parvathaneni

This document details about the procedure in triggering the workflows from a message (For e.g., error or
warning message).

For our demo purpose, let us consider the transaction ME21 (Create Purchase Order). Without entering any
values on the screen, press ENTER. You would get the error message “Enter Purchasing Org.” (as shown
below)

Now double-click on the message, to get the long text and the message details.

Now click on the technical information.

The above screenshot provides us with the message details (Message Class: ME) and Message Number
083.

Now we need to create a workflow which needs to be triggered from this message.

Go to transaction SWUY. Following wizard appears.


Click on “Continue”.

Enter the message details, as obtained earlier. Click on “Continue”.


Continued...

Trigger Workflow from Messages

...Continued

Click on “Complete” again. Pop-up screen regarding the package (Development class) appears. Assign the
package, you would like to have. Press ENTER. You would be automatically navigated to the “Workflow
Template” screen shown below:
Enter the Work item text and click on “Workflow Builder”. We are now in the “Workflow Builder”
screen.

For our demo purpose, let’s create a simple email step in our workflow definition. (To know about how to
include an email step in the Workflow definition, click here)
Activate the Workflow definition.

Testing the application

Go to transaction ME21.

Without entering any values, press ENTER. The error message “Enter Purchasing Org.” appears. Double-
click on the message and the long text appears. See the screenshot below.

As highlighted in the screenshot above, the button “Workflow” is now enabled (before attaching a
workflow definition to this message, this button was disabled”. Click on the button “Workflow”. The
workflow definition created earlier, in this case WS99900061, is now triggered. See the screenshot below.
Triggering Workflow using Business Transaction Events (BTE)
What are Business Transaction Events?

 The enhancement technique (Open FI) that were developed for Financial Accounting Component.

 Open FI is based upon the following principles:

o Application developers must define their interface in a function module, an assignment table is
read in the accompanying code and the customer modules assigned are called dynamically.

 This can be easily adopted / customized to the business needs wherein SAP does not provide the
standard functionality through customization or enhancements. This functionality is primarily used in
FI in the areas of dunning, credit management, banking etc. For Example: Standard Dunning
functionality in SAP sends the notice to the Pay to partner function (based on the partner functions in
SD module i.e. pay to hits the books in Accounts Receivable in FI module), whereas the requirement
could be to send the same to Bill to party, based on the premise that the original invoice was sent to him
as per the partner functions in SD.

Basic steps in configuring the Business Transaction Events:

Company A would like to fill the Assignment field with custom value ‘Demo BTE’ when an accounting
document is posted for a certain Company Code for accounting purposes to analyze the data. To
accomplish this requirement, Company A will use the Business Transaction Event 1120, Post Document:
SAP Internal Field Substitution. Depending on the business scenarios, generally the reference document
number field and assignment number field will be populated with a unique identifier for analyzing the
accounting data. For the purpose of this document, I have used a scenario of populating the text field while
creating accounting document.

 IMG Menu Path: Financial Accounting ->Financial Accounting Global Settings-> Business
Transaction Events-> Environment-> Infosystem (Processes).

 Execute the search with the defaults.


 Find the correct interface for updating the document.

 Place the cursor on the key 00001120 and click on Sample Function Module

 This navigates you to SE37 – Function Builder. This is the function module
(SAMPLE_PROCESS_00001120) we would need to copy into a Z or Y function module for coding

 Click on copy button.


 Specify the function module name and the function group.

 Now in the SE37 screen, click on change button and enter the following code:

 Save and activate the function module

 Go back to the first screen by multiple clicking on BACK.


Click here to continue...

Triggering Workflow using Business Transaction Events (BTE)


....Previous

 To assign function module to the event, we need to create a product, say ZPRODUCT. Click as shown
below:

 Click on New entries.

 Ensure that the Active check box is checked, otherwise BTE wouldn’t trigger.

 Now we need to assign the function module created earlier to the event

 Click as per the following screenshot:


 Click on new entries and create the following entry for 00001120:

 Test the BTE by creating a document through FB01 transaction.

 To check whether the assignment field is filled with “Demo BTE”, display the created accounting
document from FB03 and check for the Assignment value.
Double click on the item.

Triggering business object events:

Update the Z function module that is created earlier by calling the function module
SWE_EVENT_CREATE to trigger a business object event. Link this event to the workflow. To know
about triggering an event programmatically, click here.

Triggering Events Programmatically


By Suresh Kumar Parvathaneni

Purpose: This document details the procedure in triggering the business object events programmatically.
Pre-requisites: It is assumed that the reader of this document is aware of the business object concepts and
good in ABAP.

Procedure:

In this document, we would take an example of the business object BUS1001006 (Material) and the event
CREATED. In general, this event is triggered whenever a material is created using a standard procedure
like MM01 or any others. Now we would trigger this event from our own programs.

Following are the screenshots of the business object BUS1001006 and the event CREATED. Go to
transaction SWO1 for more information of the business object.

Double-clicking on the key field parameter gives you technical information of the field.
In order to trigger an event programmatically, we would use the function module
SWE_EVENT_CREATE.

Following is the sample code to trigger the events programmatically:

REPORT ZDEMO_TRIGGER_EVENT.

DATA: KEY LIKE SWEINSTCOU-OBJKEY.

KEY = '1163'. “ Material Number (hard-coded)

CALL FUNCTION 'SWE_EVENT_CREATE'


EXPORTING
objtype = 'BUS1001006'
objkey = KEY
event = 'CREATED'
* CREATOR = ' '
* TAKE_WORKITEM_REQUESTER = ' '
* START_WITH_DELAY = ' '
* START_RECFB_SYNCHRON = ' '
* NO_COMMIT_FOR_QUEUE = ' '
* DEBUG_FLAG = ' '
* NO_LOGGING = ' '
* IDENT =
* IMPORTING
* EVENT_ID =
* TABLES
* EVENT_CONTAINER =
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
WRITE 'Event Triggered'.
ENDIF.

COMMIT WORK.

In order to test whether the event is getting triggered or not, we can make use of Event Trace. Switch on the
event trace using the transaction SWELS.

Press ‘Switch On”.

Now execute the program developed earlier. Now switch-off the event trace using the same transaction
SWELS.

Now go to transaction SWEL. Here you can list out the events triggered in the particular period of time.
Here is the event-trace list:
Exception Handling in SAP® Business Workflow

By Suresh Kumar Parvathaneni

From the release of SAP® NW04 version, SAP® has introduced many new features among which exception handling is
one.

Exception handling is done in workflow using Blocks (TRY-CATCH mechanism). “Blocks” is one of the new features
introduced from NW04 version.

This document details about the usage of Blocks and the approach to trigger and handle the exceptions.

Pre-requisites

It is assumed that the reader of this article has some knowledge in SAP® workflow and has worked with the steps Mail,
Process control earlier.

Overview of Blocks

 Blocks could be treated as folders combining a group of dependent work items. They are shown as folders in the
workflow log.
 Each block would have start and end nodes.
 Blocks can be deadline monitored (only Latest End)
 Blocks can catch exceptions

Following are the screenshots representing how a “Block” appears in the workflow definition and in the workflow log:

Fig: Appearance of “Block” in the Workflow definition.

Fig: Appearance of “Block” in the Workflow log

A “Block” is completed only if the dependent work items are complete or in the final state. If a “Block” is cancelled, all its
dependent work items are cancelled.

Each “Block” can have its own container elements. All the parent container elements are visible within the “Block”.

Defining a Block

 Start a new workflow definition using the transaction SWDD


 Double-click on the “Undefined step” and select “Block”.
 Enter the step name and leave the block type as “Standard”. Press Enter. The workflow definition would be
appearing as follows:

All the dependent steps could be defined with in the Block start and Block end.

Contd..

Exception Handling in SAP® Business Workflow

Contd..

As mentioned earlier, Blocks can handle exceptions. If an exception is caught, everything inside the block is cancelled. If
exception is not caught, process is set to an ERROR state (This could be compared to TRY-CATCH in ABAP TM programs. If
the exception is not caught, program results in dump)

 Create a new workflow and define a new step “Block” as mentioned earlier page.
 In the “Block” step, click on the tab “Exceptions” and make an entry of a new exception, for e.g., “Dummy_Excep”,
which would be raised in the workflow definition.

 Activate the exception defined above, by clicking on the button left to the exception name
 Go back to the main screen. Two branches would be appearing between the block begin and block end, as shown
below. Exception branch is taken whenever the exception, Dummy_Excep, is triggered.

 Exceptions are triggered using the step “Process Control”. Define a new step “Process Control” in the normal
branch. Enter the step name and the outcome name. Select “Throw Exception” in the function. In the event name,
select the exception name defined earlier (see the screenshot below).

 Uncheck “Step not in workflow log” if you would like to see this step in the workflow log.
 Define a mail step in the exception branch of the block (for testing purpose – to ensure that this exception branch
is taken, when the exception is triggered). The execution flow of the exception handling is shown below:

SWITCH in multiple condition

By Suresh Kumar Parvathaneni

SAP® has introduced new features in Business Workflow in the releases 6.20, NW04 and NW04s.

This Tutorial introduces you to a new feature SWITCH provided in the step “Multiple Condition” of SAP® Workflow. It is
assumed that the reader of this Tutorial has already some knowledge in Business Workflow and has worked on “Multiple
Condition” step earlier.

The SWITCH feature in the step “Multiple Condition” is provided from the release NW04. The only feature available before
NW04 with this step is “CASE”. In the case of “CASE”, the workflow system checks the value of the basis of comparison
against the defined comparison values (as shown below).
In SWITCH, each branch of it carries a condition definition. We can visualize “Multiple Condition” with SWITCH as a group
of “Condition” steps.

Small scenario using “Multiple Condition” with SWITCH is shown below:

Create a new workflow definition with a container element “CARRID” (Well known example for training purposes).

Set the “Properties” as import.


Double click on the undefined step to create a step “Multiple Condition”. Following screen appears:

Select the “Switch” option in the Type field.

Contd..

SWITCH in multiple condition

By Suresh Kumar Parvathaneni

Contd..

Different types of conditions can be defined for each “Outcome”. Please note that:

 The conditions are defined in the given order.


 The first branch whose condition is evaluated TRUE is considered.
 If none of the condition is TRUE, a default branch is taken (“Other values” in the definition).
Following are the conditions used in our example:

The workflow definition would appear as follows:


Insert an email step for each branch and check the output for various “Carrid” values.

Understanding "Local Workflow"


By Murali, CapGemini

In this tutorial, we would explain creating and working with a local workflow.

Go to Transaction SWDD. Create a new workflow definition.


Go to Basic data (hat symbol) as shown in above screenshot.

Fill-in the Abbreviation and Description and click on the tab “Version-Dependent (Current Workflow Version).
Enter a name for a local event.

Go back to the main screen and create a new step.


Select the step “Event Creator”. Provide the Step Name and Outcome Name. Also select “Trigger Local Event” in the
Event Creator.

Enter the name of the event we defined earlier.


Go back to the main screen and create a new step (See the screenshot below)

Select the step “Local Workflow”


Click here to continue...

Understanding "Local Workflow"


...Previous

In the screen shown below, enter the step name and also event name we created earlier.

Go back to the main screen. In the local workflow definition, right click and click on Create.
Create a new step “Mail”.

Go back to the main screen. The workflow definition would look as follows:
Activate your workflow and test your workflow definition. You might not be able to find the email in your SAP inbox.
Follow is the screenshot from the workflow log.

When the main workflow is ended, the local workflow would automatically end with a status “Logically deleted”. The
workflow would continue further after the step “Event creator” without waiting for the local workflow to complete.

So let us create a step “User Decision” after the step “Event Creator” in the workflow definition.
Activate and test run your workflow definition. You would now observe an email and also work item regarding the
user decision step in your SAP Inbox (see the screenshot below)
Useful Transactions in SAP Workflow
Transaction Code Description
OOAW Evaluation paths
PFAC_CHG Change roles
PFAC_DEL Delete roles
PFAC_DIS Display roles
PFAC_INS Create roles
PFOM Maintain assignment to SAP organizational
objects
PFOS Display assignment to SAP organizational
objects
PFSO Organizational environment of a user
PFTC_CHG Change tasks
PFTC_COP Copy tasks
PFTC_DEL Delete tasks
PFTC_DIS Display tasks
PFTC_INS Create tasks
PPOCW Create organizational plan
PPOMW Maintain organizational plan
PPOSW Display organizational plan
SWDA Workflow Builder (Calls the Workflow Builder in
alphanumeric mode)
SWDD Workflow Builder
SWDS Workflow Builder (Selection)
SWDD_CONFIG Workflow configuration
SBWP The Business Workplace
SWDC_DEFINITION Workflow Builder administration data
SWDC_RUNTIME Workflow runtime administration data
SWNCONFIG Extended notifications for business workflow
SWDM Business Workflow Explorer
SWEINST Evaluation and maintenance of instance
linkages
Continued...
Useful Transactions in SAP Workflow
...previous

Transaction Code Description


SWEINSTVC Evaluation and maintenance of instance
linkages
SWE2 Evaluation and maintenance of type linkages
SWE3 Evaluation and maintenance of instance
linkages
SWE4 Switch event trace on/off
SWEL Display event trace
RSWELOGD Delete event trace
SWEC Link change documents to events
SWED Assign change document objects to object
types
SWEQADM_1 Event queue administration
SWEQBROWSER Administration of event queue browser
SWETYPV Evaluation and maintenance of type linkages
SWI1 Selection report for work items
SWI2_FREQ Work items per task
SWI2_DEAD Work items with monitored deadlines
SWI2_DURA Work items by processing duration
SWI11 Tasks in workflows
SWI13 Task profile
SWI5 Workload analysis
SWL1 Settings for dynamic columns
SWLV Maintain work item views
SWFVISU Parameters for Work Item Visualization in the
UWL
SWO1 Business Object Builder
SWO6 Customizing object types
SWR_WEBSERVER Customizing Web server
SWU_CONT_PERSISTENCE Administration of container persistence
SWU_EWCD Wizard for event creation using change
documents
SWU_EWLIS Wizard for event creation using the Logistics
Information System
SWU_BTE Wizard for event creation using Business
Transaction Events
SWU0 Event simulation
SWU2 RFC monitor
SWU3 Automatic Workflow Customizing
SWU4 Consistency check for standard tasks
SWU5 Consistency check for customer tasks
SWU6 Consistency check for workflow tasks
SWU7 Consistency check for workflow templates
SWU8 Switch workflow trace on/off
SWU9 Display workflow trace
SWU10 Delete workflow trace
Continued...

Useful Transactions in SAP Workflow


...previous

Transaction Code Description


SWUD Diagnostic tools
SWUE Trigger event
SWUI Start workflows/tasks
SWUS Testing workflows/tasks
SWXML Display XML documents
SWUY Wizard for linking messages to workflows
SWWCOND_INSERT Schedule background job for work item
deadline monitoring
SWWCLEAR_INSERT Schedule background job for clearing tasks
RSWWCOND Execute single background job for work item
deadline monitoring
RSWWCLEAR Execute work item clearing work once
WF_HANDCUST WebFlow service handler maintenance
WF_EXTSRV Maintain Web Service Repository
WFWS Import WSDL files

You might also like