Fiori Adaption Project Preview error – missing OData Service

Published by Tobias Hofmann on

3 min read

You want to adapt a Fiori app. You were able to create the project and now want to preview the app in BAS or VS Code. Opening the preview page shows no error. Yet, the preview page of the app only shows an empty, gray page.

Problem: preview of app isn’t loading

Preview opens just a gray page. No more information, no message box, no pop. The app preview only shows a gray page.

Picture loaded. It is really just gray.

The console log contains several error messages, like failed to load i18n. At the end of the console log the root cause of the failing application preview is shown.

Root cause: The ODataMetadata failed to load.

Loading the app and looking at the network trace of the browser shows that the requests to the OData service in the backend fails.

While the application files can be loaded, the main part of the app – the OData service – cannot be loaded. And without the OData service working, the app and the preview won’t work.

Solution

The solution to the problem is very simple: activate the OData service of the app. Search for your app you want to adapt and activate it.

Transaction: /N/IWFND/MAINT_SERVICE

Calling the OData service should now return some data.

Annotations

In the network trace there was also a failed call to $value. This is the call to the annotations for the app / service. Of course, a call to the annotations must work too.

https://port8005-workspaces-ws.eu10.applicationstudio.cloud.sap/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName=’CMMFDOF_ORDER_FILL_ANNO_MDL’,Version=’0001′)/$value/?sap-language=DE

After activating the OData service, the call to the annotations should work.

Result

The adaption app can now load the original Fiori app as well as the OData services needed. The preview will now work.

Let the world know

Tobias Hofmann

Doing stuff with SAP since 1998. Open, web, UX, cloud. I am not a Basis guy, but very knowledgeable about Basis stuff, as it's the foundation of everything I do (DevOps). Performance is king, and unit tests is something I actually do. Developing HTML5 apps when HTML5 wasn't around. HCP/SCP user since 2012, NetWeaver since 2002, ABAP since 1998.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.