<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Accessing chart values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-chart-values/m-p/3442935#M826829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;changing the customizing is definitely the wrong direction to go.&lt;/P&gt;&lt;P&gt;You have to change the content of the data container instead!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the demo report GFW_DEMO_PRES and push the graphics button on the right hand side to enable the chart. Then change a number within the table and press return. In debugging mode you will see that the modified table cell is written to the GFW data container (see MODIFIED_TAB_DC_100 INPUT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2008 15:36:57 GMT</pubDate>
    <dc:creator>kai_gutenkunst</dc:creator>
    <dc:date>2008-02-20T15:36:57Z</dc:date>
    <item>
      <title>Accessing chart values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-chart-values/m-p/3442934#M826828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I've got a huge problems with ABAP charts. There's a demo programm &lt;STRONG&gt;GFW_PROG_GET_CU_BUNDLE&lt;/STRONG&gt; of which copy I made. There's a button &lt;EM&gt;change_customizing&lt;/EM&gt; in the screen. &lt;/P&gt;&lt;P&gt;When You click that colors of chart bars will be changed. The chart label is changing too. The subprogram that stands behind that action is &lt;STRONG&gt;CHANGE_CUSTOMIZING&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  CHANGE_CUSTOMIZING
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM CHANGE_CUSTOMIZING.
  DATA: cuobj          TYPE REF TO IF_CUSTOMIZING,
        BUNDLE_DISPLAY TYPE REF TO CL_CU_DISPLAY_CONTEXT,
        title          TYPE GFWLABEL,
        color          TYPE I.

* get customizing object for drawing area
  CALL METHOD GP_INST-&amp;gt;IF_GRAPHIC_PROXY~GET_CU_BUNDLE
    EXPORTING PORT        = IF_GRAPHIC_PROXY=&amp;gt;CO_PORT_CHART
              BUNDLE_TYPE = CL_CU=&amp;gt;CO_CLSID_DRAWING_AREA
    IMPORTING BUNDLE      = cuobj.
* toggle title
  if not cuobj is initial.
*   get current title
    CALL METHOD cuobj-&amp;gt;GET
      EXPORTING ATTR_ID = CL_CU_DRAWING_AREA=&amp;gt;CO_TITLE
      IMPORTING VALUE   = title.
    if title = CO_GFW_PROG_TITLE1.
      title = CO_GFW_PROG_TITLE2.
    else.
      title = CO_GFW_PROG_TITLE1.
    endif.
*   set new title
    CALL METHOD cuobj-&amp;gt;SET
      EXPORTING ATTR_ID = CL_CU_DRAWING_AREA=&amp;gt;CO_TITLE
                VALUE   = title.
  endif.

* get customizing object for value
  CALL METHOD GP_INST-&amp;gt;IF_GRAPHIC_PROXY~GET_CU_BUNDLE
    EXPORTING PORT        = IF_GRAPHIC_PROXY=&amp;gt;CO_PORT_CHART
              KEY         = co_gfw_prog_series1
              BUNDLE_TYPE = CL_CU=&amp;gt;CO_CLSID_VALUES
    IMPORTING BUNDLE      = cuobj.
  if not cuobj is initial.
*   get display context
    CALL METHOD cuobj-&amp;gt;GET
      EXPORTING ATTR_ID = CL_CU_VALUES=&amp;gt;CO_CURVE_CONTEXT
      IMPORTING VALUE   = bundle_display.
*   toggle color
    if not bundle_display is initial.
*     get current color
      call method bundle_display-&amp;gt;if_customizing~get
        EXPORTING ATTR_ID = CL_CU_DISPLAY_CONTEXT=&amp;gt;co_bg_clr_plt_id
        IMPORTING VALUE   = color.
      if color = 5.
        color = 8.
      else.
        color = 5.
      endif.
*     set new color
      call method bundle_display-&amp;gt;if_customizing~set
        EXPORTING ATTR_ID = CL_CU_DISPLAY_CONTEXT=&amp;gt;co_bg_clr_plt_id
                  VALUE   = color.
      call method cuobj-&amp;gt;set
       EXPORTING ATTR_ID = CL_CU_VALUES=&amp;gt;CO_CURVE_CONTEXT
                 VALUE    = bundle_display.
    endif.
  endif.

ENDFORM.                    " CHANGE_CUSTOMIZING
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now my problem is: how should I modify that Form to change bar's height too (that is update source data for that chart). I see accessing to chart component is done like that:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*     set new color
      call method bundle_display-&amp;gt;if_customizing~set
        EXPORTING ATTR_ID = CL_CU_DISPLAY_CONTEXT=&amp;gt;co_bg_clr_plt_id
                  VALUE   = color.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and what should I do to have access to the Y dimension value of each chart bar? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to achieve such effect when user change some values in the screen - the chart will fit new data automatically .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd be very thankful for help . Greetings . P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 13:10:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-chart-values/m-p/3442934#M826828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T13:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing chart values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-chart-values/m-p/3442935#M826829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;changing the customizing is definitely the wrong direction to go.&lt;/P&gt;&lt;P&gt;You have to change the content of the data container instead!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the demo report GFW_DEMO_PRES and push the graphics button on the right hand side to enable the chart. Then change a number within the table and press return. In debugging mode you will see that the modified table cell is written to the GFW data container (see MODIFIED_TAB_DC_100 INPUT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 15:36:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-chart-values/m-p/3442935#M826829</guid>
      <dc:creator>kai_gutenkunst</dc:creator>
      <dc:date>2008-02-20T15:36:57Z</dc:date>
    </item>
  </channel>
</rss>

