2010 Sep 05 4:19 PM
Hi All,
I have ITAB like
Year Month Val1 Val2 total
2009 jan 120 150 270
2009 feb 130 180 310
2009 mar 111 190 301
2010 jan 220 150 270
Can anybody help in graphical logic.
The length of the vertical graphic is TOTAL , in same length i need 2 colors one is with VAL1 and another VAL2 for every month of the year.
i already tried GRAPH_MATRIX_3D, GRAPH_MATRIX_4D, GRAPH_MATRIX_2D.
I am not sure what options have to pass to OPTS table.
Can anybody tell me.
Thanks,
Kumar.
2010 Sep 05 6:07 PM
Hi,
Check this wiki link. There is an example program to create 3D program also.
https://wiki.sdn.sap.com/wiki/display/ABAP/SAP+Graphics
Hope it helps.
Sujay
2010 Sep 06 1:29 AM
Hi ,
Thanks for replay, i already checked that program, it not full filling my requirement, my question is i have 3 fields 1) TOTAL 2) VAL1 3) VAL2 in TOTAL Graph color i want to show VAL1 VAL2 has a different colors EX: if i have TOTAL 100 i.e VAL1 60 and VAL2 40 i want graph output only one vertical graph with 2 different colors. present it showing VAL1 value in one vertical graph VAL2 in one vertical graph with same color i want VAL1 VAL2 in one vertical graph with 2 different colors
Can anyone help me .
Thanks,
Kumar.
2010 Sep 06 6:33 AM
Hi,
Take a look at this program ....
data: begin of tab occurs 5,
class(5) type c,
val1(2) type i,
val2(2) type i,
val3(2) type i,
end of tab.
data: begin of opttab occurs 1,
c(20),
end of opttab.
move: 'fan' to tab-class,
12 to tab-val1, 8 to tab-val2, 15 to tab-val3.
append tab.
clear tab.
move: 'cool' to tab-class,
15 to tab-val1, 10 to tab-val2, 18 to tab-val3.
append tab.
clear tab.move: 'DA' to tab-class,
17 to tab-val1, 11 to tab-val2, 20 to tab-val3.
append tab.
clear tab.
opttab = 'FIFRST = 3D'. append opttab.
opttab = 'P3TYPE = TO'. append opttab.
opttab = 'P3CTYP = RO'. append opttab.
opttab = 'TISIZE = 2'. append opttab.
opttab = 'CLBACK = X'. append opttab.
call function 'GRAPH_MATRIX_3D'
exporting
col1 = '2008'
col2 = '2009'
col3 = '2010'
dim2 = 'Products'
dim1 = 'Years'
titl = 'Sales In Millions
tables
data = tab
opts = opttab
exceptions
others = 1.
leave program.
After displaying the graph , click on "Overview" ...
in Options(menu) --> click 2D Options --> In Graph Types select the 2nd Radio button "Stacked Vertical Bars"
Click Apply and then Continue.
I hope this is what you are looking for.
Regards,
Srini.
2010 Sep 07 1:46 AM
Hi Srini,
This program gives the graphical view but i want in other way
move: 'fan' to tab-class,
12 to tab-val1, 8 to tab-val2, 20 to tab-val3.
append tab.
clear tab.
move: 'cool' to tab-class,
15 to tab-val1, 10 to tab-val2, 18 to tab-val3.
append tab.
clear tab.move: 'DA' to tab-class,
17 to tab-val1, 11 to tab-val2, 20 to tab-val3.
append tab.
presently i am getting same way ,but my question is FAN values coming in two different vertical lines but i want all fan values into one vertical bar with 2 different colors. (ex: FAN values 12, 8, 20 ,,, 20 is total 12 and 8 i want to show in one vertical line )
Please any one help me.
Thanks,
Kumar