on 10-17-2008 12:06 PM
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
You can do it without an Adapter module for this. Use a adapter specific values in CC and use that in UDF to change the file name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>I have developed a Adapter Module for Renaming the flile at Receiver side.
What was the basic motive behind development of AM?
You can put file with desired fileName using DynamicConfiguration or Variable Substitution. Of using Standard parameters of File Adapter.
Is there unique requirement for it?
Also what you are doing you can do the same in Mapping also (using DynamicConfiguration class).
Thanks
Farooq
Edited by: Farooq Farooqui on Oct 17, 2008 5:04 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Farooq,
My requirment was based on the content of the EDI file, i have to rename the file and the new file name may change on timely basis so we decided to go for Module .so that we can give name via module parameter.
In my above code i am assigning new name to fileName parameter but the file name is not changed .help me pls
Regards,
Rajesh.D
Hi
If u want to use the Time stamp it's better use the "Adapter Specific attributes" if u r using SP12 .
Use the DynamicConfiguration to capture those in the target Interface and same is passed to the Recever File Adapter as %var%.xml
Search for Dynamic configuration on SDN u wud get enough codes and docs
regards
srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.