We have a Z program, which uploads XLSX file to SAP. The program calls FM ALSM_EXCEL_TO_INTERNAL_TABLE, which uploads the excel file to SAP. According to the debugger - in an inner step (9) DP_GET_STREAM_FROM_FRONT calls to FM DP_GET_CLIENT_TABLE45A.
When DP_GET_CLIENT_TABLE45A finds a whitespace in the file, the FM replaces it by # character. i.e., the internal table DATA (line 152 above), which is returned by the FM, has # instead of white space.
Later when ALSM_EXCEL_TO_INTERNAL_TABLE receives this internal table, it considers the # as separator and therefore divides the data into two. For example if the cell in the Excel file contains o/<whitespace>p it is sperated into “o/ AND p”
The code in ALSM_EXCEL_TO_INTERNAL_TABLE, which divides the data into two is:
This behavior (that the data in one cell is divided into two) disrupt the data, which is uploaded into SAP.
My goal is to find the whitespaces in the file and to notify the user. (He will fix the file). The problem is that the data which, is returned from the FMs, do not include the whitespaces (they were replaced by #).
How can I upload Excel file to internal table with the whitespace? (and then check if it has whitespace by cl_abap_char_utilities=>get_simple_spaces_for_cur_cp( ))
When looking in the excel file
1. 1. In the cell the whitespace is not seen (red)
2. In the yellow area you can see the whitespace
Thank you in advance