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

SAP Fiori Add A Custom Workflow in 6 Steps

The document describes the steps to add a custom workflow to SAP Fiori Approve Requests. It covers getting workflow definitions, defining scenarios, adding tiles to Launchpad, defining decision options, implementing BADIs for decision updates, and displaying application data through various methods including BADIs and OData services.

Uploaded by

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

SAP Fiori Add A Custom Workflow in 6 Steps

The document describes the steps to add a custom workflow to SAP Fiori Approve Requests. It covers getting workflow definitions, defining scenarios, adding tiles to Launchpad, defining decision options, implementing BADIs for decision updates, and displaying application data through various methods including BADIs and OData services.

Uploaded by

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

SAP Fiori

Add a custom workflow in 6 steps


Agenda

 Overview
 Prerequisites
 Step 1. Get workflow definitions
 Step 2. Define workflow scenarios
 Step 3. Add a tile to Launchpad
 Step 4. Define decision options
 Step 5. Implement the BADI for decision update
 Step 6. Display application data

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 2


SAP Fiori Approve Requests

With “out-of-the-box” SAP Fiori, you can add any workflow scenarios with
generic contents to the SAP Fiori Approve Requests application.

Launchpad
Approve
Requests with
Generic Contents Business Enriched
Capital
Expenditure

Workflow scenarios Standard Apps Custom Apps


Configuration Configuration Configuration
BADI GW Service Dev.

UI development

Out of the box Out of the box Out of the box


(Framework/
Libraries)

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 3


Scenarios

Workflow scenarios in SAP Business Suite backend systems are up and


running with WebDynpro, SAPGUI and other UI.
Approvers can make a decision on their smart phone, tablet and desktop
devices.

In the following example, we will walk you through the procedure of


notification of absence workflow scenario.
The notification absence use container value for approve/reject decision.

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 4


Examples: Notification of absence workflow demo

Step 1. Get workflow definitions


Step 2. Define the scenarios
Step 3. Add a tile in Launchpad
Step 4: Define decision options
Step 5: Implement the BADI for decision update
Step 6: Display application data

SAP NetWeaver SAP NetWeaver Gateway


2 3 6
Gateway
Process Gateway

Backend Systems
1SAP4Business NetWeaver
SAP Business
Suite Non-SAP
BPM 3rd Party
5 Suite

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 5


Prerequisites

• The workflow scenarios in SAP Business Suite backend system is up


and running.
• SAP Fiori Approve Requests component is installed.
Component name is UIX01CA1

• SAP NetWeaver Gateway has been configured for SAP Fiori

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 6


Step 1. Get workflow definitions [ERP]

Before starting configurations, following


workflow details are required.
Transaction : PFTC
Workflow ID : WS30000015
Step ID : 48
Task ID : TS30000016
Task Type : Dialog
Outcomes : Approved = A Container handling or
Rejected = R Event handling

BOR : FORMABSENC

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 7


Step 2: Define the scenarios [Gateway]

A “Scenario” is an aggregation of one or more Workflow tasks in the Workflow


Engine and is represented by a single entry in the consumer application.

In the IMG, workflow approval tasks must be added to the scenario.

The Service /IWPGW/TASKPROCESSING is provided in the standard.

Consumer types are device types. (MOBILE,TABLET,DESKTOP)

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 8


Step 3: Add a tile to Launchpad [Gateway]

Start the launchpad designer

https://<hostname>.<domain>:<port>/sap/bc
/ui5_ui5/sap/arsrvc_upb_admn/main.html?sa
p-client=<Client>?scope=CUST

Add “App Launcher – Dynamic” tile.

• Service URL:
/sap/opu/odata/IWPGW/TASKPROCESSING
;mo/ScenarioCollection?$filter=key%
20eq%20'Z00_ABSENCE'
• Semantic Object: WorkflowTask
• Action: approveRequests
• Parameters: scenarioId=Z00_ABSENCE

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 9


Step 4: Define decision options [ERP]

As we are enabling an activity step type of Workflow, we need to specify


the list of decisions available to the task object.
This is done by declaring both the Workflow and step IDs, and the available
decisions.

Decision key mapping

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 10


Step 5: Implement the BADI for the decision update [ERP]

BADI : /IWWRK/ES_WF_WI_BEFORE_UPD_IB

Implement the BADI Implementation which maps the decision key to


outcome container result value.

CASE iv_decision_key.
WHEN 0001. "Approved
ls_container_line-value = 'A'.
ls_formabs-procstate = 'A'.
WHEN 0002. "Rejected
ls_container_line-value = 'R'.
ls_formabs-procstate = 'R'.
ENDCASE.

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 11


Step 6: Display application data [ERP]

There are 4 ways for displaying application data.


 6a By defining a work item description
 6b By implementing a BADI which builds the work item
description in HTML format
 6c By implementing an OData service and UI extension
 6d Via a PDF attachment. This is handled by the
workflow template.

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 12


Step 6a: Display application data [ERP]

You can include business data in the workitem description.


Transaction: PFTC

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 13


Step 6b: Display application data by BADI [Gateway]

3 Enhancement Spots are available in the task Gateway Service


• /IWPGW/ES_TGW_TASK_QUERY
Changing subject in query result
• /IWPGW/ES_TGW_TASK_DATA
Modifying the task title and/or task description
You can generate an HTML string which shows application data
in the workitem description area.
• /IWPGW/ES_TGW_USER_DETAIL
Modifying the user details

Link: help.sap.com

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 14


Step 6b: Display application data by BADI [Gateway]

You can include application data in HTML format by implanting the BADI.

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 15


Step 6c: Display application data
by BADI and UI extension point [Gateway]

You can add business context data by implementing the context service
or BADI.
• Context Collection in Gateway 2.0 SP06 (Version 1)
Context Collection

• Custom Attributes in Gateway 2.0 SP07 (Version 2)


Enhancement Spot /IWWRK/ES_TGW_CUSTOM_ATTRIBUTE
BADI /IWWRK/BADI_TGW_CUSTOM_ATTR

• You can enhance the Approve Request UI using extension points.

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 16


Step 6c: Display application data
by OData service and UI extension point [Gateway]

Approve Request Extension points

Approve Requests can be extended


using the following extension points: 1:1 and 1:n relation to SAP model
• CustomerExtensionForObjectListItem Node
Extensibility
• CustomerExtensionForObjectHeader 1:1 relation to SAP model
Field
• CustomerExtensionForInfoTabContent Extensibility
• CustomerExtensionForNoteTabContent
1:1 and 1:n relation to SAP model
• CustomerExtensionForAttachmentTabContent Node
• CustomerExtensionForAdditionalTabs Extensibility

You can also use the following UI control


IDs in Approve Requests:
• ARNoteIconTabFilter
• ARAttachmentIconTabFilter

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 17


© 2013 SAP AG or an SAP affiliate company.
All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or
warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group
products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing
herein should be construed as constituting an additional warranty.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in
Germany and other countries.
Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

© 2013 SAP AG or an SAP affiliate company. All rights reserved. 18

You might also like