‎2011 Aug 30 11:10 AM
Hi All,
I need to change the function module TH_DOWNLOAD_BINFILE (to download application server template file to presentation server) and replace it with another function module or method having similar functionality. The function module has to be changed as basis team has removed AUTHORITY OBJECT 'S_ADMI_FCD' due to audit concerns and but, this function module checks for this authorization object.
Please suggest any standard function module or method very similar to TH_DOWNLOAD_BINFILE.
Thanks in advance.
Regards,
Arun Mohan
‎2011 Aug 30 11:32 AM
‎2011 Aug 30 11:32 AM
‎2011 Aug 30 12:53 PM
Thanks Jose,
But ARCHIVFILE_SERVER_TO_CLIENT has a limitation on file path length (70), my file path is longer. Is there any other function module/method?
Arun.
‎2011 Aug 30 12:54 PM
Hi,
Is it to download any file? The, you could use the official method CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD.
TYPES xx(50) TYPE x.
DATA lt_xstring TYPE TABLE OF xx.
DATA l_length TYPE i.
DATA l_filename1 TYPE string.
DATA l_filename2 TYPE string.
DATA l_xstring TYPE xstring.
DATA l_message TYPE string.
OPEN DATASET l_filename1 IN BINARY MODE FOR INPUT MESSAGE l_message.
IF sy-subrc = 0.
READ DATASET l_filename1 INTO l_xstring.
CLOSE DATASET l_filename1.
ENDIF.
CALL METHOD cl_swf_utl_convert_xstring=>xstring_to_table
EXPORTING
i_stream = l_xstring
IMPORTING
e_table = lt_xstring
EXCEPTIONS
OTHERS = 3.
l_length = XSTRLEN( l_xstring ).
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_length
filename = l_filename2
filetype = 'BIN'
CHANGING
data_tab = lt_xstring
EXCEPTIONS
OTHERS = 3.
Sandra
Edited by: Sandra Rossi - 10 minutes later
‎2011 Aug 30 2:49 PM
And creating a copy of the standard FMs to bypass those restrictions is not an option? It would be the easiest way....
‎2011 Aug 30 3:16 PM
Thanks Sandra,
I was looking for single function module or method which has all the functionalities of TH_DOWNLOAD_BINFILE, without authorization check.
Arun.
‎2011 Aug 30 3:20 PM
Jose,
I was keeping copying of the standard FM as the final option.
I guess I have no choice but to copy standard FM and by-pass the authorization check!
Thanks!
Arun Mohan