on 01-02-2008 11:19 AM
Hi,
I am following this blog to name the target file/directory dynamically at the runtime :
/people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
But I am getting this error in the CC monitoring :
Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'interface_name ' for variable 'var1'.
Threads indeed helped.Thanks...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priya,
You can do it in two ways:
1) If your filename is coming in your payload then u can directly use variable substitution in ur rcv communication channel to get the dynamic file name at the target side.
Refer this for variable substitution: http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
2) If not then you have to write UDF which will give the filename and finally u need to map to the required target element. And need to use variable substitution in rcv channel to get the file name dynamically.
Refer this: /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Thanks,
Prasanthi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try following this weblog for dynamic file name.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Dynamic filename come under the Dynamic configuration in moni, for your messages.
This is the code used inside.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
That is why Dynamic configuration is coming in output.. It is a class to generate dynamic configuration file at runtime provided by SAP XI.
Hope this will help you.
regards
Aashish Sinha
PS : reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, i have implemented my mail to file scenario without using any design objects(IR objects) as the source and target data format is txt ony, hence I have not used any message mapping. How can i make my target filename dynamic in such a scenario. FYI, in the sorce mail attachement(txt format) the filename is appearing once, can i make use of that ?
Please help.
Hi Priya,
Just as Chirag has suggested, follow the blogs, specially the one by michael. I had used that only nd its quite useful.
Just writing the UDF will be much more simpler and easier. You just need to copy the UDF and change the attribute name with the one that you need to work upon, file/ directory name in ur case.
Thanks and Regards,
Sanjeev.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priya,
U have seen the variable substitution weblog.
Refer the weblog for dynamic file
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
U need to write the UDF in mapping for the same and also use the adapter specific message attribute
in the file communication channel.
Thnx
Chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.