Fiori CRUD End to End Scenario
There are many Fiori CRUD scenario implementations. How this one is different from others? It is based on SAP Template and represent best development practises. Besides of, it covers creation of CRUD OData Service and provides insight of what happens at back-end.
To begin with, create CRUD OData Service following Chandra Mahajan’s instructions in his blog. Please make a small change to ZUSERINFO_SRV ODataService to enable WebIDE template to see UserCollection Entity Set:
Note: if you do not have access to gateway system, then you can use cloud trial system as described in my blog.
Once CRUD OData Service is ready, proceed with Fiori application creation.
In HCP Cockpit create destination pointing to your gateway system (in my case it is ABAP 7.40 cloud trial system):
Then in WebIDE from menu choose File -> New -> Project from Template
Select SAP Fiori Application from Category drop down
Select CRUD Master-Detail Application template and click Next
Provide Basic Information and click on Next
Select you destination from drop down (NPL in my case)
Select ZUSERINFO_SRV from services drop down and click Next
Customize template as follows and click on Next
Click on Finish to complete project genetation
Note: generated Fiori application scope of functionality depends on DataService. Try to explore CRUD template with other services as well.
Run generated CRUD Fiori application
As you can see Query operation works providing a list of Users.
Click on Add button to test Create operation
Provide enter user details and press Save
Select just added entry and click Edit to test Update operation
Make changes and press Save
Finally test Delete Operation selecting the entry from master list and clicking Delete
Play with you generated Fiori CRUD application and explore it.
You can check data at back-end at any time in ZUSERINFO table.
You can also explore ZUSERINFO_SRV Data Service setting external break-points in OData Service implementation class. So during Fiori application execution it will take you in ABAP Debugger session.
Play with you back-end service enhancing it, for example, adding error handling for creation of duplicate entries.
Now if duplicated user entry is added, then Fiori provides a meaningful message
Hi Uladzislau Pralat
thanks for your great tutorial 🙂
I already follow all of your steps but,
when I try to create a new entity or edit entity all of my forms always
in not editable state.
So I can't fill my form.
Do you have any idea why I'm facing this problem?
Kind Regards
Firmansyah
Hi Hidayat,
have you tested your ZUSERINFO_SRV OData Service in Gateway Client (trx. /IWFND/GW_CLIENT) with POST and PUT methods (e.g. create and update records).
Regards, Uladzislau
Hi Uladzislau Pralat
ZUSERINFO_SRV OData Service in Gateway Client already tested,
see the following image:
Kind Regards
Firmansyah
Hi Uladzislau Pralat
I already solved my problem 🙂
My input form properties (in create view) is in enabled="false" state by default.
So, after I change this properties to "true" my apps works well for create and update .
Kind Regards
Firmansyah
Hi Firmansyah,
thank you for sharing your experience. The template get this enabled="false" property from OData Service definition (same as it requires entity set to be addressable see first image on my blog). You can play with properties of OData Service and figure out what makes the template to generate enabled="false".
Regards, Uladzislau
Hi Uladzislau,
Thanks for the tutorial. It is helpful as step 2 after Chandra Mahajan's step by step blog . Can you please share steps to configure a tile for this app after deploying it?
I found some blogs about configuring apps but they don't seem apt for this example.
Regards,
S
Hi S. vyas,
I was thinking to extend this tutorial up to Fiori launch Pad configuration, but unfortunately I do not have access to system SAP UI5 1.30 which Fiori Template requires. When I deployed to my system I have access to Fiori runs into error. It is too new version.
Regards, Uladzislau
Hi S. vyas,
here are two blogs you might need:
Deploy Web IDE Developed Fiori Application to Local ABAP Repository
Configure Fiori Launchpad for Custom Fiori Application
Regards, Uladzislau
Hi Uladzislau,
Thank you for the blog. But I am struck with a issue here. When I try to create a new ticket I am getting the popup (Sorry, a technical error occurred! Please try again later.) as you have mentioned but not able to see the details of the same.
Please provide your suggestions on the same.
Thanks,
Srinivasan
Hi Uladzislau Pralat
Great Blog. I Have completed all step as shown in Blog. And created launchpad using lpd_cust. How to create fiori apps.
With Regards
Meera
Hi Meera,
here are two blogs you might need:
Deploy Web IDE Developed Fiori Application to Local ABAP Repository
Configure Fiori Launchpad for Custom Fiori Application
Regards, Uladzislau
Hello Uladzislau Pralat,
Could you please let me know how did you find the URL of the backend system, that you have used in creating the destination ?
Many thanks for your input.
Abhihsek
Hi Abhihsek
Use the T-code: SICF and execute it.
follow the path defaulthost/sap/opu/odata/
right click odata and choose test services you will find the URL in your browser.
With Regards
Vaishali
Hello Meera Vaishali,
When i test the odata it is giving me error The server has not found any resource matching the Data Services Request URI
I took the same host name and port to create a destination with authentication but connection test is not successful.
Thanks for your suggestion.
Thanks,
Abhishek
Hi Abhishek Sinha
Can you give the screenhot for error which your getting
with regards
Vaishali
Hi Meera,
I am getting below error when testing the odata.
Hi Abhishek,
I think, Request URI in Gateway Client is incorrect. Please provide screenshot.
Regards, Uladzislau
Hi Uladzislau,
Below is the screen short :
for URL in destination i am using:
http://<host_name>:<port>/sap/opu/odata
Thanks,
Abhishek
Hi Abhishek,
please make sure that Gateway is active and alias is assigned (this is what I had to configure in my system to make it work)
Regards, Uladzislau
Hi Uladzislau,
I checked in my system. Gateway is active and alias is maintained.
In your example you said you have ABAP 7.40 cloud trial system.
I have normal SAP system with SAP_GWFND Component.
Hi,
Thanks for sharing the step by step procedure. You have mentioned to use cloud trail system and the corresponding link. but the link was broke, could you please provide alternative URL if any?
Thanks
Sravya
Hi Sravya,
I have updated the link. Please try again.
Regards, Uladzislau
Hello every body I got some problem regarding OData requests. I want to send explicit OData requests like oModel.read() same like we do it in Eclipse but the problem is that how can I build an OData Model using Service Catalog? My Service Catalog is working fine.
Hi Everyone,
Can we do similar App on SAP BW ?
Our requirement is to get user inputs via excel uploads from desktop and manual CRUDS and save them in BW for reporting purpose.
If anyone has done this ( Fiori Apps on BW) please share your experience or elements required for it.
Thanks in advance as this will be very helpful for us as we are very new to FIORI
Hi Mukesh,
any BW 7.4 and higher has built in Gateway and SAP UI5. You can definitely create Fiori Apps in BW. In one of my projects I used Fiori VizFrame and Fiori Launchpad Dynamic Tiles to create KPI Tiles similar to S/4 HANA KPI Tiles.
Regards, Uladzislau
Thanks Uladzislau,
Do you also have some blogs on BW fiori ? or some high level Step by step to share.
Thanks for your answer , this will help us to do POC on BW 7.4
I will write a blog when I have time
Hi Uladzislau Pralat
thanks for sharing such a great tutorial.
I am following all your steps but,when I create a new fiori application it's showing wrong values instead of exact values which i have in my gateway system. But when I check the ODATA service i am getting proper values.
Can you please help me to resolve this.
Regards
Nagamani
Hi Nagamani,
only I can think of is that you run the app with mock data.
Regards, Uladzislau
Hello ,
Thanks for amazing tutorial 🙂