Assigning workflow tasks to more than one person creates a shared processing responsibility. A disadvantage may be that the number of tasks increases rapidly in the workflow inbox, with a lower performance of the SAP Workflow inbox as a result. An example is the often large workflow inbox of the accounts payables.
A recent SAP OSS note improves the performance of retrieving task-specific attributes within 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, there was the possibility to implement a BAdI, so that the dynamic columns were filled only once for the entire list of work items. For completeness, we'll describe both methods in this article.
Filling of dynamic columns with "user attributes"
Dynamic columns (transaction SWL1) are arranged on task level. The use of dynamic columns in the SAP Business Workplace (transaction SBWP) makes it possible to prioritize tasks on application context.
See below for an example of a workflow inbox where dynamic columns are being used.
Default behavior of the SAP Workflow runtime is that the contents of the dynamic columns is read at the moment the inbox is opened. All workflow containers must be read when opening the inbox and the dynamic column values are being evaluated for each work item. The reading of workflow containers, instantiation of objects and finally interpreting the attributes is not optimized for mass processing, thereby reducing the performance.
With the introduction of OSS Note 2023356 it became possible to add job-specific information to the task list (the master list links in the app) in the Fiori My Inbox app. This functionality is comparable to dynamic columns in the SAP Business Workplace. Take for example the showing of amount or date fields or the name of the supplier. A big advantage is that the information in the task list can be found via the search functionality.
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 SWL1 data (dynamic definition column in the backend) and the user attributes. Configuring this takes place with the aid of the RSWD_MAINTAIN_USER_ATTR report. RSWW_FILL_USER_ATTR can be used for the initial determination and any re-indexing of the active work items.
The SBWP SAP Workflow inbox will first consult the above table. If it's not available, then it's defined in the standard way by reading the workflow container or object attributes. It is customizable which columns should be buffered or not. Ever changing dynamic columns can thus be excluded from buffering.
The problem that can arise here is that the buffered values may become obsolete. Above report can be scheduled for this reason. This will regularly update the buffered values.
In certain situations, the described method should not be used:
- The object attribute is language dependent. The job will possibly run under a system user, such as WF-BATCH. In this case, this should be the language of the end user.
- The column contains a date or time field. If the work item has been created in a different time zone, this may be filled with a wrong value for the end user.
See OSS Note 2143729 (SBWP: Filling columns with dynamic user attributes) for more details.
Filling of dynamic columns via a BAdI
A Business Workplace BAdI is 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 circumvent the standard provisioning of the dynamic columns. This BAdI allows you to select directly on the database level.
A disadvantage of this method is that the ABAP logic for determining the value might already be defined in the business object attributes or methods. This logic will need to be re-written for the batch determination of the column values.
There is an example implementation of the BAdI WF_BWP_DYN_COLUMN 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 potential performance gain when using Badi WF_BWP_DYN_COLUMN we've opened 2 times the SAP Business Workplace. Once with badi is turned, the second time it is turned on.
Without BAdi, the response time is 25.179 milliseconds, with Badi, the response time is 5.382 milliseconds. A performance improvement of 467%!
For questions or additional information on this topic please contact Wouter Van Peteghem.