cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with HCP Gateway Destination and neo-app.json

SandipAgarwalla
Active Contributor
0 Kudos

hello all

I am developing a ui5 app using hcp web ide. The application will be deployed to the HCP platform. we have created a destination in the HCP which points to the gateway server. I am bit confused how the Gateway Server and oData Model be referenced in the neo-app.json and Menifest.json

So in the neo-app.json, I have referred to the destination


{

      "path": "/sandboxgateway/sap/opu/odata",

      "target": {

        "type": "destination",

        "name": "GCN_Inbound",

        "entryPath": "/sap/opu/odata"

      },

      "description": "Connectivity to Gateway Sandbox(GCN)"

    }

In the Manifest.json, I have defined a datasource


"dataSources": {

  "ewm": {

  "uri": "/sap/opu/odata/<name>",

  "type": "OData",

  "settings": {

  "annotations": [],

  "odataVersion": "2.0",

  "localUri": ""

  }

  }

  }

and then defined a named model with the above data source


"ewmModel": {

  "dataSource": "ewm"

  }

Does this look correct? so when the component is instantiated, the odata model will be created automatically using the correct destination?

or, do I have to put the destination name as well in the datasource definition?

Thanks

Sandip

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Sandeep,

This looks correct to me. You don't have to mention the detination name again inside ewmModel:{}.

You can make use of the model as follows:

var oModel = this.getModel("ewmModel");

oModel.read("/<name>('abc')"),{}

Here, I have used <name> as per the following snippet in your query:

"dataSources": { 

  "ewm": { 

  "uri": "/sap/opu/odata/<name>", 

  "type": "OData", 

....

Hope this helps.

Regards,

Fahad