Show TOC

UI-Element GanttLocate this document in the navigation structure

Use

You can find the Gantt UI element in the graphic category.

You can use this UI element to create a Gantt chart from an existing XML file. The JGantt control is used to do this, which is provided in the system independently of the Web Dynpro Framework. The JGantt control is a variant of the JNet control and can be used in various UI technologies.

Prerequisites

To implement the JGantt control, you do not have to take any precautions in the system. The control itself is a Java applet, which is executed at runtime in user agents.

The prerequisite for its actual use, however, is that the user agent (for example, the browser) of the user can execute the applet.

Use

The use of the Gantt element in Web Dynpro ABAP is comparatively simple. You only need one single attribute of type XSTRING in the context of your view. The XML file is passed at runtime to this attribute, which contains the data to be displayed. For instance, the XML file may have been created from an ABAP data structure using the transformation editor. Since the XML transformation can be used from the data structure to the XML file and the other way round, it is possible to store changes made within the displayed Gantt chart as data structures again in the back end.

Note

Note that the XML file must be specially adapted for the JGantt control.

The XML file is read automatically within the server using the XML parser provided there. This is all application developers need to be aware of for this.

To display the Gantt chart from the data of the XML file, it suffices to bind the property dataSource of UI element Gantt. Implementation of the entire set of events is optional as they provide functions beyond simply displaying the chart.

You would use some of the events if, for example, you want to write back to the ABAP data structure data that the user has changed in the Gantt chart.

Example

In the test application WDR_TEST_EVENTS that is implemented in your system you can find an example of the use of the Gantt UI element. For this application, an XML file has been created in the MIME repository of the system.

This XML file is not linked to a data structure in the ABAP back-end system, and therefore can only be used as a demo.

In the WDDOINIT method of the GANTT view, this XML file is passed to the context attribute of type XSTRING.