[ABAP] Binärdaten (HEX) in eine lokale Datei speichern

* HEX-Daten (Beispiel)
DATA(it_solix) = VALUE solix_tab(
                   ( line = '7639BD' )
                   ( line = '67326F' )
                 ).

TRY.
    DATA: lv_action TYPE i.
    DATA: lv_filename TYPE string.
    DATA: lv_fullpath TYPE string.
    DATA: lv_path TYPE string.

* Save-Dialog
    cl_gui_frontend_services=>file_save_dialog( EXPORTING
                                                  default_file_name = 'Data.bin'
                                                  default_extension = 'bin'
                                                  file_filter       = |Binärdaten (*.bin)\|*.bin\|{ cl_gui_frontend_services=>filetype_all }|
                                                CHANGING
                                                  filename          = lv_filename
                                                  path              = lv_path
                                                  fullpath          = lv_fullpath
                                                  user_action       = lv_action ).

    IF lv_action EQ cl_gui_frontend_services=>action_ok.
* XSTRING für Längenbestimung erzeugen
      DATA(lv_xstring) = cl_bcs_convert=>solix_to_xstring( it_solix ).

* Datei lokal speichern
      cl_gui_frontend_services=>gui_download( EXPORTING
                                                filename     = lv_fullpath
                                                filetype     = 'BIN'
                                                bin_filesize = xstrlen( lv_xstring )
                                              CHANGING
                                                data_tab     = it_solix ).

    ENDIF.
  CATCH cx_root INTO DATA(e_text).
    MESSAGE e_text->get_text( ) TYPE 'I'.
ENDTRY.