Export data to Clipboard with ABAP

lt_data holds the content to be exported and is being prepared for excel-paste-friendly formant (line 12).

Like it? Share it!
TYPES: BEGIN OF ty_clipboard, DATA TYPE c LENGTH 500, END OF ty_clipboard. DATA: lt_clipboard TYPE STANDARD TABLE OF ty_clipboard. DATA: ls_clipboard LIKE LINE OF lt_clipboard. FIELD-SYMBOLS: <lfs_data> LIKE LINE OF lt_data. CONSTANTS: c_tab TYPE c VALUE cl_bcs_convert=>gc_tab. DATA: lv_returncode TYPE i. * * Add tab for excel-paste-friendly format LOOP AT lt_data ASSIGNING <lfs_data>. CONCATENATE <lfs_data> INTO ls_clipboard-DATA SEPARATED BY c_tab. APPEND ls_clipboard TO lt_clipboard. ENDLOOP. cl_gui_frontend_services=>clipboard_export( IMPORTING DATA = lt_clipboard CHANGING rc = lv_returncode EXCEPTIONS cntl_error = 1 error_no_gui = 2 not_supported_by_gui = 3 no_authority = 4 OTHERS = 5 ).

>_ Author Guest

>_ last updated 5 yearss ago

>_ Language: ABAP