05-27-2009 7:56 AM
Hi All,
I developed in alv grid and gave standard graph button.When I execute this report and click on graph button then graph shows fine. Now I select 3 columns in our alv report and then click on graph button then graph come fine.Now my question is can we give this 3 columns selection default so that user open alv report and direct click on graph button then graph should come by above 3 default selected column.
Thanks,
Rakesh
05-27-2009 8:29 AM
Hello,
When you click on the button check it how it is taking only 3fields in debugging, keep the condition in the condition for the FM.
OR before passing to the FM check filter the data before passing the values to the FM.
05-27-2009 9:54 AM
This Example will help u to solve your issue.
REPORT ZGRAPH.
DATA: BEGIN OF ITAB_DATA OCCURS 0,
DATANAME(15),
QUANTITY1 TYPE I,
QUANTITY2 TYPE I,
QUANTITY3 TYPE I,
END OF ITAB_DATA,
BEGIN OF ITAB_OPTIONS OCCURS 0,
OPTION(20),
END OF ITAB_OPTIONS.
ITAB_DATA-DATANAME = 'Rice'.
ITAB_DATA-QUANTITY1 = 55.
ITAB_DATA-QUANTITY2 = 62.
ITAB_DATA-QUANTITY3 = 59.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Wheat'.
ITAB_DATA-QUANTITY1 = 35.
ITAB_DATA-QUANTITY2 = 52.
ITAB_DATA-QUANTITY3 = 44.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Sugar'.
ITAB_DATA-QUANTITY1 = 18.
ITAB_DATA-QUANTITY2 = 22.
ITAB_DATA-QUANTITY3 = 19.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
COL1 = 'Jan'
COL2 = 'Feb'
COL3 = 'Mar'
TITL = 'Quantity Consumed In KG.'
TABLES
DATA = ITAB_DATA
OPTS = ITAB_OPTIONS
EXCEPTIONS
OTHERS = 1.
05-27-2009 9:59 AM
Hi Rakesh,
It is not possible to view the graph for 3 columns by the standard graph button in alv. Use the FM GFW_PRES_SHOW to see graphs for more than 2 columns.
Regards..
05-27-2009 10:03 AM