upload file template to SMW0 and download the template from it
首先上传文件到tcode SMW0
选择新建后,输入文件名和描述,再选择想要上传的文件
上传完成后:
在表WWWPARAMS, WWWDATA里就会有信息存进去
然后就可以程序里写代码了:
屏幕上的效果:
点击按钮后的处理:
FORM download_excel_template.
DATA: filename TYPE string,
path TYPE string VALUE 'C:\Users\&1\Desktop\',
fullpath TYPE string VALUE 'C:\Users\&1\Desktop\',
winuser TYPE string,
lv_filename TYPE rlgrap-filename,
ls_return TYPE bapiret2.
"Get Windows User Name
CALL METHOD cl_gui_frontend_services=>get_user_name
CHANGING
user_name = winuser
EXCEPTIONS
&nb