Skip to Content
0

Annotation Modeler error: label_Cannot read property '0' of undefined

Nov 01, 2016 at 08:34 PM

256

avatar image

Hi All,

I am trying to build a SAP Overview Page Application using Northwind service as backend. Here is my destination file odata.txt.

After creating Overview Page Application using Smart Template in SAP Web IDE, I made following changes.

In neo-app.json, I added '/destinations' to path of OData destination. And, in manifest.json, I added '/destinations' to 'uri' property of main data source. (Note: This is required to populate Entity Set dropdown when creating new card using New > Card UI.)

Now, when I create annotations/annotation.xml using New > Annotation File, the annotation.xml file is created successfully, and appropriate annotation entry is made in manifest.json.

But, if I try to open 'annotation.xml' with Annotation Modeler, the Annotation Modeler gives error: label_Cannot read property '0' of undefined (in Google Chrome)

.

This error is occuring specifically for Northwind OData Service. I tried same procedure for internal OData Service and Annotation Modeler worked really well.

Please help me on this.

Thank you,

Bala

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Zdravko Georgiev
Dec 07, 2016 at 03:38 PM
1

Hello Bala,

we have fixed this issue. The fix should be part of the Web IDE in the next days.

Best Regards,

Zdravko

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Zdravko. I am looking forward to the update. :)

0
Zdravko Georgiev
Nov 22, 2016 at 07:06 AM
1

Hello Bala,

thank you for pointing this issue out. We've identified the cause for the issues and are working to resolve it. I'll let you now, when the issue has been fixed.

Best Regards,

Zdravko

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Zdravko! If possible, please can you explain cause for this issue. :) And, please also tell if there are any work arounds apart from editing annotation.xml in Code Editor.

Kind regards,

Bala

0
Zdravko Georgiev
Nov 24, 2016 at 07:27 AM
1

Hi Bala,

it will be hard to explain it here in the forum. But short version is that the Metadata Model of the Northwind OData Service has slightly different structure than the Metadata Model of internal OData Services.

There is now work around apart from editing the annotation.xml in Code Editor.

Best Regards,

Zdravko

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Thanks Zdravko!

0

Hi Bala,

I'd like to reproduce your symptom, in order to provide an enhancement.
Which version of the Northwind service did you use? http://services.odata.org/V2/OData/OData.svc or http://services.odata.org/V3/OData/OData.svc?
We originally saw multiple schema definitions in one of the service, it is a limitation of the Annotation Modeler that it cannot handle this. But when I now check the services.odata.org version I can only find one schema as part of the metadata. Would you please check this again? Maybe the service was fixed in the meantime.
You could also attach your annotation file.

Best regards,

Stefan

0

Hi Stefan,

The northwind service I am using is http://services.odata.org/Northwind/Northwind.svc. (No specific version) And yes as you said there are two schemas in Metadata Document for this service.

The wierd thing is: I developed an overview app in August 2015 using this service and SAP Web IDE. At that time, annotation modeler was working. The app wasn't touched from August to November 2015. And in November for same annotation.xml file I received aforementioned bug. As first instinct, I compared metadata.xml in locaService folder with one online and they were matching.

The annotation file is the one which is created by default when we Right-Click annotations folder and then New -> Annotation File. See the code in:annotation.txt

The modified code is: modified-annotation.txt

(Please note that I have attached .txt files because this editor wasn't letting me attach .xml)

If you want to reproduce error, you should be able to do so by following steps in original post. :)

Please let me know if you need anything else.

Kind regards,

Bala

0