Skip to Content
0

Can't get annotation modeller working in SAP Web IDE

Mar 15, 2017 at 07:51 AM

433

avatar image
Former Member

Hi Experts,

the data sources in my metadata.xml looks like this:

The file exists within my project:

When I open the file I get the following error message:

Did I do something wrong? If not how can I report bugs to SAP regarding SAP Web IDE?

I briefly debugged the "AnnotationEditor.js" file and I actually think there is a bug in line 142:

As long as the uri is used instead of the "localUri" for this comparison I can't see how this can ever match. I mean the uri is:

"/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='%2FASCORPI%2FLINES_EXT_CDS_VAN',Version='0001')/$value"

in my case. That will never match a path in the project structure as far as I can see.

Thanks for help.

Regards

Tobias

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

2 Answers

Best Answer
avatar image
Former Member
Mar 17, 2017 at 10:07 AM
0

Hi Tobias,

Jamie is right, you have to adapt you manifest.json: you should not try to edit a localUri file, but only a uri file, and to this aim you have place a separate entry for your annotation file, as in the following example:

	"dataSources": {
			"SEPMRA_PO_MAN": {
				"uri": "/sap/opu/odata/sap/SEPMRA_PO_MAN/",
				"type": "OData",
				"settings": {
					"annotations": [
						"SEPMRA_PO_MAN_ANNO_MDL",
						"annotation2"
					],
					"localUri": "localService/SEPMRA_PO_MAN/metadata.xml"
				}
			},
			"SEPMRA_PO_MAN_ANNO_MDL": {
				"uri": "/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='SEPMRA_PO_MAN_ANNO_MDL',Version='0001')/$value/",
				"type": "ODataAnnotation",
				"settings": {
					"localUri": "localService/SEPMRA_PO_MAN/SEPMRA_PO_MAN_ANNO_MDL.xml"
				}
			},
			"annotation2": {
				"type": "ODataAnnotation",
				"uri": "localService/SEPMRA_PO_MAN/annotation2.xml",
				"settings": {
					"localUri": "localService/SEPMRA_PO_MAN/annotation2.xml"
				}
			}
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Stefan,

thanks for your reply. That makes totally sense. Just one last question. What's the meaing of the "SEPMRA_PO_MAN_ANNO_MDL.xml" file in your example. Is it like a local representation of the metadata of your service that should not be manipulated? Is it even visible in the project structure?

Regards

Tobias

0
Jamie Cawley
Mar 16, 2017 at 12:40 PM
0

Normally in your manifest the localuri of LINES_EXT_CDS_VAN is pointing to a local version of the annotations the service provides, usually something like localservice/LINES_EXT_CDS_VAN.xml. Also in the annotations node of LINES_EXT_CDS there should be a reference to localAnnotations which should be pointing to an additional dataSources with the localuri of annotations/annotations.xml.

You may want to generate a new fiori elements projects pointing to the service and annotation file and then compare the manifest.

Regards,

Jamie

SAP - Technology RIG

Share
10 |10000 characters needed characters left characters exceeded