on 11-27-2021 6:52 PM
Hi,
I need download BEx workbooks from BW (table RSRWBSTORE). I have created the program like this link:
Downloading BEx 7.0 XLSM Workbook from RSRWBSTORE, but this program doesn't work. I have checked the other program using FM GUI_DOWNLOAD (in the answer of the same link) a file is downloaded but is empty.
Please, somebody knows a program for download workbooks to local disk?.
thanks in advance.
Hello David,
You have to enter a workbook ID and the path including the file name and it will download.
What's the purpose of the XML file?
You can get a list od all active workbooks and their corresponding query names from RSRWBINDEX and RSRWBINDEXT tables.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sam,
I need download a lot of workbooks from BW and store these files in my computer (by backup). There are thousands workbooks and I need a Z program in order to get these files massively (I don´t know other way).
I know the tables that you mention about workbooks info, but I need download the files.
This is my code, I get a file .XLS or .XLSX with the correct size, but when I open the file is empty.
Thanks!
PARAMETERS:
p_wbid TYPE rssguid25, "Workbookid
p_path TYPE string. "path
DATA: li_content TYPE if_rsr_t_workbook=>t_rsrwbstore,
lw_content TYPE LINE OF if_rsr_t_workbook=>t_rsrwbstore,
li_content_bin TYPE if_rsr_t_workbook=>t_binary_file,
lv_filesize TYPE i.
"get file size
SELECT SINGLE filesize
FROM rsrwbindex
INTO lv_filesize
WHERE workbookid EQ p_wbid AND
objvers EQ 'A'.
"get file content
SELECT *
FROM rsrwbstore
INTO TABLE li_content
WHERE workbookid EQ p_wbid AND
objvers EQ 'A'.
SORT li_content BY linenumber.
LOOP AT li_content INTO lw_content.
APPEND lw_content-clustd TO li_content_bin.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = lv_filesize
filename = p_path
filetype = 'BIN'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = 'X'
* CODEPAGE = ' '
* ignore_cerr = abap_true
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* write_lf_after_last_line = abap_true
* show_transfer_status = abap_true
* VIRUS_SCAN_PROFILE = '/SCET/GUI_DOWNLOAD'
* IMPORTING
* FILELENGTH = ''
TABLES
data_tab = li_content_bin
* FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
User | Count |
---|---|
71 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.