Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Substitute function module or method for TH_DOWNLOAD_BINFILE ?

Former Member
0 Likes
1,003

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

1 ACCEPTED SOLUTION
Read only

former_member209703
Active Contributor
0 Likes
908

ARCHIVFILE_SERVER_TO_CLIENT ?

6 REPLIES 6
Read only

former_member209703
Active Contributor
0 Likes
909

ARCHIVFILE_SERVER_TO_CLIENT ?

Read only

0 Likes
908

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.

Read only

0 Likes
908

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

Read only

0 Likes
908

And creating a copy of the standard FMs to bypass those restrictions is not an option? It would be the easiest way....

Read only

0 Likes
908

Thanks Sandra,

I was looking for single function module or method which has all the functionalities of TH_DOWNLOAD_BINFILE, without authorization check.

Arun.

Read only

0 Likes
908

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