REPORT ZTEST_READ_TABLE.
tables:sscrfields.
selection-screen function key 1. "工具条按钮 最多为5个.
data:g_ucomm(1).
parameters:sss(1).
initialization.
sscrfields-functxt_01 = '测试文档读取'.
sscrfields-ucomm = 'FC01'.
at selection-screen.
case sscrfields-ucomm. "处理按钮命令
when'FC01'.
if sy-ucomm = 'FC01'.
g_ucomm = 'A'.
perform READ_OFFICE_local.
else.
clear g_ucomm.
endif.
when others.
endcase.
*&---------------------------------------------------------------------*
*& Form READ_OFFICE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form READ_OFFICE_local .
data:REG_VALUE type string,
VERSION_STR type string,
WORD_VERSION type string.
DATA: DOCUMENTS TYPE ole2_object,
wordapp TYPE ole2_object,
worddoc TYPE ole2_object,
wordobj TYPE ole2_object.
DATA: doc_work_file LIKE rlgrap-filename VALUE
'C:\Users\mark_wen\Desktop\QUERY 跨系统传输操作手册.docx'