Show TOC Start of Content Area

Background documentation UI Element Gantt  Locate the document in its SAP Library structure

You can find the Gantt control in the graphic UI element library.

You can use this UI element to create a Gantt chart from an existing XML file. The powerful JGantt control is used to do this; it 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 that is executed at runtime in user agents. The prerequisite for its actual use,  however, is that the user agent (for example, the browser) can execute the applet.

Use

The use of the Gantt element in Web Dynpro for ABAP is comparatively simple. You only need one single attribute of type XSTRING in the view context. 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 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 dataSource property of the Gantt UI element. 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 System

In the WDR_TEST_EVENTS test application 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.

Caution 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.

 

 

End of Content Area