Skip to Content
avatar image
Former Member

Can't get annotation modeller working in SAP Web IDE

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    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"
    				}
    			}
    
    Add comment
    10|10000 characters needed 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

  • Mar 16, 2017 at 12:40 PM

    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

    Add comment
    10|10000 characters needed characters exceeded