abap 如何点击radio button按钮,选择保存路径,然后把文件下载到本地 15
求一个可出结果的小例子 展开
首先界面是这样的
FORM DOWNLOAD_TEMPLATE .
CREATE OBJECT G_APPL 'EXCEL.APPLICATION'.
SET PROPERTY OF G_APPL 'VISIBLE' = 0.
CALL METHOD OF
G_APPL
'WORKBOOKS' = G_WORK.
CALL METHOD OF
G_WORK
'Add' = G_WORK.
GET PROPERTY OF G_APPL 'ActiveSheet' = G_ACTIVESHEET.
SET PROPERTY OF G_ACTIVESHEET 'Name' = '工艺路线模板'.
PERFORM FILL_CELL USING: 1 1 '物料编码' 27 1, "行,列,值,颜色,加粗
1 2 '工厂' 27 1,
宽首 1 3 '物料描述' 27 1,
1 4 '工序号' 27 1,
1 5 '工作中心' 27 1,
1 6 '控制码' 27 1,
1 7 '工序名称' 27 1,
1 8 '基本数量' 27 1,
1 9 '准备' 27 1,
1 10 '机器' 毁世 27 1,
1 11 '人工' 27 1,
.
"EXCEL文件另存为
CALL METHOD OF
G_WORK
纤巧肢 'SAVEAS'
EXPORTING
#1 = P_FILE.
"关闭文件
CALL METHOD OF
G_WORK
'close'.
"退出EXCEL
CALL METHOD OF
G_APPL
'QUIT'.
FREE OBJECT G_APPL.
MESSAGE S000(ZPEOPLE) WITH '文件:' P_FILE ' 下载成功' .
ENDFORM. " DOWNLOAD_TEMPLATE
有没有完整的report?