cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Filename Error

former_member750652
Contributor
0 Kudos

Hi all,

I have the requirement of getting same file name with timestamp on the receiver side (EX.Filename_timestamp) by modifying the Adapterspecific messageattributes refering the following blog

and wrote the code as specifeid in the blog as follows mapped to some


dummy variable on the target side 

 //write your code here

String FileName    = "";
String TimeStamp = "";

DynamicConfiguration conf1 = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);


DynamicConfigurationKey key1 = DynamicConfigurationKey.create            ("http:/"+"/sap.com/xi/XI/System/File","FileName");

FileName = conf1.get(key1);

TimeStamp  = container.getTransformationParameters().get

(StreamTransformationConstants.TIME_SENT).toString();


FileName = FileName.replaceAll( ".txt" ,"_" );
FileName = FileName;
conf1.put(key1,FileName);

return  FileName;  

but iam getting an error as follows in the receiver side communication channel moniroting.


Message processing failed. Cause:com.sap.aii.af.ra.ms.api.RecoverableException: Rename failed.: 
com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed. 


 An error occurred while connecting to the FTP server '10.6.161.65:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.'. For details, contact your FTP server vendor. 

Can anybody give me an idea of how to reslove the error.

Thanks,

Ram.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

check if your ftp server have predefined maximum limit on length of filename ,

(try small name or by giving without time stamp)

sunilchandra007
Active Contributor
0 Kudos

Hi,

> An error occurred while connecting to the FTP server '10.6.161.65:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.'. For details, contact your FTP server vendor.

Check that your Id doesn't have authorisation to rename the file.

Regards,

Chandra

former_member750652
Contributor
0 Kudos

Hi Sunil,

i gave all permissions for my FTP (RWADCL) .Still the problem persists.

Thanks,

Ram.

former_member200962
Active Contributor
0 Kudos

I dont think it is a permission issue...it seems to be due to the way the UDF is defined....are you successful in giving the fileName (without TImeStamp)....

also can you change the String FileName = ""; to String fileName = ""; .....may be it is conflicting with the

DynamicConfigurationKey key1 = DynamicConfigurationKey.create ("http://sap.com/xi/XI/System/File","FileName");

Also when you do Dynamic Configuration the return statement is not needed....the value gets populated into the ASMA attribute directly....

Edited by: abhishek salvi on Jun 12, 2009 12:59 PM