SAP中,对于生用户在不知道操作的情况下:为其添加说明书,调用服务器上已存放好的word文档说明书;其程序简略代码编写如下:
tables : sscrfields .
type-pools : ole2 .
data : word type ole2_object ,
document type ole2_object .
selection-screen : FUNCTION KEY 1 .
initialization .
sscrfields-FUNCTXT_01 = '装柜通知单操作说明书 ' .
at selection-screen .
case sscrfields-ucomm .
when 'FC01' .
call method of word 'AppClose' . "检测是否已打开过说明书文档
free object word .
clear : word-handle , word-header .
create object word 'Word.Application' . "创建word应用程序
set property of word 'Visible' = 1 .
call method of word 'Documents' = document .
call method of document 'OPEN'
exporting
#1 = filename "filename说明书所在的目录'如:\\192.168.1.1\stock\操用说明书\d.doc'
stop .
endcase .
阅读(1252) | 评论(0) | 转发(0) |