Reading data from a file (presentation server),ABAP Code
REPORT CHAP2604.* Data declarations for later usePARAMETERS FILENAME(128) DEFAULT ‘c:usersdefaulttestfile.dat’LOWER CASE.TABLES CUSTOMERS.DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100WITH HEADER LINE. CALL FUNCTION ‘WS_UPLOAD’EXPORTINGFILENAME = FILENAMETABLESDATA_TAB = ALL_CUSTOMERSEXCEPTIONSFILE_OPEN_ERROR = 1OTHERS = 2.CASE SY-SUBRC.WHEN 1.WRITE ‘Error when file opened’.EXIT.WHEN 2.WRITE ‘Error during data transfer’.EXIT.ENDCASE.* Display the resultLOOP AT ALL_CUSTOMERS.WRITE: / ALL_CUSTOMERS-NAME,ALL_CUSTOMERS-CITY.ENDLOOP.