Skip to Content
-2
Oct 22, 2019 at 02:32 PM

how to set blank spaces at end of txt file into file system?

891 Views Last edit Oct 22, 2019 at 02:34 PM 2 rev

Hello guys I need to print blank spaces at end of line on txt file, pleas echeck my code below:


DATA:

     lv_space TYPE string,

     line TYPE string,

     ruta TYPE string.



  ruta = '/tmp/file.txt'.



    line = 'test'.

    lv_space = cl_abap_conv_in_ce=>uccp( '00a0' ).

CONCATENATE line lv_space INTO line.





  OPEN DATASET  ruta FOR OUTPUT IN LEGACY BINARY MODE .



     TRANSFER line TO ruta .



   CLOSE DATASET ruta.

My code works but I have one problem, the space in the file its a extranger character, and I need a space:

If I open from word:

There is any way to put blank spaces on the file correctly without extranger characrers???

Attachments

captura.png (4.0 kB)
word.png (723 B)