Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to implement a new container

Former Member
0 Likes
1,318

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

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,242

I would suggest to you to use the 2D ECL viewer. This has the "zoom" functionality.

I have sample code, if needed.

Regards,

Rich Heilman

Read only

0 Likes
1,242

Thanks for the swift answer.

The sample code would be a valuable help!

Thanks and Regards,

T. Cereghetti

Read only

0 Likes
1,242

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.

Read only

0 Likes
1,242

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.

Read only

0 Likes
1,242

Thanks you both a lot!

I couldn't get better answers.

Regards,

T. Cereghetti