SAP Business Workflow TCodes

What is SAP Business Workflow?

SAP Business Workflow TCodes: SAP Workflow uses the existing transactions and functions of the R/3 System and does not change the functions. You can combine the existing functions of the R/3 System to form new business processes with SAP Business Workflow

The workflow system takes over control of the business processes. If you are already using SAP Organizational Management, you can use the organizational structure created there to have the relevant agents carry out the individual activities. It is possible to have an activity carried out by a position. This ensures that the respective occupiers of the position can carry out the individual activities during execution of the workflow. This means that personnel changes in your organization are taken into account immediately in the execution of a workflow.

Simple Scenario :

Workflow is a process i.e for example if you want to apply for a leave in an oganisation, you will just login and send a request for number of days.  In the back end process, i.e who should approve your leave and after approval one day from your total leaves is deducted or if you are not having leaving leaves it should go to finance dept so that loss of pay leave is given.  All this is called work flow, as a developer we will configure this workflow.

In SAP system, you have built-in functions that defines different tasks to be performed in the workflows. These are related to creating new workflows, workflow tools, workflow diagnosis, performance, workitems and administration of workflows.

Few common T-codes and their description is mentioned in the following table −

Sr.No.Transaction Code & Description
1PFACCreate and maintain Rules
2PFOMMaintain assignment to SAP organizational objects
3PFOSDisplay assignment to SAP organizational objects
4PFSOOrganizational environment of a user
5PFTCCreate and maintain tasks
6PPOCWCreate organizational plan
7PPOMWMaintain organizational plan
8PPOSWDisplay organizational plan
9SWDAWorkflow Builder (Calls the Workflow Builder in alphanumeric mode)
10SWDDWorkflow Builder
11SWDSWorkflow Builder (Selection)
12SWDD_CONFIGWorkflow configuration
13SBWPThe Business Workplace
14SWDC_RUNTIMEWorkflow runtime administration data
15SWNCONFIGExtended notifications for business workflow
16SWDMBusiness Workflow Explorer
17SWEINSTEvaluation and maintenance of instance linkages
18SWEINSTVCEvaluation and maintenance of instance linkages
19SWE2Evaluation and maintenance of type linkages
20SWE3Evaluation and maintenance of instance linkages
21SWE4Switch event trace on/off
22SWELDisplay event trace
23RSWELOGDDelete event trace
24SWECLink change documents to events
25SWEDAssign change document objects to object types
26SWEQADM_1Event queue administration
27SWEQBROWSERAdministration of event queue browser
28SWETYPVEvaluation and maintenance of type linkages
29SWI1Selection report for workitems
30SWI2_FREQWorkitems per task
31SWI2_DEADWorkitems with monitored deadlines
32SWI2_DURAWorkitems by processing duration
33SWI11Tasks in workflows
34SWI13Task profile
35SWI5Workload analysis
36SWL1Settings for dynamic columns
37SWLVMaintain workitem views
38SWFVISUParameters for Workitem Visualization in the UWL
39SWO1Business Object Builder
40SWO6Customizing object types
41SWR_WEBSERVERCustomizing Web server
42SWU_CONT_PERSISTENCEAdministration of container persistence
43SWU_EWCDWizard for event creation using change documents
44SWU_EWLISWizard for event creation using the Logistics Information System
45SWU_BTEWizard for event creation using Business Transaction Events
46SWU0Event simulation
47SWU2RFC monitor
48SWU3Automatic Workflow Customizing
49SWU4Consistency check for standard tasks
50SWU5Consistency check for customer tasks
51SWU6Consistency check for workflow tasks
52SWU7Consistency check for workflow templates
53SWU8Switch workflow trace on/off
54SWU9Display workflow trace
55SWU10Delete workflow trace
56SWUDDiagnostic tools
57SWUETrigger event
58SWUIStart workflows/tasks
59SWUSTesting workflows/tasks
60SWXMLDisplay XML documents
61SWUYWizard for linking messages to workflows
62SWWCOND_INSERTSchedule background job for workitem deadline monitoring
63SWWCLEAR_INSERTSchedule background job for clearing tasks
64RSWWCONDExecute single background job for workitem deadline monitoring
65RSWWCLEARExecute workitem clearing work once
66WF_HANDCUSTWebFlow service handler maintenance
67WF_EXTSRVMaintain Web Service Repository
68WFWSImport WSDL files
69SWIAWI Administration Report

SWF_GP SAP TCode – Guided Procedures

SAP TCode (Transaction Code) – SWF_GP SAP Business Workflow TCodes

SAP TcodeSWF_GP
DescriptionGuided Procedures
PackageSWF_GP_DEF
Program NameRSWF_GP_DISPLAY_DEPLOYED_GPS
Screen Number1000
Transaction TypeR
ModuleBasis Components ► Business Management ► SAP Business Workflow ► Runtime

The SAP TCode SWF_GP is used for the task : Guided Procedures. The TCode belongs to the SWF_GP_DEF package.

SBWP_GP SAP TCode – SAP Business Workplace for GP

SAP TCode (Transaction Code) – SBWP_GP

SAP TcodeSBWP_GP
DescriptionSAP Business Workplace for GP
PackageSWF_GP_RUN
Program NameRSBWP_GP
Screen Number1000
Transaction TypeT
ModuleBasis Components ► Business Management ► SAP Business Workflow ► Runtime

The SAP TCode SBWP_GP is used for the task : SAP Business Workplace for GP. The TCode belongs to the SWF_GP_RUN package.

SAP Runtime Tcodes

TcodeDescriptionModule
SWF_GPGuided ProceduresBC-BMT-WFM-RUN

SWF_DEBUG SAP TCode – Edit Workflow Breakpoints

SAP TCode (Transaction Code) – SWF_DEBUG

SAP TcodeSWF_DEBUG
DescriptionEdit Workflow Breakpoints
PackageSWF_DEBUG
Program NameSAPLSWF_DEBUG_GUI
Screen Number1100
Transaction TypeT
ModuleBasis Components ► Business Management ► SAP Business Workflow ► Runtime

The SAP TCode SWF_DEBUG is used for the task : Edit Workflow Breakpoints. The TCode belongs to the SWF_DEBUG package.

SAP Runtime Tcodes

TcodeDescriptionModule
SWF_GPGuided ProceduresBC-BMT-WFM-RUN

Business Workflow

Administration

Basic Settings

Notifications

SWNADMIN – Administration of Extended Notifications (Browser)

SWNCONFIG – Configuration of Extended Notifications
 

WebFlow Services

WF_HANDCUST – Customizing for Service Handler
 

Workflow Runtime

SWDC_RUNTIME – Maintain System Administrator for Runtime System

SWF_RFC_DEST – Configure Workflow RFC Destination

SWPA – Customizing Workflow Runtime
 

Web Server

SWR_WEBSERVER – Customizing Web Server
 

Event Manager

SWEQADM_1 – Administrator for Event Queue
 

Workflow Definition Time

SWDC_DEFINITION – Workflow Builder
 

Workflow Runtime

SWF_GMP – Administrator Overview
 

Work Item Deadline Monitoring

RSWEWWDHSHOW – Display Background Job

SWWB – Schedule Background Job

SWWDHEX_DELETE – Unschedule Background Job

SWWA – Configure and Schedule Background Job

RSWWDHEX – Execute Work Item Deadline Monitoring

SWWDHEX_DEBUG – Execute Work Item Deadline Monitoring (Debug)

SWWERRE_DEBUG – Execute Work Item Error Monitoring (Debug)
 

Work Item Rule Monitoring

SWW_DISPSWWCOND – Display Background Job

SWWCOND_INSERT – Schedule Background Job

SWWCOND_DELETE – Unschedule Background Job

RSWWCOND – Execute Work Item Rule Monitoring

RSWWCOND_MON – Monitoring – Rule Monitoring
 

Clearing Tasks

SWW_DISPSWWCLEAR – Display Background Job

SWWCLEAR_INSERT – Schedule Background Job

SWWCLEAR_DELETE – Unschedule Background Job

RSWWCLEAR – Execute Clearing Tasks
 

Reorganization

SWW_SARA – Archive Work Item

SWW_ARCHIV – Display Workflows from Archive

SWWL – Delete Work Item

SWWL_TOPLEVEL – Delete Top Level Work Items with Dependent Entries

SWWH – Delete Work Item History
 

Container Handling

SWU_CONT_PERSISTENCE – Administrate Container Persistence
 

Application Log

SWF_APPL_DISPLAY – Application Log: Display Logs

SLG2 – Application Log: Delete logs
 

Notifications

Delete Completed Notifications

SWNNOTIFDEL_DISPLAY – Display Background Job

SWNNOTIFDEL_INSERT – Schedule background job

SWNNOTIFDEL_DELETE – Unschedule background job

SWNNOTIFDEL – Execute Immediately

SWI2_ADM1 – Work items without agents

SWI2_ADM2 – Work Items with Deleted Users

SWI2_DEAD – Work Items with Monitored Deadlines

SWI2_DIAG – Diagnosis of Workflows with Errors

SWIE – Unlock Workflows

SWIA – Execute Work Item Without Agent Check

SWPR – Workflow Restart After Error

SWPC – Continue Workflows After System Crash

SWU_OBUF – Synchronize Runtime Buffer

SWU2 – Workflow RFC Monitor

SWI1_COND – Check Conditions for Work Items

SWI1_RULE – Execute Rules for Work Items

SWF_ADM_SUSPEND – Restart Suspended Workflow Callbacks

SWF_ADM_SWWWIDH – Restart Suspended Deadline Callbacks
 

Event Manager

SWETYPV – Type linkages

SWEINST – Instance linkages
 

Event Trace

SWEL – Display Event Trace

SWELS – Switch Event Trace On/Off

RSWELOGD – Delete Event Trace

SWEQADM – Event Queue

SAP Workflow FAQ Techniques

What differences are there between a work item and a notification mail?

a) The work item cannot be used to notify several users.  Mails can be routed to several users, just like work items. When a mail is sent, and one recipient reads and deletes the mail, all other recipients will still have access to their own copy in their own inbox. However, when a work item is processed by one of the recipients it will automatically disappear from all the other inboxes.  So you can see that a work item is unsuitable for notifying several users. It is also worth noting that a mail can be forwarded in many different ways (fax, internet…) whereas the work item cannot.

b) The work item holds up the workflow
When the workflow sends a mail (usually as a background step) it continues with the process immediately after transmitting the mail. When a work item is generated, the workflow will not continue until the work item has been processed. This slows down the process. Occasionally this is what is intended (using the work item as an approval step without the ability to reject) but
usually you will better off using mails for notifications.

Note: You can send business objects as references with the mail either as a business object reference attached to the mail or as an URL (ABAP required).
 

What is the difference between sending a mail to a recipient list compared to sending individual mails via a dynamic loop?

Performance. Sending 1 mail to 20 recipients will cost considerably less performance than sending 20 individual mails. If the mail is sent as a SAP Office mail (as opposed to e-mail, fax…) disk space will also be a factor because the SAP office mail will only exist once in the database, with references being created for each of the recipients.

The only time you need to consider individual mails with a dynamic loop is when the text of the mail varies from one recipient to another.
 

How do I send a standard text as an e-mail from workflow?

It is very easy sending standard text , which may include data from the workflow. You simply create a background step which sends the work item description. This may include variables which will be substituted when mail is sent.

In early releases you have to create your own task based on the method SELFITEM SendTaskDescription. In later releases a wizard is available for creating the step and in release 4.6 there is even a step type which does this all for you automatically.
Whichever path you take, there is very good online documentation describing exactly what has to be done.
 

How do I send a complex text from the workflow?

You may create mails using SAPscript. These mails can include conditions which are evaluated in order to determine which text blocks which are used in the mail. Workflow variables can be used in these conditions and workflow variables can be substituted into the body of the e-mail text.
 

How do I send really complex mails from the workflow?

If you this is not enough for you will probably want to write your own ABAP routines for generating the text and generating the attachments to go with the text.

Use the function group SO01 which contains functions of the form SO_*_API1 which are ideal for creating your own sophisticated messages. There are plenty of advantages of how these are used within the SAP system.
 

How do I send reports?

There are wizards (Release 3.1) which will create workflows for you to send reports to a distribution list. You can specify whether the results should be transmitted or evaluated at the time the recipient wishes to view the report. It is usually better to send the evaluation because this allows the recipient to see the results instantaneously, without having to wait for the
report to execute first.
 

Deadlines
How can I configure the workflow so that different types of messages are sent out to different people depending on how late the processing is?

Follow these steps:

1. Specify a deadline period for the step.
2. Specify a name for the event. This adds new branch from the step. More…
3. Add a new step to the branch which sends a mail message.
4. Add another step to the branch which sends out the second deadline warning (see mail steps above). Use deadlines in this step to configure an earliest start so that the second message is not sent until a further time has elapsed.
5. Repeat step 5 as often as you like.

How can I configure the workflow so that when the deadline is missed the workflow step is simply skipped?

This is tricky to explain but easy to implement once you know how.
Follow these steps (in later releases there is a wizard which takes you through the steps):
1. In the terminating events view of the workflow step activate the  “obsolete” event and give it a name. More…
2. Specify a deadline period for the step.
3. Specify a name for the event. This adds new branch from the step. More…
4. Add a new step to the deadline path. This step must be of type “process control”.
5. Select the control “Make step obsolete” and use the search help to specify the workflow step that has the deadline. Only steps with obsolete paths defined will be displayed (see step 1).

How do I trigger a workflow with an e-mail?

You can customize the system to call a BOR method when an external mail (fax, e-mail…) arrives in the system. You BOR method should either trigger the e-meil directly or trigger an event. To customize this user exit use the transaction SCOT.

How can I make sure that user’s access their tasks via the workflow and not via the menu or launch pad?

The routing mechanism for work items uses roles and organizational assignments to determine who receives which work item. However the routing does not provide extra authorization checks based on the routing configuration. If you want to ensure that the  tasks are executed within the workflow, and not via the standard transaction, service or MiniApp, then you will have to apply your own protection.
The simplest way of doing this is to remove the standard transaction from the user’s menu or Workplace role (but include it in the supervisor’s role, just in case).

If you want to allow the user to execute the task from the menu if and only if they have received the work item then you should replace the standard transaction with your own custom built transaction. Your own transaction simply calls the standard transaction but performs it’s own authorization check first, based on the routing mechanism used in the workflow.
Tip: Add a second (ored) authorization check to make sure that a supervisor can execute the transaction in an emergency.

New branch for deadline step

By specifying the event name for a missed deadline (of whatever type) you are indirectly telling the workflow system that you want to add flow logic to your workflow to meet this event.
Don’t be put off by he fact that the branch does not lead anywhere. This is because the branch is not an alternative to the other results of the step. It is followed in addition to the other paths. In other words the workflow processing specified for a missed deadline is followed without affecting the standard flow. The step with the missed deadline remains where it is and can still be processed as normal.

  • Related Posts

    सबसे लोकप्रिय परियोजना प्रबंधन सॉफ्टवेयर कौन सा है? -2024

    सबसे लोकप्रिय परियोजना प्रबंधन सॉफ्टवेयर कौन सा है? -2024 व्यापार की तेज गति वाली दुनिया में, कुशल परियोजना प्रबंधन सफलता के लिए यह बहुत ज़रूरी है। सही Project. मैनेजमेंट सॉफ़्टवेयर चुनने से…

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You Missed

    Part 11 of Core Data Services: How Do I Use CDS View in the KPI Fiori Apps for Smart Business Services?

    • By Varad
    • October 4, 2024
    • 4 views
    Part 11 of Core Data Services: How Do I Use CDS View in the KPI Fiori Apps for Smart Business Services?

    SAP Fiori. Chapter 12: SAP Fiori Launchpad Tcode: Uses and Upkeep

    • By Varad
    • October 3, 2024
    • 4 views
    SAP Fiori. Chapter 12:  SAP Fiori Launchpad Tcode: Uses and Upkeep

    Step by Step Guide to Install SAP Web IDE Personal Edition

    • By Varad
    • October 2, 2024
    • 3 views
    Step by Step Guide to Install SAP Web IDE Personal Edition

    “A Strategic View of SAP Fiori: Insights from a Space Level Perspective”

    • By Varad
    • October 1, 2024
    • 6 views
    “A Strategic View of SAP Fiori: Insights from a Space Level Perspective”

    An Overview of SAP Fiori ABAP Programming Model – 1

    • By Varad
    • October 1, 2024
    • 6 views

    SAP Fiori ABAP Programming Model – 2 – CDS – Overview

    • By Varad
    • September 30, 2024
    • 5 views
    SAP Fiori ABAP Programming Model – 2 – CDS – Overview