Probleme mit leave screen!

Benutzeroberflächen in SAP®-Systemen.
8 Beiträge • Seite 1 von 1
8 Beiträge Seite 1 von 1

Probleme mit leave screen!

Beitrag von scanner (ForumUser / 9 / 0 / 0 ) »
Hallo

ich habe zwei Dynpros! Dynpro 100 und 200. Auf Dynpro 100 zeige ich eine Liste mit Daten an. Drücke ich dort einen Button wird ein call screen 200 STARTING AT 20 1 ENDING AT 138 30.
ausgeführt und die Daten aus der Liste werden in einer Grafik angezeigt. Verlasse ich das Dynpro 200 mit dem Befehl leave to screen 0 komme zum Dypro 100 zurück und das neue Fenster wird geschlossen. Verändere ich nun die Daten in meiner Liste und rufe das Dynpro 200 wieder auf werden die geänderten Daten nicht in die Grafik übernommen.

Benutze ich allerdings zum verlassen des Dynpros 200 den Befehl leave to screen 100 wird das Fenster nicht geschlossen aber die Daten werden verändert in der Grafik angezeigt.

Wie schaffe ich es das Das Dynpro 200 geschlossen wird und die aktualisierten Daten aus Dynpro 100 in der Grafik angezeigt werden.

Danke für die Hilfe!

Gruß
Arne

gesponsert
Stellenangebote auf ABAPforum.com schalten
kostenfrei für Ausbildungsberufe und Werksstudenten


Beitrag von MarkusW (Specialist / 406 / 5 / 0 ) »
Ist das Dynpro 200 als 'Modales Dialogfenster' erstellt worden?

Gruß
Markus

Beitrag von scanner (ForumUser / 9 / 0 / 0 ) »
ja dynpro 200 ist ein modulares Fenster

Beitrag von TWP (Specialist / 445 / 0 / 1 ) »
Im Dynpro 200 darf ggf. auch kein Foledynpro stehen. Solltest du mit ALV's arbeiten, muss ggf. ein Refresh der daten gamcht werden bzw. ein FLUSH an den GUI.

Thomas

Beitrag von scanner (ForumUser / 9 / 0 / 0 ) »
wie wird ein flush auf dem Gui gemacht? Wenn ich beim Verlassen von Dynpro 200 ein call schreen 100 mache funktioniert es ja! Nur dann schliesst sicht nicht das Modulare Fenster nicht sondern das Dynpro 100 erscheint in dem Modularen Fenster !

Beitrag von scanner (ForumUser / 9 / 0 / 0 ) »
sorry ich meinte leave to screen 100 nicht call screen 100 ! nur wenn ich leave to screen 0 verwende wird die Grafik nicht aktualisiert! Bei leave to screen 100 schliesst sich das Modulare Fenster nicht

Beitrag von TWP (Specialist / 445 / 0 / 1 ) »
wenn das Folgedynpro im 200 leer ist und du einen leave screen machst, kommst du wieder in dein normales Dynpro 100. Im Dynpor 100 sollte im Folgedynpro auch nur 100 stehen und nicht 200.
Wenn du dein Dynpro 200 schließt, bist du wieder im Dynpro 100.

Wenn das die nicht weiter Hilft, solldest du vielleicht mal etwas Programm posten, damit man sieht wo der Fehler eventuell liegt.

Thomas

Beitrag von scanner (ForumUser / 9 / 0 / 0 ) »
hier sind die Codes:


Aufruf aus dynpro 100:
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'.
call screen 200 STARTING AT 20 1
ENDING AT 138 30.


Code in Dynpro 200:

if not gp_inst is initial.
CLEAR GP_INST.
free gp_inst.
endif.

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.

if retval <> cl_gfw=>ok.
CALL METHOD cl_gfw=>show_msg
EXPORTING
msgno = retval.
endif.
endif.

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

read table it_erg into wa_erg index sy-tabix.
CALL METHOD Chart_Daten->fuellen
EXPORTING
DC_MANAGE = dc_manage
wa_data = wa_erg
objid = objid
IMPORTING
RETVAL = retval.
CALL METHOD Chart_Daten->fuellen_ogw
EXPORTING
DC_MANAGE = dc_manage
wa_data = wa_erg
IMPORTING
RETVAL = retval.
CALL METHOD Chart_Daten->fuellen_ugw
EXPORTING
DC_MANAGE = dc_manage
wa_data = wa_erg
IMPORTING
RETVAL = retval.
add 1 to objid.
endloop.
*---------------------------------
*Container erzeugen

create object custom_container
exporting container_name = 'LINE_DIAGRAMM'.
*DEM Grafik-proxy die Attribute mitteilen
CREATE OBJECT GP_INST.
* create, initialize and activate graphics proxy
CREATE OBJECT GP_INST.
CALL METHOD GP_INST->IF_GRAPHIC_PROXY~INIT
EXPORTING DC = DC_INST
PARENT = CUSTOM_CONTAINER
prod_id = cl_gui_gp_pres=>co_prod_chart
IMPORTING RETVAL = RETVAL.
IF RETVAL = CL_GFW=>OK.
* set DC names
CALL METHOD GP_INST->SET_DC_NAMES
EXPORTING
OBJ_ID = 'OBJID'
DIM1 = 'X_VAL'
DIM2 = 'Y_VAL'
GRP_ID = 'GRPID'
IMPORTING RETVAL = RETVAL.
ENDIF. "// set dc names
*-------------------------------------------------------------
*setzen von customizing einstellungen

* set default display context
create object bundle_display exporting instance_id = 'GFWTA'.

* set background color
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_bg_clr_plt_id
value = 18. " grey

** gitterraster
* call method bundle_display->if_customizing~set
* exporting attr_id = cl_cu_display_context=>co_visibility
* value = 1.

* disable lines
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_bl_style
value = 1. " no line

* call method bundle_display->if_customizing~set
* exporting attr_id = cl_cu_display_context=>co_pt_alignment
* value = '4'.

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


*Für Chart 1************************************************
* values (group 1)
create object bundle_values1 exporting instance_id = 'GFWTA1'.

* prepare display context for values
create object bundle_display exporting instance_id = 'dummy'.

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

*Für unterer Grenzertwert************************************************
* values (group 1)
create object bundle_values1 exporting instance_id = 'GFWTA2'.

* prepare display context for values
create object bundle_display exporting instance_id = 'dummy'.

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

**Für oberer Grenzertwert************************************************
* values (group 1)
create object bundle_values1 exporting instance_id = 'GFWTA3'.

* prepare display context for values
create object bundle_display exporting instance_id = 'dummy'.

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


****X-ACHSE
* primary x-axis
create object bundle_axis_x exporting instance_id = 'GFWTA_X'.

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



***X-ACHSE GRID
create object bundle_grid_x exporting instance_id = 'GFWTA_X_GRID'.
* prepare display context for grid
create object bundle_display exporting instance_id = 'dummy'.

* minor grid lines should be invisible
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_visibility
value = gfw_false.

* copy display context into grid (for minor lines)
call method bundle_grid_x->if_customizing~set
exporting attr_id = cl_cu_grid=>co_minor_context
value = bundle_display.
* copy display context into grid (for major lines)
call method bundle_grid_x->if_customizing~set
exporting attr_id = cl_cu_grid=>co_MAJOR_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_grid_x
importing retval = retval.

***Y-ACHSE GRID
create object bundle_grid_y exporting instance_id = 'GFWTAYGRID'.
* prepare display context for grid
create object bundle_display exporting instance_id = 'dummy'.
* minor grid lines should be invisible
call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_visibility
value = gfw_false.

* copy display context into grid (for minor lines)
call method bundle_grid_y->if_customizing~set
exporting attr_id = cl_cu_grid=>co_minor_context
value = bundle_display.
* copy display context into grid (for major lines)
call method bundle_grid_y->if_customizing~set
exporting attr_id = cl_cu_grid=>co_MAJOR_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_y_prim_axis
bundle = bundle_grid_y
importing retval = retval.



*Y_ACHSE---------------------------------------------------
* primary y-axis
create object bundle_axis_y exporting instance_id = 'GFWTA_Y'.

create object bundle_display exporting instance_id = 'dummy'.

call method bundle_display->if_customizing~set
exporting attr_id = cl_cu_display_context=>co_visibility
value = gfw_false.



*min range title
CALL METHOD BUNDLE_AXIS_Y->IF_CUSTOMIZING~SET
EXPORTING ATTR_ID = CL_CU_AXIS=>CO_MIN_RANGE_TITLE
VALUE = 'MIN'.
CALL METHOD BUNDLE_AXIS_Y->IF_CUSTOMIZING~SET
EXPORTING ATTR_ID = CL_CU_AXIS=>CO_MIN_RANGE_VALUE
VALUE = 400.
CALL METHOD BUNDLE_AXIS_Y->IF_CUSTOMIZING~SET
EXPORTING ATTR_ID = CL_CU_AXIS=>CO_RANGE_CONTEXT
VALUE = BUNDLE_DISPLAY.
* prepare display context for axis title
create object bundle_display exporting instance_id = 'dummy'.

* 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_y->if_customizing~set
exporting attr_id = cl_cu_axis=>co_title
value = wa_erg_anz-prueflosa.
* copy display context into axis
call method bundle_axis_y->if_customizing~set
exporting attr_id = cl_cu_axis=>co_title_context
value = bundle_display.

CALL METHOD GP_INST->IF_GRAPHIC_PROXY~ADD_CU_BUNDLE
EXPORTING PORT = IF_GRAPHIC_PROXY=>CO_PORT_CHART_Y_PRIM_AXIS
BUNDLE = BUNDLE_AXIS_Y
IMPORTING RETVAL = RETVAL.



*_______________________________________________________________

*__________________________________________________
* CALL METHOD GP_INST->FREE.
IF RETVAL <> CL_GFW=>OK.
CALL METHOD GP_INST->IF_GRAPHIC_PROXY~FREE. "//ignore return value(keep 1st)
CALL METHOD dc_manage->FREE.
CLEAR GP_INST.
free gp_inst.
ELSE.
CALL METHOD GP_INST->IF_GRAPHIC_PROXY~ACTIVATE
IMPORTING RETVAL = RETVAL.

CALL METHOD dc_manage->FREE.
ENDIF.
IF RETVAL <> CL_GFW=>OK.
CALL METHOD CL_GFW=>SHOW_MSG EXPORTING MSGNO = RETVAL.
free gp_inst.
ENDIF.

*CALL METHOD GP_INST->if_dc_access~del_object.

code im User command in Dypro 200:

case sy-ucomm.
when 'BACK'.

leave to screen 0. <- hier kommt man zu dynpro 100 zurück!
when 'EXIT'.
leave program.
endcase.

Seite 1 von 1

Vergleichbare Themen

1
Antw.
1667
Views
Neuladen des ALV bei leave to screen 0.
von axxter » 15.11.2006 09:58 • Verfasst in ABAP® Core
1
Antw.
1163
Views
Nach leave to screen entsteht ein neues Fenster
von JohnLocklay » 08.11.2016 13:42 • Verfasst in ABAP® Core
3
Antw.
2829
Views
Leave Program
von Stahle71 » 28.06.2016 10:48 • Verfasst in ABAP® für Anfänger
5
Antw.
5822
Views
ALV - Leave to List-Processing
von Thorsten » 15.03.2005 08:51 • Verfasst in Tips + Tricks & FAQs
3
Antw.
3142
Views
Leave to Transaction und der Zurück-Button
von Shugg » 01.07.2020 15:02 • Verfasst in Dialogprogrammierung

Über diesen Beitrag


Unterstütze die Community und teile den Beitrag für mehr Leser und Austausch

Aktuelle Forenbeiträge

Hilfe zum FB MATERIAL_MAINTAIN_DARK
Gestern von black_adept gelöst 8 / 1759
HR-Entgeltnachweis
vor 2 Tagen von ChrisB 4 / 2304

Newsletter Anmeldung

Keine Beiträge verpassen! Wöchentlich versenden wir lesenwerte Beiträge aus unserer Community.
Die letzte Ausgabe findest du hier.
Details zum Versandverfahren und zu Ihren Widerrufsmöglichkeiten findest du in unserer Datenschutzerklärung.

Aktuelle Forenbeiträge

Hilfe zum FB MATERIAL_MAINTAIN_DARK
Gestern von black_adept gelöst 8 / 1759
HR-Entgeltnachweis
vor 2 Tagen von ChrisB 4 / 2304

Unbeantwortete Forenbeiträge

Export von Spools in XLSX
vor 4 Tagen von abapamateur 1 / 311
Feldberechnung ME32K
vor einer Woche von ZF_SAPler 1 / 907
MS-Word als Editor
letzen Monat von tekko 1 / 4408