cancel
Showing results for 
Search instead for 
Did you mean: 

CAPM/HANA: Problem adding a UI to CAPM app

UweFetzer_se38
Active Contributor
0 Kudos

Currently I'm playing around with the new Cloud Application Programming Model and I'm trying to solve some of the tutorials.

I'm on HANA Express Edition 2.0 SPS03 and the OData services of the apps are working already. But in the tutorial "Add a UI to Your Business Application" I getting a problem. The wizzard to create HTML5 Modules behave in two different ways, depending wether the app is a Java app or node.js app. For both I'm not able to create the module:

JAVA app

Create List Report Module

At the step where I should choose the service, I'm getting the following services (result differs from the tutorial)

If I choose (or expand) one of the services, I'm getting a 500 error

Obviously there is no service "._.CATALOGSERVICES_BOOKS", same with "._.MY_BOOKSHOP_BOOKS"

node.js app

In the node.js app I'm not even getting availible services in the wizzard

Any idea what I'm doing wrong? Appriciate any help.

Accepted Solutions (1)

Accepted Solutions (1)

UweFetzer_se38
Active Contributor
0 Kudos

With the help of john.patterson5 on Twitter I finally found the solution:

In the "List Report module" wizzard you cannot simply choose the service und "Current project". Instead you have to go to the Workspace and select the service there:

In addition you have to change some files, which the wizzard doesn't fill correctly (yet?):

In the mta.yaml file you have to add the "requires"-lines to the "app" chapter

  - name: app
    type: html5
    path: app
    requires:
     - name: srv_api
       group: destinations
       properties:
          forwardAuthToken: true
          strictSSL: false
          name: srv_api
          url: ~{url}

In the app/xs-apps.json you have to add the correct routes:

"routes": [
    {
    "source": "/odata/v2",
    "authenticationType": "none",
    "destination": "srv_api",
    "csrfProtection": false
    },
    { 
    "source": "^/(.*)", 
    "localDir": "resources" 
    } 
]

And finally you have to enter the correct URI into the app/resources/webapp/manifest.json:

		"dataSources": {
			"mainService": {
				"uri": "/odata/v2/CatalogService/",
				"type": "OData",
				"settings": {
					"localUri": "localService/metadata.xml"
				}
			}
		},


former_member620068
Discoverer
0 Kudos

For node js did you find a solution for the version error message ? i am still enable to add ui module

the logic you mentioned i think it applies only to java right?

UweFetzer_se38
Active Contributor

As Gregor already said, it's currently not possible to use OData V4 with SAPUI5 Fiori Elements List report

Answers (3)

Answers (3)

teejay
Participant

Fiori worklist template is available in cf webide for read only app.

Fiori Elements List Report is available in Service Preview

yuval_morad
Employee
Employee
0 Kudos

Do you use V4 or V2?

UweFetzer_se38
Active Contributor
0 Kudos

V2 (see "routes")

gregorw
Active Contributor
0 Kudos

Hi Uwe,

I think with node the issue is that it provides OData V4 but the SAPUI5 Fiori Elements List report does not support that yet. For the Java case: Have you tried to use the metadata file from the workspace that maybe was generated? It might be a good idea to check the procedure also in the SAP Web IDE Full Stack in the SCP Trial and deploy to the HANA in Cloud Foundry.

Best regard
Gregor

UweFetzer_se38
Active Contributor
0 Kudos

The metadata of the service looks good (nearly the same like in Cloud Foundry).

And yes, the app creation works in SAP Cloud environment. But shouldn't it be exactly the same on premise?