sap代码:
DATA : BEGIN OF man,
name(20) TYPE C,
high TYPE p DECIMALS 2,
weight TYPE p DECIMALS 2,
END OF man.
DATA : man1 LIKE TABLE OF man.
DATA : name TYPE rlgrap-filename,
typa TYPE rlgrap-filetype.
man-name = '张叁'.
man-high = '1.68'.
man-weight = 120.
INSERT man INTO TABLE man1.
man-name = '刘志'.
man-high ='1.78'.
man-weight = 160.
INSERT man INTO TABLE man1.
man-name = '李志'.
man-high = '1.58'.
man-weight = 110.
INSERT man INTO man1 INDEX 2.
name = 'c:\temp\testa.txt'.
typa = 'dat'.
call function 'DOWNLOAD'
EXPORTING
"codepage = 'testa'
filename = name
filetype = typa
item = '文件测试'
TABLES
data_tab = man1
EXCEPTIONS
invalid_filesize = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
others = 7.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
ENDIF.
错误信息: 如下error.jpg图片
DATA : BEGIN OF man,
name(20) TYPE C,
high TYPE p DECIMALS 2,
weight TYPE p DECIMALS 2,
END OF man.
DATA : man1 LIKE TABLE OF man.
DATA : name TYPE rlgrap-filename,
typa TYPE rlgrap-filetype.
man-name = '张叁'.
man-high = '1.68'.
man-weight = 120.
INSERT man INTO TABLE man1.
man-name = '刘志'.
man-high ='1.78'.
man-weight = 160.
INSERT man INTO TABLE man1.
man-name = '李志'.
man-high = '1.58'.
man-weight = 110.
INSERT man INTO man1 INDEX 2.
name = 'c:\temp\testa.txt'.
typa = 'dat'.
call function 'DOWNLOAD'
EXPORTING
"codepage = 'testa'
filename = name
filetype = typa
item = '文件测试'
TABLES
data_tab = man1
EXCEPTIONS
invalid_filesize = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
others = 7.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
ENDIF.
错误信息: 如下error.jpg图片