Skip to Content
author's profile photo Former Member
Former Member

Ftp from sap server

Hi,

I need to transfer my file from sap server directory to a location at ftp.

I just cant figure out how to reach that directory. I wrote to that directory with open dataset but cant transfer it.

I am trying this program to test my command lines

RSFTP002

my sap server directory is when i check al11 it shows

E:\usr\sap\PDD

How should i write this in that program as parameter command

i tried

lcd /usr/sap/PDD

it says invalid directory

Also in my code

CONCATENATE 'lcd' w_file_path INTO command SEPARATED BY space.

CALL FUNCTION 'FTP_COMMAND'

EXPORTING

handle = mi_handle

command = command

TABLES

data = mtab_data

EXCEPTIONS

tcpip_error = 1

command_error = 2

data_error = 3

OTHERS = 4.

CHECK sy-subrc = 0.

i just get same error please help me what to write for the file path

Thank you

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Dec 03, 2010 at 02:53 PM

    better use rsftp004 !

    grx

    Andreas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2010 at 08:56 AM

    Hi,

    First you have to connect to the ftp using FTP_connect which ask for the id, password and HOST name , which return the handle.

    Then pass the command either binary or ascii , the type of file you want to trasfter as in ftp_command along with the handle.

    then again make one more command

    put /usr/tmp/abc.txt   /home/td_F/abc.txt

    and again call the ftp_command with the handle you get during the ftp connect.

    it will transfer the file.

    Note: It will recognize the local commands or file path .

    for eg put c:\test to /home/td_F/abc.txt

    for this you have to require the put it into the application server then FTP it.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2010 at 09:52 AM

    Hi,

    Thank you for answers.

    I solved it. The problem was the ftp connection options from sm59. SAPFTP from aplication server solved it.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.