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: 

Saving a File on a specific IP Address

Former Member
0 Kudos
1,130

Dear Experts,

I have a requirement where i need to save the ABC.CSV file at a specific IP address 192.168.X.X.

This IP is not a regular FTP Server IP, this is a general IP of a remote drive which we acess for file handling.

I have tried using FTP_R3_TO_SERVER FM, but i am not able to save the file there, it gives me a return code 2 = Command Error.

Using the above FM, we can ftp files on FTP servers only and not on any other normal ips as in my case?

If this is the case, then please guide me with other solutions.

Also, my destination folder is inside many parent folders, so do i need to perform FTP_COMMAND for this?

Can anyone please help me out with this?

Thanks,

Praveen

4 REPLIES 4

Former Member
0 Kudos
285

hi,

check out this Link: [Example|;


CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = '\\192.168.xxx.xxx\folder\name.ext'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

0 Kudos
285

Thanks for the help ..

My query is resolved now.

kesavadas_thekkillath
Active Contributor
0 Kudos
285

Praveen,

Is this folder shared ?

Is it in same network domain of the application server ?

You can try it this way...

create a OS command with the credentials to access the network path along with the command to move the file. Register it in Sm69

Then execute it through SXGp_COMMAND_EXECUTE. If its a shared folder with all access rights then its not required to provide the credentials in your unix command.

I have done this once and worked fine.

You can also check this way link:[http://www.scribd.com/doc/30284918/Communication-to-Presentation-Server-in-Background-Mode-1]

Former Member
0 Kudos
285

Hi praveen,

since it is a normal workstation / ip address, it is quite possible that FTP service is not running on that machine.

So the FTP function modules will not work.

1. First check whether from your machine, u can ping that IP.

2. Second check if you can access that machine's shared folder.

In start-->run, just type
x.x.x.x\foldername

3. If the above works, then in GUI_DOWNLOAD, you can simply use the full path with the filename


x.x.x.x.\foldername\filename

Regards,

amit m.