cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with OData binding

SimoneMilesi
Active Contributor
0 Kudos

  Hello all!

I'm facing some problems while i'm developing my first UI5 App.

Scenario

I've to present a list of HUs and the user can choose to move them under control quality (some or all) or out of control (Stock Q, speaking in abap )

What i did till now

I'm following this great article to generate the OData Service

but i'm not following it for the binding, preferring XML views over JS ones.

And so far i generated succesfully the service

Here the metadata

and the xml schema

My manifest.json looks like


{

  "_version": "1.1.0",

  "sap.app": {

  "_version": "1.1.0",

  "id": "sap.ui.demo.wt",

  "type": "application",

  "i18n": "i18n/i18n.properties",

  "title": "{{appTitle}}",

  "description": "{{appDescription}}",

  "applicationVersion": {

   "version": "1.0.0"

  },

  "dataSources": {

   "huRemote": {

  "uri": "http://<server>/sap/opu/odata/sap/ZHANDLING_UNIT_SRV/",

  "type": "OData",

  "settings": {

   "odataVersion": "2.0"

  }

   }

  }

  },

....

....

"sap.ui5": {

.....

....

  "models": {

   "i18n": {

  "type": "sap.ui.model.resource.ResourceModel",

  "settings": {

   "bundleName": "sap.ui.demo.wt.i18n.i18n"

  }

   },

   "huData": {

  "dataSource": "huRemote"

   }

  },

But i cannot see anything...

What i'm missing? anyone could give an hint?

Accepted Solutions (1)

Accepted Solutions (1)

sebastianraemsch
Active Participant
0 Kudos

Hi Simone,

It seems your binding syntax is not correct.

Please try:

<Table id="idHuTable"

inset="false"

items="{

  path: 'huData>/ZodataHuList',

  sorter: {

  path: 'Exidv'

  }

}">

Best regards,

Sebastian

SimoneMilesi
Active Contributor
0 Kudos

Hi Sebastian!

Yes, you are right, i forgot to add the >!!

I feel just "a bit" dumb!

Now i'm fighting with the (in)famous HTTP 401 error.

I already installed the chrome addon to allow cross-origin and i got rid of 404 error.

I wonder if there is a way to pass User and Password in Manifest

Answers (2)

Answers (2)

SimoneMilesi
Active Contributor
0 Kudos

Ok, i found out, i was on local without a proxy!

Thanks for all the help!

Former Member
0 Kudos

Hi Simone,

        Please change the text binding also.

-<cells>

<ObjectIdentifier title="{HU}" text="{huData>Exidv}"/>

<Text text="{huData>Matnr}"/>

</cells>

Regards,

Chiranth