Every Windows system user has heard of the Microsoft Office package. Microsoft Word or Microsoft Excel formats are the most recognizable and characteristic extensions for Windows operating systems. The Office package is also very well integrated with SAP. We have the possibility to export the result to an Excel spreadsheet in many standard transactions. Exporting to Excel is also part of standard ABAP List Viewer (ALV) functionality. In this section, we dive deeper into SAP and Microsoft integration. Reading, writing, and editing examples will be covered.
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...