BASIS
Function module
Used the same way in S/4HANA
TEXT_CONVERT_XLS_TO_SAP Convert Excel File to SAP Format
Reads an Excel file and converts its content directly into the structure of the target internal table (by column order). Upload programs use it to load Excel data into a typed table in one step. Pass I_LINE_HEADER = 'X' if there is a header row; I_TAB_RAW_DATA is mandatory but can be passed empty, and SAP GUI plus Excel on the PC are required.
- Function group
- TRUX
- Remote-enabled (RFC)
- No
- Type
- Function module
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| I_FILENAME | RLGRAP-FILENAME | File name | Yes |
| I_TAB_RAW_DATA | TRUXS_T_TEXT_DATA | Raw data table | Yes |
| I_LINE_HEADER | CHAR01 | Skip header line | — |
| I_FIELD_SEPERATOR | CHAR01 | Field separator | — |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| I_TAB_CONVERTED_DATA | STANDARD TABLE | Converted data (target table) | Yes |
Exceptions
- CONVERSION_FAILED — Conversion failed
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_filename = lv_i_filename
i_tab_raw_data = lv_i_tab_raw_data
TABLES
i_tab_converted_data = lt_i_tab_converted_data
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.