‎2004 Nov 26 8:47 AM
Hi all,
Could any one tell me how to set the properties of the histogram generated by ALV output from program.
I want to display the value on top of the bar, by setting this property from program.
Manually i can do this by selecting the graph icon from the alv toolbar, and in the graph, right-click the bar, and from the context menu, select 'format data series', then choose 'Data labels' tab and then select 'Show value'.
Thanks in advance.
regards,
Anup
‎2004 Nov 26 3:54 PM
Hi Anup,
the ALV uses the GFW for displaying the chart. If you need some programming examples please have a look at gfw_prog_* in se38 and see the customizing classes of the GFW in se24 (cl_cu_*).
Regards, Kai
‎2004 Nov 26 9:36 PM
Hi Anup
Yes, ALV Grid uses GFW for the graphics. However, it encapsulates the graphic object and let's your intervention to some extent. To do so, you can use the parameter at the interface of the method "<b>set_table_for_first_display</b>". Here is the information about the parameter:
<u><b>IT_ALV_GRAPHICS</b></u>
<i> Settings for displaying the ALV list as a diagram (for example, axis labels). The row type of the table has two fields (variables/value pairs):
PROP_ID : Assign a constant attribute of the class CL_ALV_GRAPHICS_CU with prefix CO_PROPID_ to this field to determine the changes to be made to the graphic. Use the CL_ALV_GRAPHICS_CU=>CO_PROPID_TITLE attribute, for example, to refer to the title of the diagram.
PROP_VAL : The value of the relevant topic, for example, 'My Title'.</i>
You can also find <b>GFW</b> programs as "<b>GFW_DEMO_*</b>". If you want, you can prepare your own graphics and override the standard graphics function of the ALV Grid or add your own graphics functionality. For these you can refer to <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference for ALV Grid Control"</a>.
Kind regards...
*--Serdar