GUI_Download的Codepage参数 转载
http://blog.chinaunix.net/u1/40527/showart.php?id=499557
DATA: CODEPAGE TYPE ABAP_ENCOD VALUE '8400'.
DATA: O_FILE TYPE STRING.
O_FILE = filename.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
FILENAME = O_FILE
FILETYPE = 'DAT'
CODEPAGE = CODEPAGE
CHANGING
DATA_TAB = itab[]
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
..
...
....
CODEPAGE这个参数是NUMC类型的,4位。决定输出文件的字符集。
比如8400代表“GBK”,4110为utf-8。
可以用函数:SCP_CODEPAGE_BY_EXTERNAL_NAME来根据名称找4位代码,或者查询表:TCP00A