Ver Mensaje Individual
  #9  
Viejo 11/03/15, 11:50:06
coloso coloso is offline
Senior Member
 
Fecha de Ingreso: feb 2006
Mensajes: 110
Lo primero de todo prueba que te hace la conexión desde SAP, te da algún mensaje de error o algo ?????

Pruebo con esto para ver si te hace conexión...

data: ftp_user(64), "VALUE 'clones', "Case sensitive
ftp_pwd(64), "VALUE '2133', "Case Sensitive
ftp_host(50), "VALUE '192.xxx.xxx.xxx', "I.P. FTP server
rfc_dest like rscat-rfcdest value 'SAPFTPA',
hdl type i,
key type i value 26101957,
dstlen type i,
cmd(255),
ftp_file type string,
slen type i.

move: tserv-usuario to ftp_user,
tserv-password to ftp_pwd,
tserv-ip to ftp_host.

describe field ftp_pwd length dstlen in character mode. "Añadido IN CHARACTER MODE POR EL TEMA DE UNICODE ALFONSO PEREZ 30/06/2014
slen = strlen( ftp_pwd ).

* conectamos.
call function 'HTTP_SCRAMBLE'
exporting
source = ftp_pwd
sourcelen = slen
key = key
importing
destination = ftp_pwd.

***Connect to FTP
call function 'FTP_CONNECT'
exporting
user = ftp_user
password = ftp_pwd
host = ftp_host
rfc_destination = rfc_dest
importing
handle = hdl
exceptions
not_connected = 1
others = 2.

if sy-subrc ne 0.
write:/ 'COULD NOT CONNECT TO', ftp_host.
g_flag_conexion = 'FALSE'.
else.
write:/ 'Conexión(OK): ', ftp_host.
g_flag_conexion = 'TRUE'.
move ftp_host to g_errores-line.
append g_errores.
endif.

Ya me dirás que pasa...........
Salu2.
Responder Con Cita