report zdemo01.
DATA: file TYPE string VALUE 'test.dat',
text TYPE string,
text2 TYPE string.
OPEN DATASET file FOR OUTPUT IN TEXT MODE
ENCODING DEFAULT
WITH SMART LINEFEED.
do 10 TIMES.
TRANSFER '1234567890' TO file.
TRANSFER 'ABCDEFGHIJ' TO file.
ENDDO.
CLOSE DATASET file.
OPEN DATASET file FOR INPUT IN TEXT MODE
ENCODING DEFAULT
WITH SMART LINEFEED.
do.
clear text.
READ DATASET file INTO text.
if sy-subrc ne 0.
EXIT.
endif.
text2 = text2 && text.
enddo.
CLOSE DATASET file.
DELETE DATASET file.
阅读(1371) | 评论(0) | 转发(0) |