2004 Dec 15 5:40 PM
Hi,
I would like to implement a new container (a control to zoom in/out a picture) to be used in a dynpro. Is there any documentation?
Thanks and Regards,
T. Cereghetti
Hi,
I would like to implement a new container (a control to zoom in/out a picture) to be used in a dynpro. Is there any documentation?
Thanks and Regards,
T. Cereghetti
2004 Dec 15 5:51 PM
2004 Dec 16 9:04 AM
Thanks for the swift answer.
The sample code would be a valuable help!
Thanks and Regards,
T. Cereghetti
2004 Dec 16 1:50 PM
If the ECL viewer works - great! However if you find that you still need information on writting your own control and integrating it in ABAP, have a look at the following weblog.
/people/thomas.jung3/blog/2004/09/01/using-net-windows-controls-in-the-abap-control-framework
In this example the control was written in .Net.
2004 Dec 16 2:19 PM
Ok......This sample program uses a docking container to implement the ECL veiwer(no need for screen). You can use a regular container on a dynpro. This sample code should get you started.
Regards,
Rich Heilman
report zrich_0002 .
data:
docking type ref to cl_gui_docking_container,
viewer type ref to cl_gui_ecl_2dviewer.
parameters: p_check type c.
at selection-screen output.
perform build_viewer.
start-of-selection.
&----
*& Form build_viewer
&----
text
----
--> p1 text
<-- p2 text
----
form build_viewer.
data: repid like sy-repid.
data: file_name like sapb-sapfiles,
file_type like bdn_con-mimetype.
repid = sy-repid.
create object docking
exporting
repid = repid
dynnr = sy-dynnr
side = cl_gui_docking_container=>dock_at_right
extension = '600'
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
create object viewer
exporting
parent = docking
autoalign = ' '
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
others = 5.
check sy-subrc = 0.
call method viewer->create_toolbar
exporting
close_button = ' '
tools = 'X'
viewer = 'X'
navigation = 'X'
options = ' '
viewer_openfile = ' '
viewer_savefile = ' '
tool_measurement = ' '
remove_document = ' '
exceptions
cntl_system_error = 1
cntl_error = 2
cntb_btype_error = 3
dp_error = 4.
check sy-subrc = 0.
Populate the file path
file_name = 'C:\ABAPS\15000001.tif'.
call method viewer->open_document
exporting
file = file_name
file_type = file_type
exceptions
cntl_error = 1
cntl_system_error = 2
invalid_file_format = 3
permission_denied = 4
file_not_found = 5
bad_file_name = 6
invalid_data = 7
others = 8.
endform.
2004 Dec 20 1:23 PM
Thanks you both a lot!
I couldn't get better answers.
Regards,
T. Cereghetti
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |