DATA: lv_file(100) VALUE '/tmp/txtupload20171110.txt', lv_string TYPE string, lv_n2(2) TYPE n. OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT WITH WINDOWS LINEFEED IGNORING CONVERSION ERRORS. CHECK sy-subrc EQ 0. DO 4 TIMES. lv_n2 = sy-index. lv_string = 'test ' && lv_n2 && lv_n2. TRANSFER lv_string TO lv_file. ENDDO. CLOSE DATASET lv_file.