on ‎2007 Nov 26 6:13 PM
Hello all,
We are trying to customize the Gantt chart for a few weeks, without success... Our most concern is to add texts, for instance the task description in the node. We found the .xml file that is loaded (Typerepository_cpr.xml), and also managed to change colors, forms. But we don't know how to retrieve dynamically object data. Is there somewhere a documentation/table where we can find this link?
Thanks for your help.
Matthias
Request clarification before answering.
Hello Matthias,
has been a while since you posted this...but maybe you are still interested. Basically what you are trying to do is not possible without modification.
To display texts in the graphic part of the Gantt you need to use labels.
<node type="Gantt.CProjects.Node" id="469352A01D895482E10000000A4241A6_ND" rowID="469352A01D895482E10000000A4241A6">
<layer id="469352A01D895482E10000000A4241A6" index="0">
<label>Just a test</label>
....
</layer>
</node>
( you can find a detailed description here [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/lw/WebDynpro/JNet_JGantt%20Developer%20Documentation/schema/xml-spy/jnet-schema.html] )
By default labels for Gantt nodes are invisible, so you need to remove
<label>
<state type="Invisible"/>
</label>
for all layers in your Typerepository.
And now, how to add the description for your object. You have 2 options
A) In CL_DPR_UI_LOG_GANTT->TRANSFORM_ABAP_2_XML the XSLT Transformation DPR_UI_GANTT_XSLT is called. You can enhance the Import Table
IT_GANTT_DATA_ALL-BAR_DATA by adding a new field for the text. In the XSLT Transformation you need to add the text in the Layer of the Node as described above.
B) Within the XSLT Transformation you read the variable gantt-tree which contains the text already and add the text in the Layer of the Node.
I would recommend to use the first option as you will most definitely run into performance problems with the second.
In addition to the XSLT Transformation DPR_UI_GANTT_XSLT you also need to update DPR_UI_GANTT_XSLT_DELTA.
Hope that helps.
Regards, Andrea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Matthias,
I am planning to customise the graphic view to add some custom columns to the table view. But, I am not sure if this is possible in cProjects 4.5. If it is possible to add custom columns by customising, I would appreciate if you can give me some pointers to be able add the custom columns to the gantt.
Regards,
Gopal
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.