Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

bhalchandraswcg
Contributor
0 Kudos
1,475

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

1 ACCEPTED SOLUTION

zdravko_georgiev
Product and Topic Expert
Product and Topic Expert
910

Hello Bala,

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

Best Regards,

Zdravko

8 REPLIES 8

zdravko_georgiev
Product and Topic Expert
Product and Topic Expert
910

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

0 Kudos
910

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

zdravko_georgiev
Product and Topic Expert
Product and Topic Expert
910

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

0 Kudos
910

Thanks Zdravko!

0 Kudos
910

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 Kudos
910

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

zdravko_georgiev
Product and Topic Expert
Product and Topic Expert
911

Hello Bala,

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

Best Regards,

Zdravko

0 Kudos
910

Thanks Zdravko. I am looking forward to the update. 🙂