Introduction

Assigning workflow tasks to multiple people creates a shared responsibility for processing. A disadvantage of this can be that the number of tasks in the workflow inbox increases rapidly, resulting in a lower performance of the SAP Workflow inbox. An example of this is the often large workflow inbox of the accounts payable department.

A recent SAP OSS note improves the performance of retrieving task specific attributes within the Fiori My Inbox app. The methodology described in this note also works for the SAP GUI Workflow inbox (transaction SBWP) for professional users.

Of course, it was already possible to implement a BAdI, so that the dynamic columns are filled at once for the entire list of work items. For the sake of completeness, both methods are described in this document.

Filling dynamic columns with "user attributes

Dynamic columns (transaction SWL1) are set up at task level. The use of dynamic columns in the SAP Business Workplace (transaction SBWP) makes it possible to prioritize tasks by application context. 

See below for an example of a workflow inbox using dynamic columns.

Dynamic columns in SBWP

Default behavior of the SAP Workflow runtime is that the content of the dynamic columns is determined at the moment the inbox is opened. When entering the inbox, all workflow containers should be read and the dynamic column values should be evaluated for each work item. Reading workflow containers, instantiating objects and then reading out the attributes is not optimized for mass processing which reduces performance.

With the introduction of OSS note 2023356, it became possible in the Fiori My Inbox app to add task-specific information to the task list (the master list on the left side of the app). This functionality is comparable to dynamic columns in SAP Business Workplace. For example, you can show amount or date fields or the name of the supplier. The big advantage is that this information can then be searched in the task list using the search functionality.  

My inbox dynamic columns

These so-called "user attributes" are periodically determined in batch and stored in table SWW_USRATT. In a second step, with the introduction of OSS note 2089151, SAP made the link between the SWL1 data (dynamic column definition in the backend) and the user attributes possible. The setup of these attributes is done using the report RSWD_MAINTAIN_USER_ATTR. Report RSWW_FILL_USER_ATTR can be used for the initial determination and possible re-indexation of the active work items. 

The SAP Workflow inbox SBWP will first consult the table mentioned. If there is none, the value is determined in the standard way by reading the workflow containers or object attributes. It can be customized which dynamic columns are to be buffered and which are not. Dynamic columns that are subject to change can be excluded from buffering. 

Problem that may arise is that the buffered values may age. For this purpose, the mentioned job can be planned. It will update the buffered values on a regular basis. 

In certain situations the described methodology should not be used:

  1. The object attribute is language dependent. The job that determines the attributes will possibly run under a system user, e.g. WF-BATCH. In this case, this should be the language of the end user.
  2. The column contains a date or time field. If the work item was created in a different time zone, it may be filled with the wrong value for the end user.

See OSS note 2143729 (SBWP: Filling dynamic columns with user attributes) for more details.

Filling of dynamic columns via a BAdI

A Business Workplace BAdI is also available for optimized determination of the content of dynamic columns, see SAP OSS note 848382.

The BAdI WF_BWP_DYN_COLUMN can be used to bypass the default determination of the dynamic columns. This BAdI makes it possible to select directly at database level.

Determine dynamic columns via BAdI

A disadvantage of this method is that the ABAP logic for determining the value may already be defined in the business object attributes or methods. This logic will have to be rewritten for the batch determination of the column values.

An example implementation of the BAdI WF_BWP_DYN_COLUMN is available: class CL_EXM_IM_WF_BWP_DYN_COLUMN contains logic for determining the dynamic columns of task TS30000016 (approve leave requests).

To illustrate the possible performance gains when using BAdi WF_BWP_DYN_COLUMN, the SAP Business Workplace is opened twice. Once the BAdi is switched off, the second time it is switched on.

Without BAdi the response time is 25179 milliseconds, with BAdi the response time is 5382 milliseconds. A performance improvement of 467%!

For questions or additional information on this subject, please contact Sander van der Wijngaart.