Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP charting capabilities (ABAP)

Former Member
0 Likes
1,170

Hi everybody,

I did some research into SAP's charting capabilities and I am a little confused about the different ways charts can be created.

One key feature I need in my charting application is event handling, for example when a user clicks on a pie wedge.

Right now I see three different ways of creating charts in ABAP

- Using the GRAPH_... function modules for example GRAPH_2D

- Using the Graphical Framework as in GFW_PROG_TUTORIAL

- Using the CL_GUI_CHART_ENGINE class

Is there any major difference between these three? I know that GFW and CL_GUI_CHART_ENGINE support event handling. Do the GRAPH_... FuBas so?

BTW, is it possible to use the xml file created in Chart Designer in one of the aforementioned solutions?

Thanks everybody,

Mane

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
1,074

you can use the XML along with cl_gui_chart_engine.

hope you would have seen the demo program

GRAPHICS_GUI_CE_DEMO

6 REPLIES 6
Read only

athavanraja
Active Contributor
0 Likes
1,075

you can use the XML along with cl_gui_chart_engine.

hope you would have seen the demo program

GRAPHICS_GUI_CE_DEMO

Read only

0 Likes
1,074

Unfortunately I can't access this program. I am working on a 470 system and it looks like there is no such report.

Read only

0 Likes
1,074

sorry, that program is available only from WAS6.40. it uses the IGS engine

Read only

0 Likes
1,074

I created a test program using GFW but unfortunately I didn't find any help for the values of the constants defined in CL_CU_VALUES.

I know that I have to use IF_CUSTOMIZING->SET with the constants from CL_CU_VALUES, but nothing about the values to change those values, is there anything out there?

I also tried the CL_GUI_CHART_ENGINE and it works pretty fine, although the xml encoding for the data is a pretty ugly. Is there a way to provide the data as table?

Read only

kai_gutenkunst
Product and Topic Expert
Product and Topic Expert
0 Likes
1,074

Hi,

using the chart engine is definitely the right choice!

As the chart engine is shipped as a SAPGUI control and as part of the IGS it's up to you which technology fits your needs best.

If you do not want to struggle with XML coding I suggest that you implement a method once that simply converts your tables to an iXML document.

However, I do not want to hide that the attributes of the old technology GFW are documented in se24 directly. Just select the attribute and push F9.

Regards, Kai

Read only

Former Member
0 Likes
1,074

This code snippet shows how to use function GFW_PRES_SHOW.

...data gathering

*__Make data format

DATA: lv_cnt(2), lv_text(30).

REFRESH values.

REFRESH column_texts.

SORT it_gra BY zcono.

*__Row definition

LOOP AT it_gra.

lv_cnt = sy-tabix.

CONCATENATE 'VALUES-VAL' lv_cnt INTO lv_text.

CONDENSE lv_text.

ASSIGN (lv_text) TO <fs>.

<fs> = it_gra-cnt.

ENDLOOP.

*___Row Text

values-rowtxt = '??????'.

APPEND values.

*__Column definition

LOOP AT it_gra.

column_texts-coltxt = it_gra-zcono.

APPEND column_texts.

ENDLOOP.

*___Call graph function

CALL FUNCTION 'GFW_PRES_SHOW'

EXPORTING

presentation_type = 31 "graph type 31 = pie type, 8 or 1 = bar chart

parent = contc "Custom Container

TABLES

values = values "row data(Maximun 32)

column_texts = column_texts " column definition

EXCEPTIONS

error_occurred = 1

OTHERS = 2.