Professional Documents
Culture Documents
Excel To Desktop
Excel To Desktop
com/thread/1661467
Frank Drescher
Apr 15, 2010 3:05 PM
Dear Experts,
i want save a File from the Business Document Service to the local Desktop.
Greetings
Frank
554 Views
Frank Drescher Apr 16, 2010 9:11 AM (in response to Frank Drescher)
REPORT ZTESTPSP.
create pdf
DATA:
file save
DATA:
xstring to binary
DATA:
DATA: lv_filename TYPE string.
cl_gui_frontend_services=>file_open_dialog(
CHANGING
rc = lv_rc ). " Return Code, Number of Files or -1 If Error Occurred
IF sy-subrc = 0.
lv_filename = ls_file-filename.
ENDIF.
EXPORTING
CLIENT = SY-MANDT
BINARY_FLAG = 'X'
TABLES
CONTENT = lt_CONTENT
ASCII_CONTENT = lt_ASCII_CONTENT
EXCEPTIONS
NOTHING_FOUND = 1
PARAMETER_ERROR = 2
NOT_ALLOWED = 3
ERROR_KPRO = 4
INTERNAL_ERROR = 5
NOT_AUTHORIZED = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
ENDIF.
loop at lt_CONTENT.
endloop.
EXPORTING
TABLES
filename = lv_filename.
cl_gui_frontend_services=>gui_download(
EXPORTING
cl_gui_frontend_services=>execute(
EXPORTING