Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Different charts in BSP-Sites with the IGS


I use the Netweaver04 (90 Days License, SAP Demo) on Linux RedHat 8.0 and I

have really a lot of fun with the, for me, new techniques. Normally I work the

most in Output Management.

In BSP with Abap, I have visit some SAP courses on WAS 6.10.

Now to my problem. I want to learn the programming with the IGS (included in

the 6.40 WAS from the Netweaver04). It was no problem to get a bar chart.

But how can I get a Lines Chart ?

I use a modified sample Coding with the 'SimpleChartData' in my Model Class:


<u><b>ZCL_GRAPH_LOGS_MODEL Coding:</b></u>

data: ixml type ref to if_ixml,

document type ref to if_ixml_document,

root type ref to if_ixml_element.

data: s type string.

data: categories type ref to if_ixml_element.

data: series type ref to if_ixml_element.

data: streamfactory type ref to if_ixml_stream_factory,

ostream type ref to if_ixml_ostream.

data: begin of lwa_stat,

monat type char7,

count type i,

end of lwa_stat.

data lit_stat like standard table of lwa_stat.

loop at it_logs into wa_logs.

concatenate wa_logs-datum+0(4) '.'


into lwa_stat-monat.

move 1 to lwa_stat-count.

collect lwa_stat into lit_stat.


  • create document

ixml = cl_ixml=>create( ).

document = ixml->create_document( ).

  • create document root

root = document->create_element( name = 'SimpleChartData' ).

  • root = document->create_element( name = 'ChartData' ).

document->append_child( new_child = root ).

  • append categories section

categories = document->create_simple_element(

name = 'Categories'

parent = root


loop at lit_stat into lwa_stat.

s = lwa_stat-monat.


parent = categories

name = 'C'

value = s



  • append series section, negative values should have a leading minus sign

series = document->create_simple_element(

parent = root

name = 'Series'


loop at lit_stat into lwa_stat.

s = lwa_stat-count.


parent = series

name = 'S'

value = s



  • write data into string

streamfactory = ixml->create_stream_factory( ).

ostream = streamfactory->create_ostream_xstring( xml ).

document->render( ostream = ostream recursive = 'X' ).

<u><b>BSP-Site Coding:</b></u>


  • Grafik anzeigen


<%data: model type ref to ZCL_GRAPH_LOGS_MODEL.

create object model.

call method model->set_data( it_logs = it_logs ).%>

<htmlb:content id="grafik1" >

<htmlb:page title="Zugriffe">




<graphics:chart width="600" height="300" format="JPG" font_family="Arial Unicode MS" dimension="PseudoThree" igs_rfc_destination="IGS_RFC_DEST">

<graphics:data model="<%=model%>"/>



<?xml version="1.0" encoding="ASCII"?>

<SAPChartCustomizing version="1.0">







<Caption>Zugriffe auf das Intranet</Caption>

















Where can I find a Docu or an sample coding for build a Model Class for an

Lines Chart?

Thanks your support and Tips

Best Regards


Former Member
Not what you were looking for? View more on this topic or Ask a question