SAP Certification
SAP Download
SAP Companies India
SAP Books
SAP JOBS
SAP jobs in India
SAP ABAP jobs in India
SAP BASIS jobs in India
SAP BI jobs in India
SAP CRM jobs in India
SAP FICO jobs in India
SAP Fresher jobs in India
SAP HR jobs in India
SAP MM jobs in India
SAP PM jobs in India
SAP PP jobs in India
SAP SD jobs in India
SAP XI jobs in India
|
A sample ABAP program for understanding how to program with FTP function Module in ABAP.
Show Full Details
FUNCTION Y_FTP. *"---------------------------------------------------------------------- *"*"Local interface: *" IMPORTING *" VALUE(USER) *" VALUE(PWD) *" VALUE(HOST) *" TABLES *" COMMANDS *" EXCEPTIONS *" NO_SUCH_FILE *"----------------------------------------------------------------------
DATA: W_USER(12) TYPE C , W_PWD(20) TYPE C , W_HOST(64) TYPE C.
DATA: HDL TYPE I, KEY TYPE I VALUE 26101957, DSTLEN TYPE I.
DATA: BEGIN OF RESULT OCCURS 0, LINE(100) TYPE C, END OF RESULT.
DESCRIBE FIELD PWD LENGTH DSTLEN.
CALL 'AB_RFC_X_SCRAMBLE_STRING' ID 'SOURCE' FIELD PWD ID 'KEY' FIELD KEY ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD PWD ID 'DSTLEN' FIELD DSTLEN.
CALL FUNCTION 'FTP_CONNECT' EXPORTING USER = USER PASSWORD = PWD HOST = HOST RFC_DESTINATION = 'SAPFTP' IMPORTING HANDLE = HDL.
LOOP AT COMMANDS. IF COMMANDS NE ' '. CALL FUNCTION 'FTP_COMMAND' EXPORTING HANDLE = HDL COMMAND = COMMANDS TABLES DATA = RESULT EXCEPTIONS COMMAND_ERROR = 1 TCPIP_ERROR = 2. LOOP AT RESULT. WRITE AT / RESULT-LINE. IF RESULT CS 'error'. RAISE NO_SUCH_FILE. ENDIF. ENDLOOP. REFRESH RESULT. ENDIF. ENDLOOP.
CALL FUNCTION 'FTP_DISCONNECT' EXPORTING HANDLE = HDL.
ENDFUNCTION.
Show Most Readed SAP Tutorials
Most readed SAP Tutorials
Show Latest Added SAP Tutorials
Latest Added SAP documents
|
"Site covers most of the SAP technical and functional tutorials, articles, interview questions and PDF study materials . List and details of SAP transaction codes ( tcodes ), Tables, report names, Bapi, ABAP programming syntax and keywords are also available in the site.
Information on SAP Certification and training, latest SAP jobs in India, ABAP interview questions are useful for SAP professionals seeking for a career in SAP as a fresher or experienced.ABAP tutorial downloads on BDC, LSMW, BAPI, ALE, IDOC, Smartforms, Sapscripts etc etc are also added.Now you can read from this page about ABAP Program of FTP Function Module" |