Application Development 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: 

Download file from appliction server to Shared network drive in Background

kishore_babu21
Explorer
0 Kudos

Hi,

I want to transfer the file from application server to the shared drvie (
server\shared\common\ example). How can I achieve this requirements. It's not FTP , GUI_DOWNLOAD not working in background mode. Thanks in advance.

Thanks & Regards

Kishore.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Very BASIC development concept: Note that there are three letters on the front of GUI_DOWNLOAD. There is no GUI client/server when you are in background. GUI_DOWNLOAD uses components of the SAP desktop to perform this download and save the file, but the process is NOT connected to a PC when the process is executing in background. FTP to somewhere in the network, if you can.

6 REPLIES 6

Former Member
0 Kudos

Very BASIC development concept: Note that there are three letters on the front of GUI_DOWNLOAD. There is no GUI client/server when you are in background. GUI_DOWNLOAD uses components of the SAP desktop to perform this download and save the file, but the process is NOT connected to a PC when the process is executing in background. FTP to somewhere in the network, if you can.

mrio_espinheira
Participant
0 Kudos

Hi,

If the destination folder is shared and can be accessed via SAP, then you can use FM EPS_FTP_PUT.


call function 'EPS_FTP_PUT'
  exporting
    rfc_destination          =
    local_file               =
    local_directory          =
    remote_file              =
    remote_directory         =
    overwrite_mode           =
    text_mode                =
    transmission_monitor     =
    records_per_transfer     =
    requested_file_size      =
    monitor_title            =
    monitor_text1            =
    monitor_text2            =
    progress_text            =
    object_name              =
  importing
    local_directory          =
    local_path               =
    remote_file              =
    remote_directory         =
    remote_path              =
    file_size                =
    local_system_info        =
    remote_system_info       =
  exceptions
    open_input_file_failed   = 1
    open_output_file_failed  = 2
    read_block_failed        = 3
    write_block_failed       = 4
    close_output_file_failed = 5
    invalid_file_size        = 6
    stopped_by_user          = 7
    invalid_input_file_size  = 8
    restart_failed           = 9
    connection_failed        = 10
    invalid_version          = 11
    others                   = 12.
if sy-subrc <> 0.
  message id sy-msgid type sy-msgty number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.

Regards,

Mário Espinheira

former_member214857
Contributor
0 Kudos

Hi Kishore

You can use statements below to achieve this:

- OPEN DATASET (file path + file name ).

- TRANSFER

- CLOSE DATASET

Kind regards

Carlos Machado

0 Kudos

Hi Carlos Machado

I have tried this too, OPEN DATASET is not working for this requirement.

- OPEN DATASET (file path + file name ).

- TRANSFER

- CLOSE DATASET

thanks for your reply,

Thanks & Regards

Kishore

Former Member
0 Kudos

Hi,

Sometimes some folders are not visible in background mode. In those cases the prog will work in foreground but not in background.

In your case example folder may not work in background for that reason. And GUI_DOWNLOAD will not work in background.

You need to use Open data set.....

Regards,

Amitava

jj
Active Contributor
0 Kudos

GUI_DOWNLOAD function module will not work in background mode.

Either if this shared location should be part of applicaiton server location (Visible in Tcode :AL11)

(Then you can achieve this with Open dataset cammands )

or its should be some FTP location.

then only background sheduling is possible.