Code: Alles auswählen.
DATA: lt_filename TYPE TABLE OF filename,
ls_filename LIKE LINE OF lt_filename,
lv_file_name TYPE rlgrap-filename,
lv_file_format TYPE filename-fileformat,
lv_emergency_flag,
ld_xstring TYPE xstring,
lv_xchar TYPE char255,
i TYPE i VALUE 1,
lt_test TYPE lvc_t_roid,
ls_test LIKE LINE OF lt_test,
ls_doc_ser TYPE zedoc_ser.
FIELD-SYMBOLS: <ls_test> LIKE LINE OF gt_tab.
CALL METHOD lr_grid1->get_selected_rows
IMPORTING
et_row_no = lt_row_no.
LOOP AT lt_row_no
INTO ls_test.
READ TABLE gt_tab ASSIGNING <ls_test> INDEX ls_test-row_id.
LOOP AT lt_filename INTO ls_filename.
ls_filename-fileintern = <ls_test>-dokid.
ENDLOOP.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = 'ZE_ABLESUNG'
parameter_1 = 'SER_Documente'
parameter_2 = <ls_test>-dokid
IMPORTING
emergency_flag = lv_emergency_flag
file_format = lv_file_format
file_name = lv_file_name
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
IF lv_xflag = 'X'."Senden einer Mail
OPEN DATASET lv_file_name FOR INPUT IN BINARY MODE.
READ DATASET lv_file_name INTO ld_xstring.
"Datei öffnen
lv_xchar = lv_file_name.
CREATE OBJECT lr_open1.
CALL METHOD lr_open1->open_document
EXPORTING
file = lv_xchar
file_type = 'image/tif'
* markup_forbidden = 'X'
.
ENDIF.
ENDLOOP.
Code: Alles auswählen.
DATA lr_open1 TYPE REF TO cl_gui_ecl_viewerbox.
"....
"....
lv_xchar = lv_file_name.
"in lv_xchar ist nun folgender Wert: /misc/HOST/0010001460.TIF
CREATE OBJECT lr_open1.
CALL METHOD lr_open1->open_document
EXPORTING
file = lv_xchar
file_type = 'image/tif'