SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... ·...

18
SAP Fiori Add a custom workflow in 6 steps

Transcript of SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... ·...

Page 1: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

SAP Fiori

Add a custom workflow in 6 steps

Page 2: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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

Page 3: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

SAP Fiori Approve Requests

Approve

Requests with

Generic Contents Business Enriched

Out of the box

Configuration

BADI

Out of the box

Configuration

Capital

Expenditure

Out of the box

(Framework/

Libraries)

Configuration

UI development

GW Service Dev.

Standard Apps Custom Apps

With “out-of-the-box” SAP Fiori, you can add any workflow scenarios with

generic contents to the SAP Fiori Approve Requests application.

Workflow scenarios

Launchpad

Page 4: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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.

Page 5: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

Examples: Notification of absence workflow demo

SAP Business Suite Non-SAP

SAP NetWeaver Gateway

Backend Systems

SAP NetWeaver

Gateway

3rd Party SAP Business

Suite

NetWeaver

BPM

Process Gateway

1

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

2 3

4

5

6

Page 6: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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

Page 7: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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 Rejected = R

BOR : FORMABSENC

Container handling or

Event handling

Page 8: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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)

Page 9: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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?sap-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

Page 10: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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

Page 11: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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.

Page 12: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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.

Page 13: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

Step 6a: Display application data [ERP]

You can include business data in the workitem description.

Transaction: PFTC

Page 14: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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

Page 15: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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

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

Page 16: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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.

Page 17: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

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: • CustomerExtensionForObjectListItem

• CustomerExtensionForObjectHeader

• CustomerExtensionForInfoTabContent

• CustomerExtensionForNoteTabContent

• CustomerExtensionForAttachmentTabContent

• CustomerExtensionForAdditionalTabs

You can also use the following UI control

IDs in Approve Requests: • ARNoteIconTabFilter

• ARAttachmentIconTabFilter

Field

Extensibility

1:1 relation to SAP model

Node

Extensibility

1:1 and 1:n relation to SAP model

Node

Extensibility

1:1 and 1:n relation to SAP model

Page 18: SAP Fiori Add a custom workflow in 6 stepsa248.g.akamai.net/n/248/420835/fadf6fd73d2c5ecceee... · Workflow scenarios in SAP Business Suite backend systems are up and running with

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

© 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.