Problem writing file to FTP
whan i am writing the file to FTP in foreground it is working fine.but in backgruond it is failing .what would be the problem...
i using the below code..
FORM ftpfinanceaccess_download USING p_host
p_user
p_password.
DATA :
dest LIKE rfcdes-rfcdest VALUE 'SAPFTP',
compress TYPE c VALUE 'N',
host(64) TYPE c.
DATA: hdl TYPE i.
DATA: BEGIN OF result OCCURS 0,
line(100) TYPE c,
END OF result.
DATA : key TYPE i VALUE 26101957,
dstlen TYPE i,
blob_length TYPE i.
host = p_host .
DESCRIBE FIELD p_password LENGTH dstlen IN CHARACTER MODE.
CALL 'AB_RFC_X_SCRAMBLE_STRING'
ID 'SOURCE' FIELD p_password ID 'KEY' FIELD key
ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD p_password
ID 'DSTLEN' FIELD dstlen.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = p_user
password = p_password
host = host
rfc_destination = dest
IMPORTING
handle = hdl
EXCEPTIONS
not_connected = 1
OTHERS = 2.
IF sy-subrc = 0.
CONCATENATE 'cd' ftppath INTO ftppath SEPARATED BY space .
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = ftppath
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc = 0 .
CLEAR result .
REFRESH result .
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = 'ascii'
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc = 0 .
DESCRIBE TABLE iresult LINES lines.
blob_length = lines * width .
clear : lines.
Delete the existing file
CONCATENATE 'del' ftpfile INTO delfile SEPARATED BY SPACE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = delfile
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
*End of deleting the existing file
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = hdl
fname = ftpfile
blob_length = blob_length
CHARACTER_MODE = 'X'
TABLES
TEXT = iresult
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF sy-subrc <> 0 .
WRITE 'Error in writing file to ftp' .
ELSE.
WRITE 'File downloaded on the ftp server successfully'.
ENDIF.
ENDIF.
ELSE.
WRITE : 'Path on ftp not found : ' , ftppath .
ENDIF.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = hdl.
CALL FUNCTION 'RFC_CONNECTION_CLOSE'
EXPORTING
destination = 'SAPFTP'
EXCEPTIONS
OTHERS = 1.
ELSE.
WRITE 'Could not connect to ftp' .
ENDIF.
Similar Messages
-
Connection refused Error while writing file to FTP server.
Hi All,
We got below error while writing file to FTP server. Any one have any idea on this?
sABCS_1.0_8e88588d4fb54ebd2ac7ef66c8421d52.tmp/writeEncryptedFile.wsdl [ Put_ptt::Put(opaque) ] - Could not invoke operation 'Put' against the 'FTP Adapter' due to:
ORABPEL-11429
Error sending file to FTP Server.
Unable to send file to server. [Caused by: Connection refused]
Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space.Hmmm ...
Same issue as your post from three months' earlier?
Re: Error while putting file in sftp location. -
Director 12- can't create a windows projector - problem writing file error
I am trying to create a windows projector of a project. when I get the following error - problem writing file - file name- Can't compress file that has been modified and not saved. The file has not been modified and has been saved. Any help would be great.
Hi.
You say you have tried publishing to a new empty folder. From the video I can see that the folder has table1.app in there (25 secs in) which is a Mac projector that has been published.
Yet you have Windows Projector checkbox ticked at the start of the video.
I publish Mac and Windows projectors to entirely seperate folders as a matter of practice.
I call the folders "Published" and "PublishedMac" and that is where the respective projectors for each piece of software lives.
Perhaps there is some mix up between Mac and Windows publishing that is going on because
you are publishing both to the same folder?
Hope this helps.
Richie -
Hi,
I'd like to upload a file with an ftp. I declared a method using an url as follow :
public static void uploadFile(File fileToMove_p, String newFileName_p) {
try {
URL url_l = new URL("ftp://[uid]:[pwd]@localhost/" + newFileName_p);
URLConnection connection_l = url_l.openConnection();
OutputStream output_l = connection_l.getOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(output_l);
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(fileToMove_p));
int i;
while ((i = bis.read()) != -1) {
bos.write(i);
catch (IOException ex) {}
But when I oppen my new file, it miss the end of my data. The ftp cut the few last line of my original file.
Any idear of what is happening here and how I can solve the problem ?
ThanksAre you closing the OutputStream? If not, you probably should, and closing the stream will flush it prior to closing.
HTH,
§ -
Problem writing file ANSI to UTF-8. OPEN DATASET FOR OUTPUT IN TEXT MODE
Hello everybody,
My report needs to create a file in ANSI so I am using this sentence: * "OPEN DATASET p_dir_a FOR OUTPUT IN TEXT MODE ENCODING DEFAULT."* almost all charters in the file are well generating excepting for this two: ( Á ) & ( Í ) because SAP assigns the same code to both characters ( Ã? ) = 'xC3' which is not correct, the right code should be ( Á ) = 'xC1' ( Í ) = 'xCD' respectively
from this string = ( ÁÉÍÓÚáéíóúàèìòùÀÈÌÒÙ ) only those two characters are wrong converted.
Also I tray to catch a conversion error with this sentence:
TRY.
TRANSFER <field> TO p_dir_a NO END OF LINE.
CATCH cx_sy_conversion_codepage.
MESSAGE 'error' type 'I'.
ENDTRY.
but never enters in it.
Does anyone know where I can configure SAP to SET this value correctly?
Thanks for your help.was a server problem, not SAP
-
Problem with file adapter (FTP) created under business service
Hi
I am using file adapter in my receiver communication channel. I dont know the physical existance of the system so i have created one business service. Under this business system i have created a file adapter with FTP protocol. I have given all the parameters. But when i am trying to execute my scenarion i am getting the following error in SXMB_MONI.
com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_SQLMediaCodeToCRMCapaign_: RuntimeException in Message-Mapping transformatio~
In RWB i am getting the following error.
Mapping Error
Execption_During_Execution
In Communication Channel monitoring I am not getting any information regarding receiver file adapter. Its not showing any message either error or sucessful. How to find whether my receiver communication channel FTP parameters configured correctly or not.What is the error. Please help me.
Regards
SowmyaSomya,
Error clearly indicates that issue is with mapping....so there is no point of checking receiver adapter..
BTW for checking whether the FTP site is working properly or not , you can use any ftp client softwares or command prompt of windows also.
---->In Communication Channel monitoring I am not getting any information regarding receiver file adapter. Its not showing any message either error or successful.
Message has not reached up to that level so no point of looking at receiver communication channel.
Regards, -
Problem archiving file using FTP adapter
Hi,
I am polling some files from another server using FTP adapter in SOA 11g. Even though I have checked the option to archive the files, the files get archived successfully on the server where the SOA process is running, but I am unable to archive the files on the server from which I am reading the file
I am not sure whether this is the default behaviour or is there any way to archive files on the same server from which I pick or read the file.
Any help is appreciated.
Thanks,
NamrataHi Neeraj,
Thanks, the archiving in the remoteLocation worked by doing what you told me...
I tried archiving to the local machine which is not working for me ... i gave both the properties as below...
<property name="UseRemoteArchive" value="false"/>
<property name="PhysicalArchiveDirectory" value="C:\Users\naresh\Desktop\ftp"/>
Thanks,
Naresh -
Hi --
I have a .dir file that was created around 2003. I need to re-create it as a Flash file, so I downloaded a copy of Director 11.5. When I try to open the file, I get a window to upgrade the file. After I select the backup location, I get an error message like this: "Problem writing file 'filename'. Having trouble saving this movie."
Is there anything I can do to get around this? I don't want to edit the file, just look to see what I need to do to create it.
Thanks for any help!There were a lot of changes made in D11 & D11.5 which might be causing the errors when converting files older than version DMX2004... but, you can download a full install of the trial version of MX2004 here:
http://www.adobe.com/support/director/downloads.html#mx20041010 -
Problem in download file from FTP server
Hi
I want to download a file from FTP server for that i am using the apache FTP module but i am not getting how to download a file with that api i can dispaly the list of files and folders but not able to download the file or folder can any one help me in this
Thanks
NinadHi
I think you miss understood something I am writing a program to download the file in Java where i have used the jakarta.apache api for that and getting problem in that bellow is the code where I have written to print the directory & file names but I don't know how to download the file
FTPClient ftpConnection = new FTPClient();
ftpConnection.connect(host);
ftpConnection.login(FTPConnection.userName,FTPConnection.password);
FTPFile fileList[] = ftpConnection.listFiles();
for(int i=0;i<fileList.length;i++)
System.out.println(fileList.getName());
thanks
Ninad -
Problem while reading the file from FTP server
Hi Friends,
I have a problem while fetching files from FTP server.
I used FTP_Connect, FTP_COMMAND function modules. I can able to put the files into FTP server.
but I cant able to pick the files from FTP server.
anyone have faced similar issues kindly let me know.
Thanks
GowrishankarHi,
try this way..
for reading the file using FTP you need to use different unix command ..
Prabhuda -
Problem with downloading file from FTP server
Hello all
I have uploaded a file from an application i developed and i want to download this file from another application. The code is
public static void FTPcon() throws FtpException{
String hostname = "my.ftp.server";
String username = "myusername";
String password = "mypass";
Ftp ftp = new Ftp(hostname,username,password);
ftp.setHostname(hostname);
ftp.setUsername(username);
ftp.setPassword(password);
ftp.connect();
ftp.setBinary();
ftp.download("file.dat");
ftp.disconnect();
}The error i receive is java.io.FileNotFoundException: public.dat (The system cannot find the file specified) but the file is on the server.
Thanks in advance for any helpCotton thank you for your reply
Any other sugestions please?The server disagrees. So...
- the file does not existThe file exists.I checked it with an FTP client program.
- the file has a different nameThe file name is correct
- you are connected to the wrong serverI am connecting to the correct server
- you are in the wrong ftp directoryThe file is placed in the home directory
- the ftp library you are using is broken (less
likely)I am using the library from jscape.I dont think is broken because i can upload the file from the first application.
>
FTP isn't somehow broken in Java. I use it all the
time. The problem is something listed above. I would
check all of the first four if I were you because
that's most likely where the problem is.Message was edited by:
flightcaptain -
Sign on problems within Elements 10; plus cannot backup, writing files error with file catalog.pse10db. No indication what the problem is. How do I get adobe help with these problems?
Sign on problems within Elements 10; plus cannot backup, writing files error with file catalog.pse10db. No indication what the problem is. How do I get adobe help with these problems?
-
FTP Adapter not writing the file in FTP directory
We have desiged BPEL Process which will get data from Oracle and write in txt file in FTP directory.
For last few days, we are getting following error when we invoke the BPEL Process:
file:/u102/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_XXADS_INT033_DEL_EBS_OUT_1.0_0be42a99260084d9bd5104929a8ac1b2.tmp/DELFTPservice.
wsdl [ Put_ptt::Put(opaque) ] - WSIF JCA Execute of operation 'Put' failed due
to: Error saving control file.
Error saving control file: "/u102/product/10.1.3.1/OracleAS_1/j2ee/home/fileftp/controlFiles/ZmbNdvlpVkaee+
OddQzH2Q==/outbound/controlFile_ob.properties"
; nested exception is:
ORABPEL-11080
Error saving control file.
Error saving control file: "/u102/product/10.1.3.1/OracleAS_1/j2ee/home/fileftp/controlFiles/ZmbNdvlpVkaee+
OddQzH2Q==/outbound/controlFile_ob.properties"
Please make sure that a valid control file exists.
Can anyone help me to resolve this?
Thanks,
Hariharan RamakrishnanI tried to redo the config objects but still the same issue is there. anyone has any idea
-
Problem on upload file via ftp..
Hi afternnon,
Can have people tell me.....what is "Can't open data connection" on my upload file via ftp ????how to solve it??
regards,
mikenbelford wrote:
I cant find any way to upload the CSR either/ I dont think it exists yet. Can someone please let us know how far away it is. Same applies to the provisioning profile. I cant see any evidence of this yet either.
I am presuming that without these key pieces of the puzzle one cannot deploy to the iPhone. Can someone from Apple confirm (or correct me)
I've emailed Apple asking for clarification but I haven't heard back yet. I imagine we'll all learn what's going on at about the same time. And yes, until you get a certificate you cannot upload your apps to the iPhone (within the SDK rules).
Randy -
Problem opening file in application server received by FTP.
Hi,
I am using FTP_COPY to receive file in application server.
I am receiving file from FTP but I am unable to open them because the mode was set as 640 as in attributes.
Could you please help me in how to receive in readable format...
Any suggestions to use FTP commands?
Thanks in advance.If you do not have authorizations to open the file its easy: there is nothing you can do except contact the ftp admin.
Maybe you are looking for
-
Error on registering Flights of Fancy application(Partner Application, JPDK) provide
Hi When i try to add a provider for Flights of Fancy application i am getting this error An error occurred when attempting to call the providers register function. (WWC-43134) The following error occurred during the call to Web provider: Unable to in
-
Xcelsius exporting capabilities to Powerpoint and Word with Windows vista
I have recently bought a license for Xcelsius Present 2008 Full Product. I have Windows Vista in my computer with the version of MS Office is 2003. My problem is that the features of exporting Xcelsius visualizations to powerpoint and Word don't work
-
All of a sudden I can not listen to my itunes or watch my movies nothing happens
I've not upgraded to the new operating system, but movies and music are just not playing at all. They are all there but when I click on them nothing happens. Another strange item is that my speaker icon in the upper right corner won't let me raise
-
Creating a New database instance
Hello experts, I need to create a new database instance and later drop my old one. Can anyone send me detailled guidelines on how i should do this without experiencing any performance degradation and also alert me on anything that can go wrong. thank
-
Dynamic browser language setting
Hi, I need some information on internationalization. Let me explain the issue.. In my application I need both English and Arabic views. It is possible to Change the language through internationalization. But one more issue is there for Arabic languag