cancel
Showing results for 
Search instead for 
Did you mean: 

graph in smartforms

Former Member
0 Kudos

Hi gurus,

can anybody tell me how to print graphs,charts according to data in smartforms?

Thanks,

sanjay

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Sanjay.

I  have the same requirement as you had . Could you please tell me how u achieved Barchart in

Smartform? instead of getting it in Graphical editor.

Thanks,

Gowri

Former Member
0 Kudos

Hi Gowri,

Can you please tell me whether u were successful in creating BARCHARTS in smartforms. If so, can you please tell me the procedure.

IF we use the FM's

GRAPH_2D

GRAPH_3D .

GRAPH_MATRIX_2D

GRAPH_MATRIX_3D

what should be the exporting parameter so that DATA would be filled ?

Thanks,

Karthik.

Former Member
0 Kudos

Try using following FMs,

GRAPH_2D --Demo program GRBUSG_1

GRAPH_3D .--Demo program GRBUSG_2

GRAPH_MATRIX_2D--Demo program GRBUSG_3

GRAPH_MATRIX_3D--Demo program

Former Member
0 Kudos

Hi,

Go to the trx-DWDM and go for the option workbench demos and select the option graphics library, u get the programs that displays the graphics, u can refer to that and write code accordingly in ur program lines of the smartforms.

Linear graphs are not possible in smartforms however you can print barcharts.

1) Create a window resembling the bar with some background color.

2) Now create a table with one cell whose position and width overlap the created window. then according to the data you fill up the table, contents of the cell will be space.

3) That way the window will be reduced from the top and hence will represent a bar displaying data.

4) Similarly you can create other windows and their corresponding tables so that at the end it looks like a bar chart.

U can look at this wiki as well

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=...

Hope it helps.

Regards,

Manish

Edited by: MANISH GUPTA on May 22, 2009 7:14 AM

Former Member
0 Kudos

Hi,

May be you try like this...

Create a window and then use program lines...

Call the FM passing the internal table of the smartform interface...

CALL FUNCTION 'GRAPH_2D'

EXPORTING

TITL = TEXT-001

TABLES

DATA = DATA.

wherein 'DATA' is the internal table with the first column is a TEXT and the second one is a VALUE.

Regards,

Ram

Edited by: Ramakrishna Peri on May 22, 2009 10:32 AM

Former Member
0 Kudos

You create a window resembling the bar with some background colour.If you print the window, it will print like a bar with the colour that you have given.

Now, create a table with one cell whose position and width should overlap the created window.

Then according to the data you fill up the table (note that the contents of the cell will be space).

That way the widow will be reduced from the top and hence will represent a bar displaying data.

Silmilarly you can create other windows and their corresponding tables so at the end it looks like a bar-chart.It works well and I have done it.

First you try with one window and table.Let me know if you need more clarification.

Regards,

Sandip.

Edited by: Sandip Panigrahi on Apr 28, 2009 4:08 PM

Former Member
0 Kudos

Hi sandeep,

Thanks for your reply.but i didn't get it.i have to show simple graph,pie chart,bar chart according to data displayed in smartforms.plz explain,i will be highly obligue.

thanks,sanjay

Former Member
0 Kudos

demo programs in transaction GRAL might be useful

former_member7555
Participant
0 Kudos

Hi Sanjay,

Have you completed this?

If yes, Can you please explain me the procedure to display a chart on smart form according to the data we get from a table.

Thanks in advance.