Skip to Content

SAP Annotations for OData Version 2.0 on .xsodata

Hi everyone,

I'm creating calculation views and exposing the data on an odata service (an .xsodata file in a Node.js module of a MTA). How can I add/change the SAP Annotations mentioned here https://wiki.scn.sap.com/wiki/display/EmTech/SAP+Annotations+for+OData+Version+2.0 (such as sap:addressable)?

I know that ABAP SEGW has checkboxes for some annotations, but how can we implement them using only WebIDE Full-Stack?

service {
  "Source" as "Source" keys("Id"); 
}
annotations{
  enable OData4SAP;
}
settings{
 support null;
}

Best regards,

André

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Dec 30, 2018 at 07:13 AM

    Hi Andre,

    I'm not sure how you do this in xsjs, but you can always add a UI5 module to your app and modify/add annotations in the UI5 app.

    https://help.sap.com/viewer/b3d0daf2a98e49ada00bf31b7ca7a42e/2.0.03/en-US/16f713d45f72429a8e4aca9fb5564d63.html

    --Uri

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Uri Nizan ,

      Thank you for the reply (specially at this time of the year). The end goal here is to add those .xsodata services as destinations on SCP, so we can create UI5 apps using FIori Elements templates to consume them.

      However, the wizard to create the UI5 apps reads the service's metadata during initial setup. As I can't set an entity as sap:addressable=true, nothing appears on the dropdown below and the UI5 app can't even be created.

      Unless I'm mistaken and you are suggesting to add a module to annotate the service somewhere before exposing it as a destination.

      Best regards,
      André

      wizard.png (95.4 kB)
  • Posted on Jan 14, 2019 at 08:12 AM

    Now I understand what you mean.

    It is true, Web IDE will only display addressable collections in the dropdown.

    However, I'm not sure how to change the addressable property to true in xsodata...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 11, 2019 at 05:02 PM

    we do have similar requirement, can you plz guide me how to do annotations in XSODATA.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.