SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程

注销發表於2020-09-08

Sample Overview

(1) developed via WebIDE:  rde-fiori.dispatcher.neo.ondemand.com  (2) extension on standard Fiori application: My Opportunity (3) source code could be found: github.com/i042416/test  (4) implemented feature: hide the standard tab “Participants”


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


Key points

(1) in Component.js, the following line is mandatory:


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


It is used to ensure all the source code of standard My Opportunity application are loaded with the path passed via fregisterModulePath method and stored in folder with structure as below ( Observed in Chrome development tool )


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


(2) in the source code automatically generated via WebIDE wizard, the standard Opportunity component is loaded with code below, via function sap.ui.component.load:


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


Through my testing, I find it is not necessary, so I just comment it out ( red part ) as below, and use jQuery.sap.require to load the standard component instead ( green part ).


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


(3) The hidden of “Participants” tab is achieved via viewModifications as displayed below:


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


The id “salesTeam” could be found in S3.view.xml of Opportunity project:


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


(4) If you deploy the extension project to ABAP repository and configure it as Fiori launchpad tile, the index.html is not needed when you access your extension project via launchpad. However if you would like to test your extension project locally in WebIDE by selecting “index.html” and click Run button in toolbar, then line 30 below is mandatory. It has the same purpose as the line mentioned in keypoint #one.


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


How to ensure your view modification take effect

Enter you extension project, now you could not see Participants tab in UI, and you could also observe the corresponding log in Chrome console.


SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2718722/,如需轉載,請註明出處,否則將追究法律責任。

相關文章