‎2008 May 06 1:08 PM
Hi,
I need to download all the Reports/programs that I have stored in a package at Once.Could u help me out please.
‎2008 May 06 1:14 PM
Hello,
I suggest you to use the [SAPLink|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/saplink]. It's a usefull tool to download more than programs created by the community.
Regards,
‎2008 May 06 1:15 PM
Hi,
there is no short cut to this. You have to go to each editor page......there is a button just over the editor as 'download to local file'. click and save.
‎2008 May 06 1:15 PM
Here is the solution
the code below dowloads all the programs by their name .
You can either specify the program starting name or their package ........
&----
*& Report Z11_AP_LOAD_PROGS_INPACK_1 *
*& *
&----
*& *
*& *
&----
report z11_ap_load_progs_inpack_1 message-id z11_ap.
tables: trdir,trdirt.
types : begin of s_download , "TO STORE PROGRAM CONTENT
lines(1500),
end of s_download.
data : w_download type s_download.
data : p_name like trdir.
data : p_prg type string. "TO PROVIDE LOCATION IN DRIVE
data : t_download type standard table of s_download.
data : begin of t_rep occurs 0,
prog_name like trdir-name,
end of t_rep.
selection-screen begin of block first
with frame title text-001.
select-options: s_name for trdir-name.
selection-screen end of block first.
parameters : p_pack type devclass.
parameters: p_path type localfile.
at selection-screen on value-request for p_path.
data: path_str type string.
call method cl_gui_frontend_services=>directory_browse
exporting
window_title = 'Select Directory'
changing
selected_folder = path_str
exceptions
cntl_error = 1.
call method cl_gui_cfw=>flush
exceptions
cntl_system_error = 1
cntl_error = 2.
p_path = path_str.
at selection-screen.
*----
select single name
from trdir
into corresponding fields of p_name
where name in s_name .
if sy-subrc <> 0.
message id 'Z8GS_TRIAL'
type 'I'
number 003
with s_name-low.
endif.
start-of-selection.
SELECT name
subc
FROM trdir
INTO CORRESPONDING FIELDS OF p_name
WHERE name IN s_name
AND subc <> 'S'.
***
t_rep-prog_name = p_name-name .
***
APPEND t_rep. "PASS PROGRAM NAME INTO INTERNAL TABLE
***
ENDSELECT.
select obj_name into t_rep-prog_name from tadir where pgmid = 'R3TR' and
object = 'PROG' and devclass = p_pack.
append t_rep. "PASS PROGRAM NAME INTO INTERNAL TABLE
endselect.
loop at t_rep.
read report t_rep-prog_name
into t_download.
concatenate p_path '/' t_rep-prog_name '.TXT' into p_prg.
call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = p_prg
filetype = 'ASC'
append = 'X'
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
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 = ' '
IMPORTING
FILELENGTH =
tables
data_tab = t_download
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endloop.
Enjoy... and do reward if helpful
‎2008 May 06 1:24 PM
Hi,
Please refer the link below:
http://www.saptechnical.com/Tips/ABAP/DownloadPackagePrgs.htm
Thanks,
Sriram Ponna.