Google Search - Blog...........

Moving And Zooming Report Output Program

report zmultiple_container .

data: docking type ref to cl_gui_docking_container,
viewer type ref to cl_gui_ecl_2dviewer ,
repid like sy-repid ,
file_name like sapb-sapfiles,
file_type like bdn_con-mimetype.

parameters: p_check type c.

at selection-screen output.
perform build_viewer.

start-of-selection.

*&---------------------------------------------------------------------
**& Form build_viewer
*----------------------------------------------------------------------
form build_viewer.

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:\Documents and Settings\venkatapp\Desktop\rich\zoom in alv report.txt'.

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.

No comments:

Post a Comment