cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Launchpad - feature inquiry

Former Member
0 Kudos

hello all,

hope you are doing great!

I have a small yet very important query about HTML5 Application deployed in HCP which is registered in Fiori Launchpad and working fine. but I need a bit more functionality in launchpad which I have not been able to find.

So, I have one HTML5 application in which I am dealing with 2 processes (each process has its frontend with basic dynamic functionality like Buttons and onPress functions etc.). each process has its own view page. and everything is correctly programmed in index.htnl, component.js and manifest.json and working fine in sap web ide.

what I want now in fiori launchpad is to make 2 different tiles for these 2 processes which are present in the same html5 application.

what I did uptil now is:

I had this html5 app deployed in HCP so it appears in konto-apps section of my fiori launchpad site. I added this app to my fiori launchpad site and made a dynamic app launcher tile for this app. when I run my fiori site, this tile appears and when I click this tile, everything in my html5 app runs as it runs in sap web ide. I have 2 views in my html5 app. I added a button on view 1 which takes me to view 2 (view 1 -> process1, view 2 ->process2).

Fiori launchpad assigns its own URLs to different views of html5 app running inside it. so when I navigate to view2 from a button on view 1 (via routing mechanism), it goes to view 2 showing the URL for view 2.

but view 2 is process2 and I want to open it in a different tile as if its a different app so I made a new tile which is for the URL App type. when you make this tile, you need to provide the URL which this tile will open when clicked. so I assigned the URL of view 2 to this tile and its working.

But since URLs keep on changing all the time for many different reasons, its not a safe way for me to run my app in this way.

the only other option is to map the tile for view 2 in terms of folder structure of my html5 app like e.g. /webapp/view/View2.view.xml  instead of the URL presently assigned to it. So even if URL changes, this folder mapping in html5 will remain the same.

But i have not been able to find info how to execute this mapping according to folder structure of my html5 app. I have tried to map tile 2 to /webapp/view/View2.view.xml but it 404 not found error.

I have looked into portal service docu but not found much on this.

this is the only thing that is stopping me from using incredible Fiori Launchpad service. and if I dont get this info, I need to implement all Fiori Launchpad functionlaity on my own which will take a lot of time.

Does anybody has a solution to this or any idea leading to its solution?

It will be highly appreciated and will be a great help for other people implementing such thing in the future!

thanks

cheers,

Asaad

Accepted Solutions (1)

Accepted Solutions (1)

Murali_Shanmu
Active Contributor
0 Kudos

Hi Asaad,

Yes, using URL is not a good idea. Why did you end up having two processes in one App. It would have been easy if you created two Apps for each process. It also makes it easy to handle the assignment of the Apps to relevant roles.

One workaround would be to use the "Semantic Object parameters"  (under Navigation tab of App definition) when defining each tile. You can pass a hard-coded parameter and read this in the initial load of the application to trigger a navigation to the respective view.

Cheers,

Murali.

Former Member
0 Kudos

Hi Murali,

thanks for the reply.  I still have some confusion.

I am not accessig Firoi Launchpad from any ERP or ABAP system. I am just accessing it through portal service in HCP. I have seen many posts about detailed manipulation of Fiori Launchpad like semantic objects na dtheir actions etc. in SAP GUI using ERP system etc but in portal service, one cannot manipulate a lot.

In Fiori Launchpad for my use case, more or less you only end up with using parameters under intents. I have tried some things bit did not work out:

e.g. once I deployed html5 app on HCP and registered on launchpad. then I made an app inside launchpad mapped to this html5 app. and when I ran this app tile in launchpad, app worked as programmed in SAP WEB IDE. but since I wanted to display only one view inside this app in tis tile, I added mandatory parameter to this app navigation:

viewName   Detail   mandatory  (on navigation page of app)

Now, I went back to WEB IDE to change pattern of this view insode routes in routing in manifest.json. I changed the pattern as I expected the change in url.

"routes": [

 

  {

  "pattern": "?viewName=Detail",

  "name": "detail",

  "target": "detail"

  },

.....

.....

  ]

but it does not match. tried someother things too but in vain.

the problem is when I add parameter to this tile of app in launchpad. this tile no more appears on launchpad site which means that I cannot click on tile to even proceed to new url with parameter assigned by launchpad to this tile and see how url changed. so then its almost guessing whta it should be as therecan be so many possibilities. and the documentation does not explain proceeding in this way.

If you can further explain your idea of using parameters, that will be very hepful.

thanks

best regards

Asaad

Murali_Shanmu
Active Contributor
0 Kudos

Hi Syed,

I have not tried this from HCP Cloud Portal. But I think it should be possible. If you set a parameter while configuring the tile, you should be able to read the URL Parameter in the controller of the UI5 App.

You could use sap.ushell.services.URLParsing or even jQuery.sap.getUriParameters().get("MyParam") to get the value out and then decide which view to navigate to from within the first controller.


Cheers,

Murali.

meni_tito
Explorer
0 Kudos

Correct Murali.

Asaad, let me know if this solution worked for you.

Best,

Meni

Murali_Shanmu
Active Contributor
0 Kudos

Hi Syed,

I just tested it today and it works for me.

In your App configuration, add a parameter like below.

In your component.js file add the below line to extract the parameter value and then fire the navigation to the appropriate view.


this.getComponentData().startupParameters;



Hope this helps.


Cheers,

Murali

Former Member
0 Kudos

hi Meni,

I tried what Murali is saying but its not working for me fully. I have sent you the project in email to have a better look. as told its a very small project, just testing for 2 views. the detail description of the problem is written above! I have added the relevant code but dont know why its not working!

thanks

meni_tito
Explorer
0 Kudos

Hi Asaad, please let me know if the solution Murali is describing works for you.

Best,

Meni

Former Member
0 Kudos

Hi  Meni!

no what Murali told is not working for me.

cheers

Asaad

Answers (0)