bookmarks  1

  •  

    DATA: lv_rc TYPE i. DATA: it_files TYPE filetable. DATA: lv_action TYPE i.   * FileOpen-Dialog aufrufen TRY.         cl_gui_frontend_services=>file_open_dialog( EXPORTING file_filter    = |pdf (*.pdf)\|*.pdf\|{ cl_gui_frontend_services=>filetype_all }|                                                               multiselection = abap_false                                                     CHANGING  file_table     = it_files                                                               rc             = lv_rc                                                               user_action    = lv_action ).       IF lv_action = cl_gui_frontend_services=>action_ok. * wenn Datei ausgewählt wurde       IF lines( it_files ) > 0. * ersten Tabelleneintrag lesen         DATA(lv_filename) = it_files[ 1 ]-filename.           DATA: lv_filesize TYPE i.         DATA: it_bin_data TYPE STANDARD TABLE OF raw255.   * Bild auf Appl. Server hochladen (binary)         cl_gui_frontend_services=>gui_upload( EXPORTING filename   = |{ lv_filename }|                                                         filetype   = 'BIN'                                               IMPORTING filelength = lv_filesize                                               CHANGING  data_tab   = it_bin_data ).                                                               DATA: lv_xstr TYPE xstring.   * RAW (binary) nach xstring         CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'           EXPORTING             input_length = lv_filesize           IMPORTING             buffer       = lv_xstr           TABLES             binary_tab   = it_bin_data           EXCEPTIONS             failed       = 1             OTHERS       = 2.           ...       ENDIF.     ENDIF.     CATCH cx_root INTO DATA(e_text).     MESSAGE e_text->get_text( ) TYPE 'I'. ENDTRY.
    5 months ago by @florian
    (0)
     
     
  • ⟨⟨
  • 1
  • ⟩⟩

publications  

    No matching posts.
  • ⟨⟨
  • ⟩⟩