Hello,
Please try this.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_content
append_to_table = abap_true
TABLES
binary_tab = lt_data.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = lv_filepath
filetype = 'BIN'
CHANGING
data_tab = lt_data.
Regards,
Sri.