Hi,
See if this is helpful:
Note the use of LENGTH .
REPORT y_r_eitan_test_04_09.
TYPE-POOLS: abap .
PARAMETERS: p_path TYPE localfile OBLIGATORY .
START-OF-SELECTION .
PERFORM at_start_of_selection
USING
p_path .
*----------------------------------------------------------------------*
FORM at_start_of_selection
USING
p_path TYPE localfile .
DATA: mess TYPE string .
DATA: dataset_name TYPE string .
dataset_name = p_path .
OPEN DATASET dataset_name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT MESSAGE mess .
CONSTANTS: c_field TYPE string VALUE 'HI1111ABC ' .
DO 10 TIMES .
TRANSFER c_field TO dataset_name LENGTH 17 .
ENDDO .
DO 10 TIMES .
TRANSFER c_field TO dataset_name LENGTH 17 NO END OF LINE .
ENDDO .
TRANSFER space TO dataset_name .
CLOSE DATASET dataset_name .
ENDFORM . "at_start_of_selection
regards.
The dots are spaces.
regards.