Skip to Content
0
Former Member
Nov 19, 2013 at 02:14 PM

How to fix this Chart ?

26 Views

Hello guys.

I am trying to make an Gantt Chart... Through some questions that I asked here, I am in the middle of the project... but I have some difficulties.

I created the chart through SAP CHART DESIGNER, and now I want that from table to take the values and put them into the CHART.

I have from the selection of the table, 12 categories , and every category has a Start Date and an End Date. I used this code:

APPEND '<?xml version="1.0" encoding="utf-8"?>' TO lt_data_text.

APPEND '<ChartData> ' TO lt_data_text.

LOOP AT lt_str INTO ls_str.

APPEND '<Categories>' TO lt_data_text.

APPEND '<Category>' TO lt_data_text.

APPEND ls_str-aganr TO lt_data_text.

APPEND '</Category>' TO lt_data_text.

APPEND '</Categories>' TO lt_data_text.

val = '<Series customizing="' && count && '">'.

APPEND val to lt_data_text.

CLEAR val.

APPEND '<Point>' TO lt_data_text.

val = '<Value type="time">' && ls_str-swork && '</Value>'.

APPEND val TO lt_data_text.

CLEAR val.

val = '<Value type="time">' && ls_str-ework && '</Value>'.

APPEND val TO lt_data_text.

CLEAR val.

APPEND '</Point>' TO lt_data_text.

APPEND '</Series>' TO lt_data_text.

count = count 1.

ENDLOOP.

APPEND '</ChartData>' TO lt_data_text.

But with this Code, all the Boxes created from Start date and End Date apear but they appear only in the First Category!! The other categories stay empty!!

Can someone help me with this?