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: 

Graph in ALV Grid

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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..

0 Kudos

For more details go to se38 and type GFW* and do F4.