Skip to Content
-1
Jan 19, 2022 at 11:26 AM

GUI_DOWNLOAD adding a blank line after every actual internal table line in the txt file.

174 Views

I have a file in char Internal Table as :

Header:
Item:
Item:
Header:

But when I download it as a txt file in GUI_DOWNLOAD I am getting the file as:

Header:

Item:

Item:

Header:

ie. with a blank line after every internal table line.
Does anyone have an idea why is this happening?
The same code was working fine before:

*** Download internal table to path selected in selection screen
    IF gt_input IS NOT INITIAL.
      CONCATENATE p_infile <ls_file_tbl>-name INTO lv_filename SEPARATED BY '\'.
      IF lv_filename CS '.txt' OR lv_filename CS '.TXT'.
      ELSE.
        CONCATENATE lv_filename '.txt'(005) INTO lv_filename.
      ENDIF.

      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = lv_filename
        TABLES
          data_tab                = gt_input
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        CLEAR gt_input.
      ENDIF.
    ENDIF.

Thank You in advance.

Regards,
Shailesh