Is there any way to retreive the FileName in the mapping

Is there any way to retreive the FileName and so that I can use that in my mapping. This is FILE2RFC scenario with NO BPM.
   I am using the adapter specific message attributes in the file sender CC.
Thanks,
Ravi
null

Yes you can retreive it.  Create an simple user defined function in the mapping and use the following code.
Imports: com.sap.aii.mapping.api.*;
Parameter: String filename
Paramter: String filename;
filename = fileName + ".DAT";
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
conf.put(key, filename);
return filename;
Or
Just do whatever mentioned in this weblog:
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
---Satish

Similar Messages

Maybe you are looking for