How to Extend a Fiori Application: Purchase Order Approval



Similar documents
Creating a Fiori Starter Application for sales order tracking

Extend the SAP FIORI app HCM Timesheet Approval

Create and run apps on HANA Cloud in SAP Web IDE

How-to guide: Monitoring of standalone Hosts. This guide explains how you can enable monitoring for standalone hosts in SAP Solution Manager

Open Items Analytics Dashboard System Configuration

Set Up Hortonworks Hadoop with SQL Anywhere

Consumption of OData Services of Open Items Analytics Dashboard using SAP Predictive Analysis

SAP BusinessObjects Business Intelligence 4 Innovation and Implementation

How to Implement a SAP HANA Database Procedure and consume it from an ABAP Program Step-by-Step Tutorial

SAP Landscape Transformation (SLT) Replication Server User Guide

SAP BW on HANA & HANA Smart Data Access Setup

Using SAP Crystal Reports with SAP Sybase SQL Anywhere

SAP PartnerEdge Program: Opportunities for SAP-Authorized Resellers

Installing and Configuring the HANA Cloud Connector for On-premise OData Access

Agentry and SMP Metadata Performance Testing Guidelines for executing performance testing with Agentry and SAP Mobile Platform Metadata based

Sybase ASE Linux Installation Guide Installation and getting started guide for SAP Sybase ASE on Linux

Using Database Performance Warehouse to Monitor Microsoft SQL Server Report Content

Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration. : SAP Labs India Pvt.Ltd

Memory Management simplifications in ABAP Kernel 7.4*

Setting up the Environment for Creating or Extending SAP Fiori Apps

SAP CRM Service Manager 3.1 Mobile App Extended Feature List An extended list of all the features included in the default delivery of the SAP CRM

LVS Troubleshooting Common issues and solutions

H2G Install SAP Web IDE locally for trial (Mac version)

Setting up Single Sign-On (SSO) with SAP HANA and SAP BusinessObjects XI 4.0

SAP Solution Manager - Content Transfer This document provides information on architectural and design questions, such as which SAP Solution Manager

SAP BusinessObjects Query as a Web Service Designer SAP BusinessObjects Business Intelligence platform 4.0

BW Source System: Troubleshooting Guide

Cloud Single Sign-On and On-Premise Identity Federation with SAP NetWeaver Cloud White Paper

Compare & Adjust How to Guide for Compare & Adjust in SAP Solution Manager Application Lifecycle Management

Nine Reasons Why SAP Rapid Deployment Solutions Can Make Your Life Easier Get Where You Want to Be, One Step at a Time

Additional Guide to Implementing the SAP CRM Service Management rapiddeployment

LHI Leasing Simplifying and Automating the IT Landscape with SAP Software. SAP Customer Success Story Financial Services Provider LHI Leasing

Information Design Tool User Guide SAP BusinessObjects Business Intelligence platform 4.0 Feature Pack 3

Certification Guide Network Connectivity for SAP on Premise and Cloud Solutions Integration

SAP Security Recommendations December Secure Software Development at SAP Embedding Security in the Product Innovation Lifecycle Version 1.

How To... Master Data Governance for Material: Create Custom Print forms. Applicable Releases: MDG 7

Fiori Frequently Asked Technical Questions

SAP BusinessObjects Dashboarding Strategy and Statement of Direction

Training.sap.com User Guide

End to End Development Example in SAP NetWeaver 7.4 & SAP HANA

CRM WebClient UI & Netweaver Enterprise Portal Integration

Setting up Single Sign-On (SSO) with SAP HANA and SAP BusinessObjects XI 4.0

Quick Guide to the SAP Customer Relationship Management Rapid- Deployment Solution (based on EhP1) Demo/Evaluation Appliance

SAP Sybase Adaptive Server Enterprise Shrinking a Database for Storage Optimization 2013

How To... Master Data Governance for Material: Maintenance for multiple Materials in one Change Request. Applicable Releases: all

SAP Thought Leadership Paper Engineering, Construction, and Operations. Beyond Enterprise Resource Planning Construction in the ipad Age

Five Strategies Small and Medium Enterprises Can Use to Successfully Implement High Value Business Mobility

How to Configure an Example SAP Cloud Applications Studio (PDI) Solution for SAP Cloud for Customer

How-To Guide SAP Cloud for Customer Document Version: How to replicate marketing attributes from SAP CRM to SAP Cloud for Customer

Design Thinking for. Requirements Analysis

Data Integration using Integration Gateway. SAP Mobile Platform 3.0 SP02

What's New in SAP BusinessObjects XI 3.1 Service Pack 5

SAP Work Manager 6.0 Mobile App Extended Feature List

Placing customers in the driver s seat to deliver amazing user experiences

Active Quality Management

SAP Business One OnDemand. SAP Business One OnDemand Solution Overview

Streamlined Planning and Consolidation for Finance Teams in Any Organization

How to Implement the X.509 Certificate Based Single Sign-On Solution with SAP Netweaver Single Sign-On

How-To Guide SAP Cloud for Customer Document Version: How to Configure SAP HCI basic authentication for SAP Cloud for Customer

SAP PartnerEdge Program Guide for Language Services Partners

Installation Guide: Agentry Device Clients SAP Mobile Platform 2.3

SAP White Paper Enterprise Information Management

Netmail Search for Outlook 2010

Implementing an Enterprise Information Management Strategy An Approach That Mitigates Risk and Drives Down Costs

How To Install The Sap Business Explorer 7.X 2.X (Sap) On A Windows 7.30 Computer (Windows 7)

Complementary Demo Guide

Secure MobiLink Synchronization using Microsoft IIS and the MobiLink Redirector

How to Extend SAP Cloud for Customer - SAP On- Premise Pre-Packaged Integration Content (PI/HCI)

SAP Fiori Infrastructure rapid-deployment solution: Software and Delivery Requirements

for Sage 100 ERP Business Insights Overview Document

How To... Migrate Custom Portal Applications to SAP NetWeaver 7.3

SAP BusinessObjects Enterprise Software Inventory Tool User's Guide

SAP BUSINESS PLANNING AND CONSOLIDATION 10.0, VERSION FOR SAP NETWEAVER, POWERED BY SAP HANA STARTER KIT FOR USGAAP

Tutorial: Mobile Business Object Development. SAP Mobile Platform 2.3 SP02

Tutorial: Mobile Business Object Development. Sybase Unwired Platform 2.2 SP02

SAP Mobile Documents. December, 2015

Tutorial: Mobile Business Object Development. SAP Mobile Platform 2.3

SAP HANA SPS 09 - What s New? Development Tools

Important Notes for WinConnect Server ES Software Installation:

How to Implement Mash Up to Show ECC Screen in SAP Cloud for Customer

SAP BusinessObjects Edge BI, Standard Package Preferred Business Intelligence Choice for Growing Companies

Citrix Receiver. Configuration and User Guide. For Macintosh Users

SAP BusinessObjects Web Intelligence Users Guide SAP BusinessObjects Business Intelligence Suite 4.0 Feature Pack 3

SQL Server 2005: Report Builder

Document and Data Retention Compliance Understanding and Addressing the Costs, Risks, and Legal Pitfalls

Customization of SAP Sales Manager 2.5

Single Sign-On between SAP Portal and SuccessFactors

K in Identify the differences between the universe design tool and the information design tool

HP Enterprise Integration module for SAP applications

How-To Guide SAP Cloud for Customer Document Version: How to Perform Initial Load of data from SAP ERP to SAP Cloud for Customer

BusinessObjects Enterprise InfoView User's Guide

HANA Input Parameters with Multi-Values to Filter Calculation Views

Scribe Online Integration Services (IS) Tutorial

AvePoint SearchAll for Microsoft Dynamics CRM

How to... Master Data Governance for Material: Use the Data Import Framework for Material. Applicable Releases: EhP6, MDG 6.1, MDG 7.

Citrix Receiver. Configuration and User Guide. For Windows Users

How-To Guide SAP NetWeaver Document Version: How To Guide - Configure SSL in ABAP System

SAP White Paper Enterprise Mobility. Best Practices for a Mobility Center of Excellence Keeping Pace with Mobile Technology

BusinessObjects Enterprise XI Release 2

Transcription:

SAP Web IDE How-To Guide Provided by Customer Experience Group How to Extend a Fiori Application: Purchase Order Approval Applicable Releases: SAP Web IDE 1.4 Version 2.0 - October 2014

Document History Document Version Authored By Description 1.0 Customer Experience Group 2.0 Customer Experience Group First release of this guide Update for SAP Web IDE release 1.4 2

TABLE OF CONTENTS 1. Business Scenario... 4 2. Background Information... 4 3. Prerequisites... 4 4. Step-by-Step Procedure... 5 4.1 Start creating a new EXTENSION Project... 5 4.2 Select Purchase Order Approval app from SAP Gateway... 6 4.3 Extend the app by hiding an existing control... 11 4.4 Extend the app by adding a new UI field to an extension point... 13 4.5 Extend the app by replacing a view... 18 4.6 Extend the existing OData service in Gateway Service Builder... 23 4.7 Replace the OData Service by an extended OData Service... 23 4.8 Extend the data model using the EDMX editor, then add a reference to the new data property in the UI logic... 28 4.9 Deploy the application to SAP Gateway... 33 4.10 Verify successful deployment of the app... 36 3

1. BUSINESS SCENARIO SAP Web IDE is a next-generation cloud-based meeting space where multiple project stakeholders can work together from a common web interface -- connecting to the same shared repository with virtually no setup required. It includes multiple interactive features that allow you to collaborate with your colleagues and accelerate the development of your HTML5/UI5 applications. 2. BACKGROUND INFORMATION In this How-To Guide, we will show you how to extend a standard SAP Fiori application using a SAP Web IDE. The different possibilities of extending a Fiori app view are shown (hide a control, extend by implementing an extension point, replace a view, replace a service. 3. PREREQUISITES To connect to your SAP Web IDE system, open the browser and enter the URL of your system. 4

4. STEP-BY-STEP PROCEDURE The following major steps will be described in detail step-by-step with screenshots for every step. 1. Start creating a new extension project 2. Select Purchase Order Approval app from SAP Gateway (GM0) 3. Extend the app by hiding an existing control 4. Extend the app by adding a new UI field to an extension point 5. Extend the app by replacing a view 6. OPTIONAL - Go into the Gateway Service Builder and show how to extend the existing OData service (separate document by Andre Fischer) 7. OPTIONAL - Replace the OData Service by an extended OData Service (assuming the existing OData Service has been modified by adding a new field) 8. OPTIONAL - (if OData Service replacement is not shown) - For demo purposes, extend the data model using the EDMX editor, then add a reference to the new data property in the UI logic 9. Run the application with mock data 10. Deploy the application back to SAPUI5 ABAP Repository 11. Verify that the app is deployed by importing the app from SAP Gateway to SAP Web IDE 4.1 Start creating a new EXTENSION Project Explanation Screenshot 1. Start SAP Web IDE from your browser. 2. Click on Local folder and start by creating a new extension project (File > New > Extension Project) 5

4.2 Select Purchase Order Approval app from SAP Gateway Explanation Screenshot 1. From step 1 in the wizard, click Remote..., and select SAPUI5 ABAP Repository to access the remote SAP Gateway system which has the standard SAP Fiori PO Approval application deployed. 2. In the Select Application from SAPUI5 ABAP Repository dialog, select the SAP Gateway System GM0 (GM0 Client 200). 3. All available applications on GM0 are shown. 6

4. Search for "purchase" to show search and filter capabilities 5. Select MM_PO_APV Approve Purchase Orders and click OK. 7

6. You may change the proposed project name to e.g. POApprovalExtended or leave it as proposed by SAP Web IDE MM_PO_APVExtension Then click Next. 7. Click Finish. An extension project is created in your workspace. 8. If authentication is required, enter User Name and PW for the SAP Gateway system. 8

9. The application Preview Pane automatically opens in Preview Mode. Once the application is loaded and the data has been fetched from the backend, you can see that the application is fully running. 10. Explore the features of the preview. a. Display the app in the different screen sizes b. When in Small size, change the orientation c. At the end, go back to Large or Medium size 9

11. In the application Outline, select the Show property Extensible Elements in the drop down list 12. Toggle to Extensibility Mode by clicking Preview Mode down arrow. Notice that the app gets a shadow. Hover the mouse of the controls in the app. Notice how views are highlighted and the scrolling occurs automatically. 10

4.3 Extend the app by hiding an existing control Explanation Screenshot 1. In the app, navigate to the view S4 by scrolling down in the detail view until you see the Items table, click on an item. Note: You may need to toggle off Extensibility Mode, because in Extensibility Mode you cannot navigate to other views. 2. We are going to hide the Pricing Conditions in the view S4. Make sure you are in Extensibility Mode. Select the Pricing Condition at the bottom of the view. To highlight the control you need to point the mouse pointer to the right or left side of the table. Alternatively, you may select in the Outline the PricingCondTable under S4. 3. Select Hide Control in the drop-down of Possible Extensions and click OK to hide it - busy indicator appears, followed by a popup message saying the extension was added successfully. Alternatively, you can rightclick on PricingCondTable in the Outline and select Hide Control 11

4. A pop-up window appears to indicate that the control is successfully hidden. Click Yes to refresh the application. 5. Navigate to S4 view and show the control was hidden 6. In Outline section, under Show field, drop down to select Extended Elements. Now, you can see that under S4 element PricingCondTable is listed as Hidden. 7. Close the Extensibility Pane by clicking on the X on the top right 12

4.4 Extend the app by adding a new UI field to an extension point Explanation Screenshot 1. Highlight the application folder and start the Extensibility Pane (Tools > Extensibility Pane or Ctrl-Shift-E) if not done yet. 2. In the application Outline section, select the Show property Extensible Elements in the drop down list 13

3. Expand S2 view in the Outline and select the extension point extlistiteminfo 4. Check that the possible extension at the bottom of the Application Outline shows Extend View and click OK. 14

5. Show that the extension point was successfully extended and click Yes to refresh the application 6. Check to see that the element extlistiteminfo displays (Extended). Select it and click Go to Code, Extension Code at the bottom. 15

7. You are redirected back to the Code Editor and the generated extension fragment file is opened 8. Paste the following code: <ObjectAttribute text="{i18n>view.purchaseorder. purchaseorderlabel}: {PoNumber}"/> 9. The filename has a prefixed * to indicate that the file has been edited and not saved. Click Save. 10. Run the app in the Extensibility Pane (Tools > Extensibility Pane) 11. You can now see the added purchase order number and the label in English. The value of the purchase order has been fetched from the backend. Check the detail view to verify the same purchase order number. 16

12. In the top bar, click on the down arrow next to the language English. Select another language, e.g. French. 13. Show that the language of the label has changed according to the language selected 14. Repeat for other languages. At the end, you may go back to English. 17

4.5 Extend the app by replacing a view Explanation Screenshot 1. Select S3 view (detail view) in the Outline. Notice the icon tab bar and remember the number of icons you can see. In the case of the screenshot, there are 2 icons (information and notes). Other POs may have other icons shown, depending on the PO data. 2. Select Replace with a copy of the parent view in the drop-down of Possible Extensions. Click OK. 18

3. On the success message, click No. There is no need to refresh the application at this moment, as we want to apply some changes to the code. 4. Check the application Outline to validate that the S3 view now has the indication of (Replaced with S3Custom) 19

5. Select S3 view in the Outline (if not already selected) and click Go to Code at the bottom. You are redirected back to the Code Editor and the copied view file opens. 6. You are redirected back to the Code Editor and the copied view file opens. 7. We will be adding more icon tabs to the tab bar. The file on the right contains the extension we want to apply. Open the file and copy the code. ViewReplacementCode.xml.txt 20

8. Paste the code to the S3Custom.view.xml file as follow: At line 31, you can find multiple <IconTabFilter items. Paste all the code before the <IconTabFilter items. 9. Click Save to save the file. 10. Select index.html, click Run to run the app. 21

11. Show the result. In this particular PO, we have 2 additional icons that have been added. At the end, you may close the Application Preview browser tab. 22

4.6 Extend the existing OData service in Gateway Service Builder (These steps are described in the guide Creating a Fiori Like Application - SO Tracking ) 4.7 Replace the OData Service by an extended OData Service Explanation Screenshot 1. Select your project folder and start a new wizard to replace the service (File > New > Extension) 2. Make sure the right project name is displayed in the text field. Click Next. 23

3. Click on Replace Service to select the OData Service replacing wizard, and then click Next. 4. At wizard step 3 (Data Connection), click on Service Catalog to get all available OData Services on the SAP Gateway system. Click the drop down list and select the Gateway system (GM0). The list of OData Services is being fetched. Scroll down the list to display all OData Services available on the Gateway system selected. 24

5. Search for "poapproval" to display search and filter capabilities. Expand the OData Service and show defined data collections for the OData Service ZGBAPP_POAPPROVAL_D EMO_SRV is shown here. Select the relevant OData Service, ZGBAPP_POAPPROVAL_D EMO_SRV. 6. Scroll down to WorkflowTaskCollection and expand it 25

7. Scroll down to the end of the WorkflowTaskCollection and show that the new field DemoExtension has been added 8. Go back up to the list, select ZGBAPP_POAPPROVAL_D EMO_SRV and click Next. 9. At wizard step 4, click Finish to confirm adding the extension. 26

16. We will now add a text field to the UI to display the extended OData field. Double-click the file extlistinfocustom.fragment.xml in the view folder. 17. Paste the following code: <ObjectAttribute text="odata Extension: {DemoExtension}"/> 18. The filename has a prefixed * indicating the file has been edited and not saved. Save the file. 19. Select the index.html file and Run the application. 20. You can now see the new OData field. 27

4.8 Extend the data model using the EDMX editor, then add a reference to the new data property in the UI logic Explanation Screenshot 1. Navigate to the project > model folder. You may want to close all other tabs. 2. Double-click on the file metadata.xml to open the file in the editor 3. Locate the EntityType with Name="HeaderDetail" You may use the search with Ctrl-f and enter the workflowtask in the search field. 28

4. Add a new property to this EntityType: <Property Name="NewField" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="new Field"/> 5. Save the metadata.xml file. 6. Now, we will be adding a UI text field in the detail view to display the added New Field. Open the file with the extension fragment in the view folder: S3Custom.view.xml Search for NewField by pressing Ctrl-f and enter newfield 29

7. Uncomment the block that contains the New Field definition by selecting the commented block 8. Edit > Comment > Toggle Block Comment 9. Save the file. 30

10. Now we will run the app with Mockdata to demonstrate that the new field is displayed by using the extended metadata.xml file. Select the file index.html of the application. Run the app (Run > Run with Mockdata). 11. Ensure that the URI is /sap/opu/odata/zgbapp_po APPROVAL_DEMO_SRV and Mock Data Source is Random data : Select project name, right mouse click, select Project Settings. Click on Mock Data, verify Mock Data Source. This will allow the system to generate data for the different data fields. 31

12. Verify that data has been generated. 32

4.9 Deploy the application to SAP Gateway (Note: It could also be deployed to HANA Cloud Platform) Explanation Screenshot 1. Go back to SAP Web IDE. You may want to close other open tabs and windows. 2. Select the project, right-click and select Deploy > Deploy to SAPUI5 ABAP Repository. 3. For the Deployment Options, select the system GM0 33

4. If authentication is required, enter User Name and PW for the SAP Gateway system. 5. Keep Deploy a new application selected and click Next. 6. Enter a name, e.g. Z_POAPP00 (the name needs to start with Z), enter any description and click Browse. Note: In Package field, $TMP is defaulted by the system if your system only support local object creation. Click Next. 7. Click Finish to deploy your application to the SAPUI5 ABAP Repository. 34

8. Wait for the successful feedback. Click on OK 35

4.10 Verify successful deployment of the app (by importing the app from SAP Gateway to SAP Web IDE) Explanation Screenshot 1. Select the Local Folder at the very top of the project list and create a new folder (right-click Local New > Folder) 2. Provide a name, e.g. POApprovalExtendedImporte d, and click Create. 3. Right-click the new folder and select Import > Application from SAPUI5 ABAP Repository 36

4. Select the system where the app had been deployed to (GM0) 5. Search for the app, e.g. Z_POAPP00 37

6. Select the app and click OK. 7. A pop-up window message indicates the import has finished. Click OK. 8. Run the application and verify the application is running 1. Select the file index.html of the application 2. Click on the Run 9. If authentication is required, enter User Name and PW for the SAP Gateway system. 38

10. The Application Preview is started, the application is loading and data is fetched from the OData Service. 39

www.sap.com 2014 SAP SE. All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, ianywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company. Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP SE 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.