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: 

FTP

Former Member
0 Kudos

Can anyone please tell me what is FTP and its purpose, how it can be used

6 REPLIES 6

Former Member
0 Kudos

FTP stands for File Transfer Protocal. This is used to transfer files from one server to another server.

This will be very handy when you need to transfer file from say your SAP application server to another SAP or non SAP machine(a Warehouse system).

Let me know if you need any more details.

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Alvaro Tejada Galindo

Former Member
0 Kudos

FTP is file transfer protocol

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/0b/9a50465ccf84479e39a6d50c90fb3f/content.htm">refer this link</a>

also refer

http://abap4.tripod.com/FTP_Using_SAP_Functions.html

and

http://www.sap-img.com/ab003.htm

regards,

srinivas

Former Member
0 Kudos

HI

The file/FTP adapter enables you to exchange data with the Integration Server or the PCK by means of a file interface or an FTP server.

The file contents can be sent to the Integration Server unaltered. If the data contains Comma Separated Values (CSV), then it can first be converted into a simple XML message. This XML message is then forwarded to the Integration Server.

Conversely, file content coming from the Integration Server or the PCK can be put unaltered into a file or converted from XML into CSV format.

Text files that are to be processed by the Integration Server or the PCK must be based on the UTF-8 code page. The file/FTP adapter can use every code page that is installed in the Java runtime environment for conversion purposes

Former Member
0 Kudos

Hi,



*
* SAP FTP functions
*
* This sample program will logged into your Unix Server.
*
* Issue a Unix dir command
*
* Store the dir information in the Internal table and display it.
* 
* Make sure you can telnet in to your SAP-UNIX FTP server first.
*
* Written by : SAP Basis, ABAP Programming and Other IMG Stuff
*              http://www.sap-img.com
*
REPORT ZFTPSAP LINE-SIZE 132.

DATA: BEGIN OF MTAB_DATA OCCURS 0,
LINE(132) TYPE C,
END OF MTAB_DATA.

DATA: MC_PASSWORD(20) TYPE C,
MI_KEY TYPE I VALUE 26101957,
MI_PWD_LEN TYPE I,
MI_HANDLE TYPE I.

START-OF-SELECTION.

*-- Your SAP-UNIX FTP password (case sensitive)
MC_PASSWORD = 'password'.

DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.

*-- FTP_CONNECT requires an encrypted password to work
CALL 'AB_RFC_X_SCRAMBLE_STRING'
     ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
     ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
     ID 'DSTLEN' FIELD MI_PWD_LEN.

CALL FUNCTION 'FTP_CONNECT'
     EXPORTING
*-- Your SAP-UNIX FTP user name (case sensitive)
       USER            = 'userid'
       PASSWORD        = MC_PASSWORD
*-- Your SAP-UNIX server host name (case sensitive)
       HOST            = 'unix-host'
       RFC_DESTINATION = 'SAPFTP'
     IMPORTING
       HANDLE          = MI_HANDLE
     EXCEPTIONS
       NOT_CONNECTED   = 1
       OTHERS          = 2.

CHECK SY-SUBRC = 0.

CALL FUNCTION 'FTP_COMMAND'
     EXPORTING
       HANDLE = MI_HANDLE
       COMMAND = 'dir'
     TABLES
       DATA = MTAB_DATA
     EXCEPTIONS
       TCPIP_ERROR = 1

       COMMAND_ERROR = 2
       DATA_ERROR = 3
       OTHERS = 4.

IF SY-SUBRC = 0.
  LOOP AT MTAB_DATA.
    WRITE: / MTAB_DATA.
  ENDLOOP.
ELSE.
* do some error checking.
  WRITE: / 'Error in FTP Command'.
ENDIF.

CALL FUNCTION 'FTP_DISCONNECT'
     EXPORTING
       HANDLE = MI_HANDLE
     EXCEPTIONS
       OTHERS = 1.    



Regards

Sudheer

former_member223537
Active Contributor
0 Kudos

If you want to transfer file from Application server to presentation server or vice versa, you require File Transfer Protocol.

try transaction CG3Y or CG3Z and you will automatically understand what is FTP

Former Member
0 Kudos

HI

FTP: Bread and Butter File Transfer.

File Transfer Protocal (FTP) is a method of sending and receiving files. There are vast stores of files available worldwide through anonymous ftp. This makes FTP an essential tool to understand.

Background Info:

There are MANY methods for sharing information on the Internet. FTP is yet another. With FTP, however, the point is to have direct control over an individual file. You specify exactly where the file comes from and specify exactly where the file will go.

The most direct way to use FTP is to have a program designed to perform FTPs directly. A shareware program called WinFTP . Alternatively, if you have a Mac system, pick up your version of Fetch.

You can also use netscape to perform ftp tranfers. Just open a URL like the following one:

ftp://ftp.microsoft.com

It is composed of "ftp://" and the host name of the anonymous ftp server. This will put you in the server's startup directory. Doing it this way makes browsing the server nice, and netscape will try to display any file that it is able to before you have to save it to your hard drive as a separate file, which you do with the Save As command under the Netscape file menu. For this Microsoft example, the file called dirmap.htm is a helpful directory of their server.

Two Kinds of FTPing:

There are two basic kinds of files, text and binary. There is an FTP method for each. Pictures, sounds and programs are binary files. Text files are (you guessed it) text files! (That is, the file contains only ascii text.) If you try to transfer a binary file using text transfer mode, it won't work. Transfering a text file using binary mode is not advised.

Software Databases:

"Archie" is a database of files available from a large number of anonymous FTP servers. Check out this WWW Archie page. You use Archie when you know the name of a file that you want, but you don't know where it is stored. Try using archie to search for a file called "doom" without the quotes. This is a popular game played by people all over the world.

Another good place to look for PC specific software is at the PC Harvest Software Broker. Here is Yahoo's list of Mac Archives.