REPORT ZRRSAMPLE.
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\rafael.assis\Meus documentos\TEMP\Arquivo_ZCORVC001.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. "build_viewer
05/08/2010
Zooming and Moving Report Output
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário