Workflows play a very important role in any business landscape. Workflow tasks in the SAP CRM Web UI environment bring out a more user-friendly interface. Almost all the tasks available in the standard SAP Business Workplace for users to interact are available in the Web UI work list too. However, when the attachments in the workflow tasks need to navigate to ERP Sales Orders (which needs to be accessed from a connected ECC system), inconsistencies may arise. This document highlights how a simple enhancement can be done at the Web UI level to accomplish this requirement. Moreover, the key take-aways from this article would be the know-how to investigate similar issues that may arise in other similar work items.
Example Business Requirement
A particular workflow task will have the related ECC Sales Order number as an attachment, clicking on which should navigate the user to the sales order display screen. If the business object associated with a transaction is relevant within the CRM system (for eg. BUS2000120 for activity), the link will appear in the attachment correctly enabling the user to navigate to the corresponding transaction. However, for the ERP Sales Orders, there is a possibility of issues arising from the standard behaviour, especially if custom business objects are used.
Example Techincal approach
- Using the t-code BSP_WD_CMPWB, access the BSP Component Workbench.
- Open the component GSWIDET.
- Enhance the view BorObj (Please note that the GS* components are generic and should be enhanced carefully. This should not be taken as the standard enhancement approach for resolving such issues and should be resorted if there is no other way identified.)
- Redefine the event EH_ONTBV_DEF_ATTRIB_CLICK. This event will be triggered when the user clicks on the attachment link in the workflow task.
- The method of the super-class will not be called here; but the original code will be re-used to result in no change to the standard functionality. The workflow in this example has a custom business object and this is used as the identifier so that the custom code in the enhancement is triggered only for workflows associated with the custom object.
- In the standard code, once the current object properties are retrieved, put the logic in place to check if the business object type is the custom object. In the example used, the custom business object type is ZBUS013.
- Set the following attributes of the structure LS_BOR_NAV_PARAMS holding the navigation parameters:
- i. OBJTYPE – This is the object type of the object to be navigated; in this example it is an ECC sales order, for which the business object type is BUS2032
- ii. OBJ_IB_CATID – This is the object category ID which is obtained from the standard code field LS_BOR_ATTRIBUTES-OBJ_IB_CATID.
- iii. OBJKEY – This should be the key field; in this example it will be the Sales Order Number obtained from the field LS_BOR_ATTRIBUTES-OBJKEY
- iv. LOGSYS – Logical system of the workflow item; in this example it is the ECC system RFC destination.
- v. METHOD – The object method that is to be executed; this is available in the field LS_BOR_ATTRIBUTES-DEF_METHOD.
- vi. WI_ID – Work item ID that is obtained from LS_WI_ATTRIBUTES-WI_ID.
This enhancement will ensure that when the user clicks on the link (attachment) in the work item, the navigation occurs correctly to the ECC Sales Order from the CRM Web UI.