Skip to Content

VizFrame on HANA XS OData service

Hi,

I am trying to build a VizFrame Timeseries Line Chart that shows data from a simple HANA XS OData service.

Does anyone have a minimalistic example that does that? All available examples I find use local JSON datamodels :-(

Thanks a lot,
Dietmar

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 27, 2018 at 09:56 PM

    SAPUI5 reference does show some examples using json files only. However, shouldn't that be easily changed to ODATA services in your implementation? I mean, most SAPUI5 models can be easily switched from ODATA to JSON and vice-versa with little coding changes.

    Does this case has something different?

    Thanks

    Bruno

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi! So your issue is much simpler.

      Based on this example, your metadata.json refers to a sap.ui.model.json.JSONModel model. You have to change that to a sap.ui.model.odata.ODataModel. Please consider that are other settings in metadata.json that needs to be adjusted in the model section for OData to work.

      Then, you'll have to adjust your data binding.Heres an example.

      Hope this helps

      Bruno

  • Posted on Mar 01, 2018 at 07:10 AM

    It is pertty much similar to bind JSONModel dataset except:

    1. call the oDataModel by calling

    sap.ui.model.odata.v2.ODataModel(URL, username, password) 

    2. you set this oDataModel to vizFrame by calling

    vizFrame.setModel()

    The rest of the definitons like FlattenedDataset and feedings are no difference than JSONModel binding.

    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.