Application Development 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: 

HOW TO creat BAR CHART using ABAP Programming

Former Member
0 Kudos
2,486

DEAR ALL,

I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.

Regards,

VJ

1 ACCEPTED SOLUTION

Former Member
0 Kudos
566

Hi,

Check this standard program for Bar chart

GRAPHICS_IGS_CHART_TEST

11 REPLIES 11

Former Member
0 Kudos
567

Hi,

Check this standard program for Bar chart

GRAPHICS_IGS_CHART_TEST

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
566

On earlier versions, you can do something like this.

[code]

REPORT ZRICH_0005 .

DATA: BEGIN OF ITAB_DATA OCCURS 0,

DATANAME(15),

QUANTITY1 TYPE I,

QUANTITY2 TYPE I,

QUANTITY3 TYPE I,

END OF ITAB_DATA.

Data: BEGIN OF ITAB_OPTIONS OCCURS 0,

OPTION(20),

END OF ITAB_OPTIONS.

ITAB_DATA-DATANAME = 'Maple'.

ITAB_DATA-QUANTITY1 = 5500.

ITAB_DATA-QUANTITY2 = 6200.

ITAB_DATA-QUANTITY3 = 5900.

APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Oak'.

ITAB_DATA-QUANTITY1 = 3500.

ITAB_DATA-QUANTITY2 = 5200.

ITAB_DATA-QUANTITY3 = 4400.

APPEND ITAB_DATA.

ITAB_DATA-DATANAME = 'Cherry'.

ITAB_DATA-QUANTITY1 = 1800.

ITAB_DATA-QUANTITY2 = 2200.

ITAB_DATA-QUANTITY3 = 1900.

APPEND ITAB_DATA.

CALL FUNCTION 'GRAPH_MATRIX_3D'

EXPORTING

COL1 = 'Jan'

COL2 = 'Feb'

COL3 = 'Mar'

TITL = 'Lumber Usage in $'

TABLES

DATA = ITAB_DATA

OPTS = ITAB_OPTIONS

EXCEPTIONS

OTHERS = 1.

[/code]

Regards,

Rich Heilman

Former Member
0 Kudos
566

Hi

Please check these standard programs

GFW_PROG_BAR

GFW_PROG_PORTFOLIO

GFW_PROG_SPEEDOMETER

GRAPHICS_IGS_CHART_TEST

krzysztof_konitz4
Contributor
0 Kudos
566

Hi,

Try transaction GRAL.

It will show you many examples...

Krzys

kai_gutenkunst
Advisor
Advisor
0 Kudos
566

Hi,

instead of using these very old graphics tools I recommend to use the Chart Engine instead (cl_gui_chart_engine / cl_igs_chart_engine). Download the SAP Chart Designer from SDN - Downloads first and start creating your charts.

Regards, Kai

0 Kudos
566

cl_gui_chart_engine / cl_igs_chart_engine

I downloaded the chart Engine but, can you give me some examples as to how to go ahead and create the barcharts on this tool.

Regards,

VJ

0 Kudos
566

Hi ,

I am still having problems in choosing the right function module Please suggest me with any more options in this matter.

Regards,

VJ

how to make this FM work please help!! i am getting a blank screen when i try to work this FM.

GFW_PRES_SHOW_MULT

0 Kudos
566

Hi VJ,

after starting the chart designer you see a Columns chart. Go to the Global Settings and change the property chart type, e.g. choose Bars in the list. That's all!

You can use the chart designer to create your customizing settings, save them as XML and use this XML within your application. Please also read the great web log about <a href="/people/thomas.jung3/blog/2004/08/31/bsp-150-a-developer146s-journal-part-x--igs-charting in BSP</a>.

Regards, Kai

0 Kudos
566

Kai,

Can you suggest me some sample code to use XML cosd in the application to generate Graph.

Regards,

VJ

0 Kudos
566

VJ,

please have a look at the programs

GRAPHICS_GUI_CE_DEMO (using chart engine locally as a SAPGUI control) and

GRAPHICS_IGS_CE_TEST (using chart engine of IGS).

Both programs use the iXML classes to generate data and customizing XML. But as mentioned before it's easier to use the Chart Designer for creating the customizing XML.

Regards, Kai

Former Member
0 Kudos
566

check this sample reports,

GFW_PROG_BAR

GFW_PROG_PORTFOLIO

GFW_PROG_SPEEDOMETER

Shreekant