cancel
Showing results for 
Search instead for 
Did you mean: 

Generate JGantt data XML at runtime

Former Member
0 Kudos

Hi,

I need to create an ABAP WebDynpro showing a Gantt with data calculated at runtime.

I was thinking about using the JGantt component because I need to show a Gantt with additional data for every row formatted inside a table, a la Microsoft Project. (I don't think that's feasible with the standard Gantt component, if I'm not mistaken).

The problem that I'm facing is that the JGantt component gets all its configuration AND data from a single XML file and I haven't found an example that shows how to generate that file at runtime.

Can someone help me with that or give me some hints (e.g. classes/methods I could use)?

Thank you,

Pietro

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Still struggling trying to figure out how to make that XML...

I was wondering if there is a standard helper class to generate it.

This is what I tried to do with several attempts:

<?xml version="1.0" encoding="iso-8859-1" ?>

<SAPJNetData version="1.0" xsi:noNamespaceSchemaLocation="JNet.xsd" >

    <Application type="GANTT" />

    <UserInterface>

        <Components>

            <ToolBar visible="false" />

            <StatusBar visible="false" />

        </Components>

    </UserInterface>

    <GraphGantt>

        <rows>

            <row id="R0" />

        </rows>       

        <dates format="dd.MM.yyyy" dateEnd="01.04.2013">

            <section date="01.01.2013" unit="DAY" unitSize="1" />

        </dates>

        <chart>

            <title>

                <text>Titolo</text>

            </title>

            <table>

                <rows>

                    <ids>R0</ids>

                </rows>

                <cols>

                    <ids>C0, C1</ids>

                </cols>

                <header typeCell="Gantt.CProjects.Label.ColHeader">

                    <header/>

                    <label colID="C1">Name</label>

                </header>

                <row id="R0">

                    <header>1</header>

                    <label colID="C1">Peter</label>

                </row>

            </table>

            <graph>

                <view>

                    <backColor type="white" />

                </view>

                <node id="N0" rowID="R0" type="Gantt.CProjects.Node">

                    <dates>

                        <date>01.01.2013</date>

                        <date>02.01.2013</date>

                    </dates>

                </node>

            </graph>

        </chart>

    </GraphGantt>

</SAPJNetData>

but this XML still generates an error and I can't figure out what's wrong with that.

Can someone kindly help me? Is there a step by step reference or guide on how to use that?

Thank you very much,

Pietro