May 2019
Beginner to intermediate
548 pages
12h 39m
English
Reading files from the application server is very easy; even easier than writing a file. But to be sure that this example works, we first need to store something in the application server. Copy a report pattern from Appendix A, Assessments into the newly created ZMSA_R_CHAPTER4_4. We need an additional variable to store file content lt_data and lv_line to temporarily store each line of a file. The variable lv_file is used to store the filename:
DATA: lv_file TYPE string VALUE 'testfile4_3.txt'. DATA: lv_line TYPE string. DATA: lt_data TYPE TABLE OF string.
The first statement is almost the same as in the last exercise; we just need to change direction from OUTPUT to INPUT:
OPEN DATASET lv_file FOR ...
Read now
Unlock full access