cancel
Showing results for 
Search instead for 
Did you mean: 

OData Annotation not working in Fiori Element app in WebIde

Vijay
Active Contributor
0 Kudos

andre.fischer

Hi ,

I am trying to create fiori app using fiori element. I created OData service in SEGW and added annotation via code .in MPC_EXT , following this blog . I can see all the annotations in metadata.

I used Fiori List report template in webide to build app on top of this service. Unfortunately , I don't see annotation impact on output as in I could not see list header, nor I see details on the item details page. Am I missing anything here?

Thanks

Vijay

Accepted Solutions (1)

Accepted Solutions (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert

From the screen shots you show I can see that different namespaces are used for the targets

"ZE2E100_XX_3_SRV.SalesOrderItem"
"ZE2E100_XX_24_3_SRV.SalesOrder"

Whereas my coding uses the same namespace.

"annotations for entity type Sales Order
    lo_ann_target = vocab_anno_model->create_annotations_target( 'SalesOrder' ).
    lo_ann_target->set_namespace_qualifier( 'ZE2E100_XX_3_SRV' ).    "change the namespace to the SRV namespace

Another alternative would be to use the annotation modeler that comes with SAP Web IDE.

Vijay
Active Contributor
0 Kudos

I corrected the namespace and it worked like a charm. Thanks a lot Andre for your help with this.

Now I can try do this with required OData service.

It would have been easier doing it with WebIDE modeler , but the ask is it to do it via backend annotations only.

Good part is , this made me explore this possibility also :).

Thanks

Vijay

Answers (1)

Answers (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Do you have to use code based annotations?

That means are you working on SAP NetWeaver 740?

Or are you working on 750 or higher?

If this is the case I would recommend to add annotations via CDS views and or metadata extension files

Vijay
Active Contributor
0 Kudos

andre.fischer

Thanks Andre for your response!

Yes, I am working on NW 750+. But requirement is to add annotations to already built Gateway service and recreating the service with CDS based modeling might not be an option.

So, does that mean, code based annotation will not work here?

Thanks

Vijay