将TXT文件值导入内表
2017-10-31 本文已影响7人
Mmm_余安
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = MATERIAL
FILETYPE = 'DAT'
TABLES
DATA_TAB = I_DATA
EXCEPTIONS
CONVERSION_ERROR = 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.