cancel
Showing results for 
Search instead for 
Did you mean: 

GANTT Chart

Former Member
0 Kudos

Hi Guys,

I have got a requirement to display GANTT Chart on my BSP Application. I have seen a sample in SBSPEXT_PHTMLB -> ganttChartSample.htm.

I made a copy of this page in my own yBSPApplication and gave the rangeType to ganttChart by month. Here is the Sample code:

<phtmlb:ganttChart id = "gantt3"

background = "<%= background %>"

displayWeekends = "<%= displayWeekends %>"

rangeStartDate = "<%= rangeStartDate %>"

rangeEndDate = "<%= rangeEndDate %>"

rangeRows = "15"

>>>>>>>>> rangeType = "BY_MONTH"

title = "<%= title %>"

onRangeDown = "myRangeDown"

onRangeUp = "myRangeUp"

validate = "true" >

Problem is that it is not showing this in months or BY_YEAR?

Help required.

Thanks,

Usman Malik

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Very nice Alexandre,

Now I am able to generate XML. My question is that how to upload it into SAP and send values from ABAP to show this chart in BSP. Simply how to use this XML?

Thanks,

Usman Malik

0 Kudos

Ali,

Well, you have two ways:

1) upload your XML, see IF_GRAPH_CUSTOM_MODEL;

2) Build it up by yourself; take a look at CL_GRAPH_TEST_MODEL;

And then put in your layout page:

data: zsample_001 type ref to zcl_graph_test_model_001.
  create object zsample_001.
  zsample_001->vbep = pt_doc.
          %>
          <% if pt_doc[] is not initial.%>
          <htmlb:tray id        = "trayGrafico"
                      width     = "100%"
                      hasMargin = "false"
                      title     = "Orders' Chart " >
            <htmlb:trayBody>

          <graphics:chart igs_rfc_destination = "IGS_RFC_DEST"
                          width               = "1000"
                          height              = "400"
                          format              = "JPG" >
            <graphics:data model="<%= zsample_001 %>" />
            <graphics:custom model="<%= zsample_001 %>" />
          </graphics:chart>

Regards;

Alexandre

Former Member
0 Kudos

Any one who can help?

0 Kudos

Hey,

I recommend you to use the Char Designer.

The SAP Chart Designer is a tool for defining customizing settings for the Chart Engine (XMLCHART of the IGS).

Select a chart type, enter texts for the titles and change any other chart properties as required.

Then save your settings in the Chart Designer as an XML file.

You can now use this XML as the customizing input for your IGS chart, for example in your BSP application when using <graphics:chart>.

The customizing settings of your chart can easily be created by using the interactive SAP Chart Designer (see Downloads area of SDN - Web AS). After downloading it you also find the full description of the data XML within the package.

IF_GRAPH_CUSTOM_MODEL

IF_GRAPH_DATA_MODEL

Example:

data: zsample_001 type ref to zcl_graph_test_model_001.
  create object zsample_001.
  zsample_001->vbep = pt_doc.

          <graphics:chart igs_rfc_destination = "IGS_RFC_DEST"
                          width               = "1000"
                          height              = "400"
                          format              = "JPG" >
            <graphics:data model="<%= zsample_001 %>" />
            <graphics:custom model="<%= zsample_001 %>" />
          </graphics:chart>

Alexandre