cancel
Showing results for 
Search instead for 
Did you mean: 

Show page map not working for OData v2 apps

marcmaurí
Participant
0 Kudos

Dear Experts,

I developed 6 Fiori Elements apps with FE Tools on a CAP app. Two of them consume OData v2 services, and the other ones consume OData v4 services.

The Shop Page map functionality runs fine for the v4 apps, but it doesn't for v2, showing a blank screen instead of the pages structure.

I noticed that v2 apps were not detected by the Application Modeler:

I also noticed an error in the Application Modeler extensions log:

19:12:11 [ERROR] - Error getting config for project 'c:\Users\mmauri\ipWorkspace\sfcSandbox'. Error was: [Error: at Object.A [as readCapServiceMetadataEdmx] (c:\Users\mmauri\.vscode\extensions\sapse.sap-ux-application-modeler-extension-1.0.24\dist\extension-min.js:122:46010) at async ProjectProvider.readAnnotationFiles (c:\Users\mmauri\.vscode\extensions\sapse.sap-ux-application-modeler-extension-1.0.24\dist\extension-min.js:122:38847) at async Object.m [as generateSapuxConfig] (c:\Users\mmauri\.vscode\extensions\sapse.sap-ux-application-modeler-extension-1.0.24\dist\extension-min.js:357:792277) at async E (c:\Users\mmauri\.vscode\extensions\sapse.sap-ux-application-modeler-extension-1.0.24\dist\extension-min.js:594:70867) at async FioriToolsFSImpl.I [as _projectContentProvider] (c:\Users\mmauri\.vscode\extensions\sapse.sap-ux-application-modeler-extension-1.0.24\dist\extension-min.js:594:73321) at async FioriToolsFSImpl.readDirectory (c:\Users\mmauri\.vscode\extensions\sapse.sap-ux-application-modeler-extension-1.0.24\dist\extension-min.js:122:70831) at async ConfigTreeDataProvider.getChildren (c:\Users\mmauri\.vscode\extensions\sapse.sap-ux-application-modeler-extension-1.0.24\dist\extension-min.js:594:66423) at async m.fetchChildrenNodes (c:\Users\mmauri\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:661:883)]

For testing purposes, I created my v2 apps in two different ways:

- With Data Source "Connect to an OData Service" and http://localhost:4004 (where the service runs)

- With Data Source "Upload a metadata Document" and providing the CAP service metadata file.

And then I noticed some weird behavior: the Page map for V2 apps works fine if I add the app folder to the current Workspace, but stop working after reloading VSCode. I have prepared a short video to illustrate it, watch it here: gif / mp4

Any help would be appreciated.

Best regards,

Marc

detobin
Advisor
Advisor

Hi Marc,

I have raised an internal issue for the Application Modeler development team to look into the issue you have, and we should be able to get an answer to you.

Accepted Solutions (0)

Answers (2)

Answers (2)

klaus_keller
Contributor
0 Kudos

Hello Marc,

We are currently looking into this issue and discuss possible solutions. As a workaround for now, could you please try the following:
When you generate the v2 apps using "Connect to an OData Service" or "Upload a metadata Document", could select a target folder that is not nested into your CAP root folder (sfcSandbox)?

The file:

<cap_root>/package.json

contains a reference to the apps in the CAP project, in your case it should contain something like

"sapux" : [
  "app/v4_orders",
  "app/v4_workcenters"
]


When you add a project by selecting the URL to the service, it will not be added to the CAP project, but treated as a standalone project. We currently do not search for standalone projects nested within CAP projects.

Cheers,
Klaus

marcmaurí
Participant
0 Kudos

Hello Klaus,

Thanks! As a standalone app it is working fine.

I hope you can find some solution that allows us to have OData v2 apps working seamlessly in a CAP app. The templates available for OData v4 are not enough to build our business app unfortunately.

Best regards,

Marc

nicorunge
Participant
0 Kudos

Hi klaus.keller, stefan.schreck,

we have a combination of Fiori Element Apps using V4 and Fiori Freestyle Apps using V2. Opening any of the apps in "Show Page Map" leads to the following error messages:

Perhaps, this is also related due to the use of V2?

Thanks & regards

Nico

klaus_keller
Contributor
0 Kudos

Hi nau,
Do I understand it correct, that the issue is shown for V2 apps only?

To serve OData V2 services in CAP are you using @sap/cds-odata-v2-adapter-proxy?
The mixed OData V2/V4 scenarios in CAP are not supported bei SAP Fiori tools. To overcome this issue, please follow the comment above and create the V2 apps outside the CAP project (not in CAP_ROOT/app folder).

If you have a different scenario, please let us know a bit more on the setup and how the apps use the CAP services.

Cheers,
Klaus

stefan_schreck
Participant
0 Kudos

Hello Marc,
As a first step I checked if there are any recent corrections or issues that involve the given functions or the CAP scenario i general. Negative - nothing found. I will check the internal issue.

stefan_schreck
Participant
0 Kudos

Hello Marc,
We can reproduce the issue, but may I ask about your motivation for having the V2 and V4 services combined under one root folder?
Is there any real use case behind this?
Is it due to V4 limitations that you are using V2 services in parallel (as described at https://cap.cloud.sap/docs/advanced/odata#odata-v2-support)?
There would be less problems if you could define the V2 services outside from the CAP V4 folder. The combination makes the problem.
But anyhow how the tool-suite can support this mixed scenario.