Code: Alles auswählen.
REPORT zzkaiskoerper.
* Declarations *****************************************************
CLASS c_reaction DEFINITION.
PUBLIC SECTION.
METHODS h1 FOR EVENT picture_click OF cl_gui_picture
IMPORTING sender.
ENDCLASS. "c_reaction DEFINITION
DATA pic_ol TYPE bds_typeid VALUE 'ZZOL'.
DATA pic_or TYPE bds_typeid VALUE 'ZZOR'.
DATA pic_ul TYPE bds_typeid VALUE 'ZZUL'.
DATA pic_ur TYPE bds_typeid VALUE 'ZZUR'.
DATA: container_ol TYPE REF TO cl_gui_custom_container,
container_or TYPE REF TO cl_gui_custom_container,
container_ul TYPE REF TO cl_gui_custom_container,
container_ur TYPE REF TO cl_gui_custom_container,
pict_ol TYPE REF TO cl_gui_picture,
pict_or TYPE REF TO cl_gui_picture,
pict_ul TYPE REF TO cl_gui_picture,
pict_ur TYPE REF TO cl_gui_picture,
border_ul TYPE i,
done,
react TYPE REF TO c_reaction,
evt_tab TYPE cntl_simple_events,
evt_tab_line LIKE LINE OF evt_tab,
url(256) TYPE c,
url_ol LIKE url,
url_or LIKE url,
url_ul LIKE url,
url_ur LIKE url.
TYPES pic_line(1022) TYPE x.
DATA pic_tab TYPE TABLE OF pic_line.
* Reporting events ***************************************************
START-OF-SELECTION.
PERFORM get_picture USING 'ZZOL' CHANGING url_ol.
PERFORM get_picture USING 'ZZOR' CHANGING url_or.
PERFORM get_picture USING 'ZZUL' CHANGING url_ul.
PERFORM get_picture USING 'ZZUR' CHANGING url_ur.
CALL SCREEN 100.
* Dialog Modules Output
MODULE status_0100 OUTPUT.
IF done = space.
done = 'X'.
CREATE OBJECT: container_ol EXPORTING container_name = 'PICTUREOL',
container_or EXPORTING container_name = 'PICTUREOR',
container_ul EXPORTING container_name = 'PICTUREUL',
container_ur EXPORTING container_name = 'PICTUREUR',
pict_ol EXPORTING parent = container_ol,
pict_or EXPORTING parent = container_or,
pict_ul EXPORTING parent = container_ul,
pict_ur EXPORTING parent = container_ur,
react.
evt_tab_line-eventid = cl_gui_picture=>eventid_picture_click.
evt_tab_line-appl_event = ' '. " System Event!
APPEND evt_tab_line TO evt_tab.
CALL METHOD pict_ol->set_registered_events
EXPORTING
events = evt_tab.
CALL METHOD pict_or->set_registered_events
EXPORTING
events = evt_tab.
CALL METHOD pict_ul->set_registered_events
EXPORTING
events = evt_tab.
CALL METHOD pict_ur->set_registered_events
EXPORTING
events = evt_tab.
SET HANDLER react->h1 FOR pict_ol.
SET HANDLER react->h1 FOR pict_or.
SET HANDLER react->h1 FOR pict_ul.
SET HANDLER react->h1 FOR pict_ur.
CALL METHOD pict_ol->load_picture_from_url
EXPORTING
url = url_ol.
CALL METHOD pict_or->load_picture_from_url
EXPORTING
url = url_or.
CALL METHOD pict_ul->load_picture_from_url
EXPORTING
url = url_ul.
CALL METHOD pict_ur->load_picture_from_url
EXPORTING
url = url_ur.
CALL METHOD pict_ol->set_display_mode
EXPORTING
display_mode = pict_ol->display_mode_stretch.
CALL METHOD pict_or->set_display_mode
EXPORTING
display_mode = pict_or->display_mode_stretch.
CALL METHOD pict_ul->set_display_mode
EXPORTING
display_mode = pict_ul->display_mode_stretch.
CALL METHOD pict_ur->set_display_mode
EXPORTING
display_mode = pict_ur->display_mode_stretch.
ENDIF.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE. "status_0100 OUTPUT
* Dialog Modules Output
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE. "cancel INPUT
* CLass Implementations **********************************************
CLASS c_reaction IMPLEMENTATION.
METHOD h1.
CALL METHOD sender->clear_picture.
*CALL METHOD sender->set_3d_border
* EXPORTING
* border = 1.
* call method cl_gui_cfw=>flush.
ENDMETHOD. "h1
ENDCLASS. "c_reaction IMPLEMENTATION
*
*&---------------------------------------------------------------------*
*& Form get_picture
*&---------------------------------------------------------------------*
FORM get_picture USING fi_name TYPE bds_typeid
CHANGING value(fe_url).
*** Benötigte Variablen
DATA:
lt_url TYPE TABLE OF bapiuri,
ls_url TYPE bapiuri.
*** Ermitteln der URL zum Bild
CALL METHOD cl_bds_document_set=>get_with_url
EXPORTING
classname = 'PICTURES'
classtype = 'OT'
object_key = fi_name
CHANGING
uris = lt_url.
*** Ermittelte URL lesen
READ TABLE lt_url INTO ls_url INDEX 1.
fe_url = ls_url-uri.
ENDFORM. "get_picture
Warum also speicherst Du die Koordinaten dann nicht einfachAbgespeichert werden sollten dann aber nur die Koordinaten. Die bekomme ich ja ohne weiteres beim Klicken zurückgeliefert.
...na gottseidank...! Ich hatte schon Ohrläppcheneinwände befürchtet...Kaiwalker hat geschrieben:Danke Enno,
das hat mir schon weitergeholfen.
Kaiwalker hat geschrieben: Dann muss ich mir bloß erst Mal die Mühe machen das Bild in mehrere Teile zu zerteilen.