Running Fiori elements App on local VM with SAP Developer Edition
I would recommend to start reading this topic with my previous article Getting started with ODATA
In the previous part I have created a CDS view and exposed it as OData service. Now I want to build frontend as Fiori elements list report object page on this OData service. Using the standard tutorials for setup Visual Stusio Code and setup the prerequisites for SAP Gateway, the first fiori app was generated. But it was too early to be glad, because the preview of the application in the browser did not show any data.
Good, F12 says for the error request that we have to look into /IWFND/ERROR_LOG (do not forget to put /n before the transaction name, othervise it says "no such transaction").
- Activate OData service in the back-end (SAP_BASIS is higher than 752):
- On your Gateway System, execute transaction /IWFND/MAINT_SERVICE
- Click on the 'Add service' button on the header
- In the next page, under the System Alias field, select LOCAL
- Click on 'Get services' at the top
- In the list on the next page, select ESH_SEARCH_SRV
- Assign this to a package, or select 'Local Object' button
- Click 'Continue'
- The service is now active
And... got next error after that, but now on the next GetResponse action: "UI requires connectors ESH_CONNECTOR and ESH_CATEGORY to be active". Actually that's right, enterprise search is not configured on my local VM and I am not sure it is possible to configure it at all there.
So it is ZOO_DD_ACCOUNTS in my case and the whole url to get the data will be: http://vhcalnplci:8000/sap/opu/odata/sap/ZOO_DD_ACCOUNTS_CDS/ZOO_DD_ACCOUNTS
But if the OData service works fine, why it cannot be consumed by my fiori list app? After a lot of investigation, the trouble was in URI in manifest.json file. When I have generating Fiori List App I have entered wrong call of OData forgotten to remove debug parameter:
After removing it from manifest.json - here we are - first Fiori List App is up and running on local machine using OData disposed on SAP Gateway on local VM:
It is interesting, that I am still getting the same 400 error for enterprise search connectors and a lot of other errors in browser console, but the frontend app is running. So actually ES is not necessary for standard fiori app.
Articles used:
Setup VS Code https://developers.sap.com/tutorials/fiori-tools-vscode-setup.html
Generate Fiori Elements App https://developers.sap.com/tutorials/fiori-tools-generate-project.html
1797736 - SAP Gateway Troubleshooting Guide
SAP Gateway Configuration Guide https://help.sap.com/viewer/68bf513362174d54b58cddec28794093/7.4.17/en-US/eaf72651c294256ee10000000a445394.html
Activate OData Service on SAP Gateay https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/202110.000/en-US/1b023c1cad774eeb8b85b25c86d94f87.html
2359472 - Receiving message "User no longer logged on" using a SAP Gateway and Fiori Transaction
2776662 - "No service found for namespace", Name 'ESH_SEARCH_SRV', Version '0001'
Add Authorisation for OData Backend https://help.sap.com/saphelp_ssb/helpdata/en/6f/0e415370107d77e10000000a441470/frameset.htm
Postman tool for testing OData calls https://www.odata.org/getting-started/learning-odata-on-postman/
Comments
Post a Comment