Skip to Content

OData Annotation not working in Fiori Element app in WebIde

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

anno.png (56.8 kB)
anno4.png (37.8 kB)
ann01.png (41.3 kB)
ann01.png (41.3 kB)
ann01.png (41.3 kB)
anno2.png (46.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Oct 20, 2020 at 03:01 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • Posted on Oct 20, 2020 at 12:59 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded