GUI_UPLOAD reads any text or binary file from the frontend machine and returns it as an internal table. For text (ASC) mode each row in DATA_TAB holds one line of the file. For binary (BIN) mode each row holds a chunk of raw bytes. It's the general-purpose upload FM for CSV, tab-delimited, and other flat files.
Frontend only — no background support
GUI_UPLOAD requires an active SAP GUI session. It cannot be used in batch jobs, scheduled reports, or RFC destinations that have no frontend connection. The NO_BATCH exception fires if called from a background job.
Line length limit (ASC): each line in DATA_TAB is truncated at 1023 characters. Files with longer lines silently lose the overflow. Use BIN mode and parse manually if you expect wide lines.
BIN mode output:DATA_TAB contains raw bytes. You need TEXT_CONVERT_XLS_TO_SAP or similar to interpret them.
CRLF on Windows files: in ASC mode, carriage returns (CR) may appear at the end of each line. Strip them with REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf IN lv_line WITH space if downstream comparisons fail.
UTF-8 BOM: pass CHECK_BOM = 'X' to strip the BOM automatically instead of handling it manually.
Client filtering: does not apply — this FM reads from the frontend filesystem, not the database.