ich habe Tabelle mit Daten in einem Dynpro. Dort drücke ich einen Button und eine Grafik mit GFW wird aufgebaut. Klappt super! Wenn ich nun das Grafikdynpro schliesse und die Daten und der Tabelle verändere und die Grafik wieder aufrufe werden die neuen Daten nicht genommen. Nur wenn ich das Programm verlasse und dann die Daten ändere werden die Daten übernommen! Was muss ich tun damit ich bei erneutem Aufruf die geänderten Daten angezeigt bekomme??
Danke für die Hilfe !
Gruss
Arne
retval = cl_gfw=>ok.
* if dc_manage is initial.
*erstellen und initallieren des Datencontainers
CREATE OBJECT dc_inst.
if sy-subrc <> 0.
clear dc_inst.
else.
dc_manage = dc_inst.
call method dc_manage->init
IMPORTING
id = my_id_at_dc
retval = retval.
if retval <> cl_gfw=>ok.
clear dc_inst.
clear dc_manage.
else.
**kann man mit Daten füllen
endif.
endif.
* endif.
if retval <> cl_gfw=>ok.
call method cl_gfw=>show_msg
EXPORTING
msgno = retval.
endif.
*****ENDE Erstellen eines Datencontainers
*Dem Datencontainer mitteilen, das Änderungen der Daten der Grafik mitgeteilt werden
if not dc_manage is initial.
call method dc_manage->distribute_changes
IMPORTING
retval = retval.
*Aktivierung des Multiplexers
CALL METHOD cl_gfw_mux=>activate
IMPORTING
retval = retval.
*Überprüfen ob start des Multiplexers erfolgreich war
if retval <> cl_gfw=>ok.
CALL METHOD cl_gfw=>show_msg
EXPORTING
msgno = retval.
endif.
*Objekt Chart daten anlegen!
* IF Chart_Daten IS INITIAL.
CREATE OBJECT Chart_Daten.
* ENDIF.
*________________________________
*Daten für den Chart füllen
Loop at IT_erg_anz where selected ne 'X'.
* tell the proxy where to use the bundle
call method gp_inst->if_graphic_proxy~add_cu_bundle
exporting port = if_graphic_proxy=>co_port_diagram
bundle = bundle_display
importing retval = retval.
* drawing area (used to set chart title)
create object bundle_drawing exporting instance_id = 'GFWTAS'.
* set title
call method bundle_drawing->if_customizing~set
exporting attr_id = cl_cu_drawing_area=>co_title
value = uschrift.
*call method bundle_drawing->if_customizing~set
* exporting attr_id = cl_cu_drawing_area=>CO_LEGEND_CONTEXT
* value = 1.
* tell the proxy where to use the bundle
call method gp_inst->if_graphic_proxy~add_cu_bundle
exporting port = if_graphic_proxy=>co_port_chart
bundle = bundle_drawing
importing retval = retval.
* set color of line and markers
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_bl_clr_plt_id
value = 1. " schwarz
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_mr_style
value = 2.
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_mr_bg_clr_plt_id
value = 1.
* copy display context into values
call method bundle_values1->if_customizing~set
exporting attr_id = cl_cu_values=>co_curve_context
value = bundle_display.
* set chart type
call method bundle_values1->if_customizing~set
exporting attr_id = cl_cu_values=>co_style
value = 34. " xy scatter
* tell the proxy where to use the bundle
call method gp_inst->if_graphic_proxy~add_cu_bundle
exporting port = if_graphic_proxy=>co_port_chart
key = 'Mittelwert'
bundle = bundle_values1
importing retval = retval.
* set color of line and markers
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_bl_clr_plt_id
value = 3. " rot
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_mr_style
value = 0.
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_mr_bg_clr_plt_id
value = 2.
* copy display context into values
call method bundle_values1->if_customizing~set
exporting attr_id = cl_cu_values=>co_curve_context
value = bundle_display.
* set chart type
call method bundle_values1->if_customizing~set
exporting attr_id = cl_cu_values=>co_style
value = 34. " xy scatter
* tell the proxy where to use the bundle
call method gp_inst->if_graphic_proxy~add_cu_bundle
exporting port = if_graphic_proxy=>co_port_chart
key = 'u.Grenzwert' "Name
bundle = bundle_values1
importing retval = retval.
* set color of line and markers
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_bl_clr_plt_id
value = 7. " schwarz
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_mr_style
value = 0.
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_mr_bg_clr_plt_id
value = 2.
* copy display context into values
call method bundle_values1->if_customizing~set
exporting attr_id = cl_cu_values=>co_curve_context
value = bundle_display.
* set chart type
call method bundle_values1->if_customizing~set
exporting attr_id = cl_cu_values=>co_style
value = 34. " xy scatter
* tell the proxy where to use the bundle
call method gp_inst->if_graphic_proxy~add_cu_bundle
exporting port = if_graphic_proxy=>co_port_chart
key = 'o.Grenzwert' "Name
bundle = bundle_values1
importing retval = retval.
* prepare display context for axis title
create object bundle_display exporting instance_id = 'dummy'.
* disable axis title
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_bl_style
value = 1.
call method bundle_axis_x->if_customizing~set
exporting attr_id = cl_cu_axis=>co_title
value = 'Zähler'.
* enable scrollbar of axis and set view port
call method bundle_axis_x->if_customizing~set
exporting attr_id = cl_cu_axis=>CO_VISIBLE_CATEGORIES_AUTO
value = gfw_false.
call method bundle_axis_x->if_customizing~set
exporting attr_id = cl_cu_axis=>CO_VISIBLE_CATEGORIES
value = 7.
call method bundle_axis_x->if_customizing~set
exporting attr_id = cl_cu_axis=>CO_START_CATEGORY
value = 1.
.
* copy display context into axis
call method bundle_axis_x->if_customizing~set
exporting attr_id = cl_cu_axis=>co_title_context
value = bundle_display.
* tell the proxy where to use the bundle
call method gp_inst->if_graphic_proxy~add_cu_bundle
exporting port = if_graphic_proxy=>co_port_chart_x_prim_axis
bundle = bundle_axis_x
importing retval = retval.
* tell the proxy where to use the bundle
call method gp_inst->if_graphic_proxy~add_cu_bundle
exporting port = if_graphic_proxy=>co_port_chart_y_prim_axis
bundle = bundle_grid_y
importing retval = retval.