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

upload file into another system

Former Member
0 Likes
888

Hye techies,

Is it possible to upload an excel file into another hardisk of another system if i have the system ip.

When i am using the GUI_DOWNLOAD and giving the filename as '
172.26.2.236\C:\temp' it throws an error saying Error calling Data provider.

Please help.

Note: there is a ping response from my system to Application Server and Application server to the destination system.

Thanks,

Imran.

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
821

if '
172.26.2.236\C:\temp' is mapped to your server or to your system then GUI_Download should be able to download the file to server

Hye techies,

Is it possible to upload an excel file into another hardisk of another system if i have the system ip.

When i am using the GUI_DOWNLOAD and giving the filename as '
172.26.2.236\C:\temp' it throws an error saying Error calling Data provider.

Please help.

Note: there is a ping response from my system to Application Server and Application server to the destination system.

Thanks,

Imran.

5 REPLIES 5
Read only

Former Member
0 Likes
821

Hi,

Use Open Dataset statements to upload to Application Server and then application server to the destination system.

Thanks,

sathish

Read only

0 Likes
821

Hye Satish,

How to download the file from application server to destination system.

The way it can be obtained is input using a dataset into an internal table and then use GUI_DOWNLOAD.

Again this will give a problem because it is not taking the destination path.

If this is not the procedure, please let me know the best approach.

Regards,

Imran.

Read only

former_member156446
Active Contributor
0 Likes
822

if '
172.26.2.236\C:\temp' is mapped to your server or to your system then GUI_Download should be able to download the file to server

Read only

0 Likes
821

Hye JAY,

It is mapped but still the GUI_DOWNLOAD is not working, any other approach.

Thanks,

Imran.

Read only

Former Member
0 Likes
821

Hi,

check ABAP help, command OPEN DATASET FOR OUTPUT, then TRANSFER. You can use GUI functions only if target location is visible from your presentation server. In your situation you need write to file from server, look to example.

* Write file to server
  CONCATENATE dstpath file INTO lv_filename.
  OPEN DATASET lv_filename FOR OUTPUT IN TEXT MODE.
  CHECK sy-subrc = 0.
  LOOP AT buffer.
    DESCRIBE FIELD buffer-data LENGTH reclen IN TEXT MODE.
    IF filelen > reclen.
      filelen = filelen - reclen.
    ELSE.
      reclen = filelen.
    ENDIF.
    TRANSFER buffer TO lv_filename LENGTH reclen.
  ENDLOOP.
  CLOSE DATASET lv_filename.

Note, that you have to fill bufer with lines with structure:

A1 <tab> B1 <tab> ...

A2 <tab> ...

and result will be text file with .xls suffix, not native XLS format. But Excel will open your file as expected.

Regards,

Pavel