Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Renaming File at Receiver Side

Hi Experts,

I have developed a Adapter Module for Renaming the flile at Receiver side.

Channel channel = new Channel(cid);

fileName = channel.getValueAsString("file.targetFileName");

dirName = channel.getValueAsString("file.targetDir");

After reading the file name .i had changed the name here

fileName = fileName + "GMT" + "." + Extension;

Finally writing the payload...

com.sap.aii.af.ra.ms.api.XMLPayload xmlPay = (com.sap.aii.af.ra.ms.api.XMLPayload) msg.getDocument();

xmlPay.setText(OutPayload);

msg.setMessageProperty("http://sap.com/xi/XI/System/File", "Directory", dirName);

msg.setMessageProperty("http://sap.com/xi/XI/System/File", "FileName",NFileName);

msg.setDocument(xmlPay);

but the file name is not changed... any change needed?

Regards,

Rajesh.D

Not what you were looking for? View more on this topic or Ask a question