Skip to Content

SAPUI5 - GANTT-Chart - Use OData-Service (XML) to visualize shapes

Hello experts,

can anybody help me using the SAPUI5 GANTT-Chart with Table?

The example uses a json file to fill the tree table on the left side. With such a json it is easy to get the shapes on the right gantt-chart visualized.

But in our case we want to use an OData-Service with data from the ERP.


I've build the OData-Service to fill the tree table similiarly to this example: --> I've used the annotaion-option to get the hierarchy.

This works to build the tree table hierarchy. But my problem is now, how to visualize the different shapes on every hierarchy-step in the gantt chart.


var oGanttChartContainer = this.getView().byId("GanttChartContainer"); 
var oGanttChartWithTable = oGanttChartContainer.getGanttCharts()[0]; 
var sPath =  var sServiceUrl = http://##URL##/ZGANTT_ODATA"; 
var oModel = new sap.ui.model.odata.v2.ODataModel(sServiceUrl, { useBatch : true }); 
   path : '/Auftraege1Set', 
   parameters : {    
      expand : "ChildNotes",    
      numberOfExpandedLevels : 2,    
      navigation : {
          'Auftraege1Set' : 'ChildNotes'

Has anybody experience with this?

How am i able to "connect" the shape correctly to visualize them in the GANTT-Chart?

I did not find an example like this here, maybe anybody could help me to get this done?

Thank you.



Add comment
10|10000 characters needed characters exceeded

  • Hello,

    the hierachy works for me.

    But can anybody help me to get the shapes visualized?

    We have this Structure in XML:

    The Entity Element has an association to himself to load the Tree - this works.


    - SubElements

    - [0] - Detail SubElement...

    - Orders

    - [0] - StartTime, EndTime,...

    - [1] - StartTime, EndTime,...

    But now: How am i able to visualize the shapes out of ther "Orders"-Array which is an association from Element to Order?

    Can anybody help me how to solve this with the Row-Binding?

    Thank you!!!

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 12, 2016 at 02:21 PM

    If you download the code from same example, you will find the below lines, where the Gantt chart table is set property to get the shapes.

    oGanttChartWithTable.setShapeDataNames(["top", "order", "relationship"]);


    Downloaded example works perfectly for me.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 23, 2017 at 08:33 AM

    Hello Björn,

    did you find any solution for your problem? I do have a similar...

    Add comment
    10|10000 characters needed characters exceeded