How to download internal table to PC file in ABAP/4
When you want to download internal table to PC file in ABAP/4, you can apply function module "WS_DOWNLOAD".
Example
CALL FUNCTION ’WS_DOWNLOAD’
EXPORTING
FILENAME = LV_TEXT "PC File Name and Location
FILETYPE = ’DAT’
TABLES
DATA_TAB = I_MESG "Internal Table
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
- thitima's blog
- 882 reads
Post new comment