0% found this document useful (0 votes)
6 views

My Inbox Fiori App

This document provides a detailed guide on configuring the My Inbox Open Task Navigation using the SWFVMD1 transaction in SAP. It outlines the steps to set up navigation for Fiori applications, including the necessary parameters and dynamic values, as well as the use of Business Add-Ins for extending My Inbox functionality. Additionally, it discusses the importance of SWFVISU configuration for URL generation and offers insights into customizing attributes for workflow tasks.

Uploaded by

sujiono
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

My Inbox Fiori App

This document provides a detailed guide on configuring the My Inbox Open Task Navigation using the SWFVMD1 transaction in SAP. It outlines the steps to set up navigation for Fiori applications, including the necessary parameters and dynamic values, as well as the use of Business Add-Ins for extending My Inbox functionality. Additionally, it discusses the importance of SWFVISU configuration for URL generation and offers insights into customizing attributes for workflow tasks.

Uploaded by

sujiono
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

My Inbox Fiori App : Configuring Open Task Navigation using SWFVMD1

Introduction:

In this blog I am going to explain how to configure the My Inbox Open Task Configuration using
Transaction SWFVMD1.

Normally, We can call the Transactions of SAP GUI using BI_OBJECT~EXECUTE_DEFAULT_METHOD.


But sometimes users may ask Fiori applications when they need to check the relevant Fiori apps to
inspect for approval or rejection process.

We can achieve this by using SWFVMD1 Transaction.

Steps to follow:

Goto SWFVMD1 T-Code, choose worklist client as SAP UI5 My Inbox.

Then, Choose the Task Container of your workflow TSXXXXXXXX.


Choose the Visualization Type as Intent for Fiori Related Applications.

After choosing Visualization type, Click Parameters Exist Option,

For Example, If the user's want to navigate 'FBV3' application, Check the Fiori apps library to get the
respective Semantic Object, Semantic Action and Parameter-Value.

And then to pass the dynamic values to query, use the task binding parameters as like below.

Sample Output :
Summary:

In this blog, I have explained how to achieve navigation using SWFVMD1 Transactions for standard
Fiori Applications.

Please feel free to update this document and share your example for SWFVISU configuration.

Note: Some of workflow scenarios are not supported in My Inbox.


2378748 - Workflows with Approval steps with Exceptions as outcome are not supported in My Inbox

Function:

As you know there is the button "Open Task" in My Inbox if you use desktop PC or laptop PC.

It opens another window to execute the task.

If there is no configuration in the SWFVISU table, SAPGUI for HTML windows is opened in a separate
tab.
The URL is generated in the ERP backend.

http ://<host>.<domain>:<port>/sap/bc/gui/sap/its/webgui/?
~transaction=SWNWIEX&P_WI_ID=000001122380&P_APPL=NOTIF&P_ACTION=EXECUTE&~OKCODE
=ONLI&sap-ui-theme=sap_bluecrystal&sap-client=800&sap-language=EN

Please note that the "Open Task" button is not available in mobile and tablet devices because
SAPGUI for HTML or WebDynpro application which is opened does not fit in mobile and tablet screen
size.

By controlling URL generation with SWFVISU configuration, you can open existing application via
http. It helps for reducing app development workload if you use many different type of workflow
scenarios. You can use existing application for transition period until you develop custom Fiori app
for a dedicated object.

SWFVISU configuration has been used for long time in the Portal UWL and SAP Business
Client(NWBC). For example, when you execute a workitem in the Portal UWL, WebDynpro screen
comes up for executing an action.
The URL generation logic is in the class "CL_SWF_UTL_URL_GENERATE"

SWFVISU configuration:

If your support package of SAP_BASIS is old, check following notes.

BASIS Notes:

1966197 - UI execution link should reflect SWFVISU customizing

2009417 - Service class for generation of URLs

2069222 - No test environment available for generation of URLs

2082481 - Data element /IWWRK/RT_GUI_LINK_URL too

2185694 - Usability of transaction SWFVISU

2188428 - Optimization of SAP GUI for HTML URL generation

2200084 - Metadata for transactions SWFVISU and SWFVMD1

2230476 - Configuration of visualization type 'NONE' for objects

2286526 - Runtime error DBSQL_DUPLICATE_KEY_ERROR in class CL_SWF_UTL_UPDATE_00007

2288427 - No component name in URL for "Generic Application"

Let's look at the transaction SWFVISU in ERP.


There is a configuration Task ID - Visualization Type.

This table shows list of Visualization Type and flag for supported by My Inbox.

My Inbox
Visualization Type Notes
Supported

BSP BluePrint

BSP Standard X 2218632 - URL for BSP standard contains //

Java WebDynpro

2187457 - Parameter "sap-wd-configId" is not set for ABAP


ABAP WebDynpro X
Web Dynpro URL

iView Used in Portal UWL

Portal Component Used in Portal UWL

Portal Page Used in Portal UWL

Object-Based Navigation Used in Portal UWL

Object Not Represented X Does not display open task action

UI5 based on BSP X 2056158 - URL generation for UI5 applications (BSP)
My Inbox
Visualization Type Notes
Supported

My Inbox Generic
X 2178368 - URL generation for any application (My Inbox)
Application

Intent-Based Navigation X 2274940 - URL generation for intent-based navigation

Parameters:

A challenge is that you need to know the parameters to pass a dynamic value. Please share your
examples, when you have implemented.

Dynamic value:

Expression Description Example

{SYSTEM} Name of the back-end system (SY-SYSID) PRD

{CLIENT} Client (SY-MANDT) 005

{TASK} Work item task TS00008267

{WORKITEM} Work item ID 000006498715

{OBJKEY} Object key (_WI_OBJECT_ID.INSTID) 4711

{&EXPRESSION&} Any expression on the work item container {&_WI_OBJECT_ID.AMOUNT&}

You can find parameter name in the table SWFVVTP.

Task: TS########: Purchase Order approval


Mand
Type Parameter Example
atory

Generi
c
SCHEME X sapui5
Applic
ation

Generi
c APPLICATIO
X /sap/opu/odata/sap
Applic N_PATH
ation

Generi
c COMPONEN
X cross.fnd.fiori.inbox.annotationBasedTaskUI
Applic T_NAME
ation

Generi
c QUERY_PAR data=/sap/opu/odata/sap/CB_PURCHASE_ORDER_SRV;o=sid({SYSTEM}.
Applic AM00 {CLIENT})/PurchaseOrders(PurchaseOrder='{OBJKEY})'
ation

Generi
c QUERY_PAR annotations=/sap/bc/bsp/sap/bscnbon_anf_mm/
Applica AM01 bscbn_purchaseorder_anno.xml
tion

Generi
c QUERY_PAR
Max number of parameter is 09
Applica AM##
tion

Visualization Parameter for My Inbox to Approve Leave Requests

Business Add-Ins (BAdIs)

To extend My Inbox and add custom code in the Task Gateway Service, you can use the following
Business Add-Ins:
BAdIs in the Back-End System

The BAdI below is only relevant if you are implementing the My Inbox app for your SAP Business
Workflow.

 Before Update BAdI (/IWWRK/BADI_WF_BEFORE_UPD_IB)

You can use BAdI /IWWRK/BADI_WF_BEFORE_UPD_IB to handle decision runtime in the following
cases:

o Step type for the workflow task is not User Decision.

o You want to execute an action before the work item is updated with the user
decision.

For more information, see SAP Help Portal at http://help.sap.com under Technology Platform SAP
Gateway SAP Gateway 2.0 Content Information Content Guide SAP Gateway Content Guide SAP
Gateway Supported OData Channel Scenarios Workflow Services Workflow Task Service: Central
Hub Deployment with IW_BEP Backend Installation Workflow User Exits.

 To provide the custom attributes definition and data, an enhancement spot is provided on
the IW_BEP add-on (to be implemented on the backend system on which the IW_BEP add-on
is deployed). You can provide implementations filtered by the Task Definition ID. For this, you
must provide an implementation to the /IWWRK/BADI_TGW_CUSTOM_ATTR BAdI in the
/IWWRK/ES_TGW_CUSTOM_ATTRIBUTE enhancement spot. After implementing the BAdI,
you can consume the custom attribute as follows: Use navigation property
CustomAttributeDefinitionData in entity TaskDefinition to navigate to the
CustomAttributeDefinition collection.

BAdIs in the Task Gateway System

 Task Gateway: Change subject in query (/IWPGW/BADI_TGW_TASK_QUERY)

You can use this BAdI to change the task title for all items on the list screen.

 Task Gateway: Modify task data (/IWPGW/BADI_TGW_TASK_DATA)

You can use this BAdI to change the task title or task description on the detail screen.

 Task Gateway: Provide user details (/IWPGW/BADI_TGW_USER_DETAIL)

You can use this BAdI to change the user details on the detail screen.

For more information, see SAP Help Portal at http://help.sap.com under Technology Platform SAP
Gateway SAP Gateway 2.0 Content Information Content Guide SAP Gateway Content Guide SAP
Gateway Supported OData Channel Scenarios Workflow Services Workflow Task Service: Central
Hub Deployment with IW_BEP Backend Installation Workflow User Exits.

Define Custom Attributes (Dynamic Columns) for SAP Business Workflow Tasks

With custom attributes, you can define business-related properties and assign them to user tasks,
such as project ID or project name. You can expose custom attributes to My Inbox.
Use

Note

Please note that an active implementation of the /IWWRK/BADI_TGW_CUSTOM_ATTR BAdI takes


precedence over configuration done via the RSWD_MAINTAIN_USER_ATTR report.

In such a case only the custom attributes defined in the /IWWRK/BADI_TGW_CUSTOM_ATTR BAdI
will be displayed in My Inbox and those configured using the RSWD_MAINTAIN_USER_ATTR report
will not be shown.

Note

In case you use a central hub deployment, the configurations should be applied in the SAP Business
Suite backend.

Procedure

1. Log on to you Business Workflow system

2. Go to transaction SWL1

3. If you do not use EDIT mode, choose Display <-> Change

4. Click New Entries

5. Enter the following values:

a. User Name: Relevant user name or ‘*’ to support all users

b. Task : Relevant task type

c. Printout: Container element name by prefixing and suffixing ‘&’ character. Ensure
that the container element name is taken from the relevant task type, for example
'&NAME&'

d. Header: Desired label that is to be displayed in UI

6. Choose Save

7. Go to transaction SE38

8. Enter program name 'RSWD_MAINTAIN_USER_ATTR' and choose (F8)

9. Enter 'WF_INBOX_DC' in field Scenario Filter, and choose Execute, or press F8 key

10. Choose Import SWL1 Definitions

11. Click Continue or press Enter if an information pop-up window is displayed

12. Choose No within displayed pop-up windows to ensure the existing entries are not
overwritten

13. If predefined names are required instead of automatically generated custom attribute names
(IDs), perform the following steps:

a. Select relevant newly created rows

b. Choose Duplicate Entry, which creates duplicate rows with editable column Name
c. Change value in column Name

d. Select rows with auto-generated custom attribute name (prefix '/SWL/ALL/DYNCOL')


that needs to be deleted

e. Choose Delete Entry, and then Yes to confirm deletion

14. Click Save Entries

15. If custom attribute changes need to be seen for existing task instances, perform the following
steps:

a. Choose Reindex Runtime Data

b. Enter the relevant task type in the field Task

c. Click Execute or press F8

Note

Please, note that this feature is disabled in My Inbox by default. To enable it, the Administrator has to
configure an additional parameter showAdditionalAttributes=true in the Tile configuration of My
Inbox.

Result

As a result, you will be able to see the key-value pairs in the Details tab of the standard task UI of My
Inbox.

Note

If you are using a custom UI of My Inbox, the custom attributes will be visible as columns only if you
are using the Expert View of My Inbox.

the Purchase Order task UI is controlled by the gateway service C_PURCHASEORDER_FS.


So in order to get your newly added association, the SEGW project C_PURCHASEORDER_FS (mainly
the runtime artifact classes CL_C_PURCHASEORDER_FS_MPC_EXT and
CL_C_PURCHASEORDER_FS_DPC_EXT) has to reflect your requirement.

There are two important points for this:


1. You need to get your new association into the exposed data model (check transaction SEGW,
project C_PURCHASEORDER_FS ---> Data Source References ---> Exposures via SADL --->
select CDS-entity Exposures:

I guess in order to get your new association into the model you had to check the "selected"
checkbox of your association under C_PurchaseOrderFs. I didn't manage to do this using a
"redefinition" of the project (or a modification). So probably you have to create a completely
new project in SEGW with the same SADL-data source?

2. DEFINE method of your MPC_EXT class:


The UI facets of the Purchase Order Task UI are defined in the MPC_EXT class (at least in our
release).
This is class CL_C_PURCHASEORDER_FS_MPC_EXT in the standard service.
So I would expect that you have to add your facet annotation here (DEFINE method).

I assume the facet annotation in the CDS view has no effect / is overwritten by the definition
in the MPC_EXT-class.

Perhaps something like the following coding could help (without guarantee):

...

"define new facet

lo_record2 = lo_collection1->create_record( iv_record_type = 'UI.ReferenceFacet') ##NO_TEXT.

"Label

lo_property_value3 = lo_record2->create_property( 'Label' ) ##NO_TEXT.

lo_property_value3->create_simple_value( )->set_string_from_otr( '00505xxxxxxxxxxxxxxxxx' ). "


<<---- replace with the appropriate OTR label

"Target

lo_property_value3 = lo_record2->create_property( 'Target' ) ##NO_TEXT.

lo_property_value3->create_simple_value( )-
>set_annotation_path( 'to_PurchaseOrderApproval/@UI.LineItem' ) ##NO_TEXT.
Please also note :

If you create your own custom PO service as a copy from the standard, check the DPC-EXT class
adaptations! There are redefinitions in the class CL_C_PURCHASEORDER_FS_DPC_EXT which you
have to handle on your own when copying. Therefore a redefinition would always be the better
option - in case you solve point 1.

https://www.slideshare.net/slideshow/purchase-order-release-in-fiori/89156101

You might also like