May 2019
Beginner to intermediate
548 pages
12h 39m
English
Let's assume some external system created a report in Excel format. We need to create an ABAP program that is capable of reading this file. Create a new program, ZMSA_R_CHAPTER4_5, and copy the report pattern from Appendix A, Assessments.
We need to declare variables. The lv_filename will be used to store the filename and file path on our local PC. The variable lt_excel stores values in a special cell-addressing format:
DATA: lv_filename TYPE localfile VALUE 'c:/temp/testfile4_5.xlsx'. DATA: lt_excel TYPE TABLE OF alsmex_tabline.
For reading Excel files, we have to use the function module alsm_excel_to_internal_table. You can get a sample Excel file from GitHub or create a file yourself in the temp folder. ...
Read now
Unlock full access