Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

cl_abap_gzip

Hi,

I have used CL_ABAP_GZIP to compress a file and I get the xstring as output and its length.

  TRY.
      CALL METHOD cl_abap_gzip=>compress_binary
        EXPORTING
          raw_in         = raw_in
          raw_in_len     = raw_in_len
          compress_level = 6
        IMPORTING
          gzip_out       = gzip_out
          gzip_out_len   = gzip_out_len.
    CATCH cx_parameter_invalid_range .
    CATCH cx_sy_buffer_overflow .
  ENDTRY.

Now, I would like to download it, and I use gui_download. But gui_download accepts parameters in table:

    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        bin_filesize            = gzip_out_len
        filename                = lv_filename
        filetype                = 'BIN'
      CHANGING
        data_tab                = data_tab.

Do you know how can I get my compressed xstring data (gzip_out) and load into table form (data_tab)? And which file extension should my lv_filename be? (ex: compressed.gzip)??

kindly advise.

thanks & regards,

ginnie

Tags:
Former Member
replied

Please have a look at function module SCMS_XSTRING_TO_BINARY

Regards,

Rich Heilman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question