on 11-27-2009 7:13 AM
Hi All,
will it create file at runtime with time stamp means when the file will created it will date and time also
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String valueOld = conf.get(key);
conf.put(key,FileName);
....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI, Dynamic Configuration is a new optional parameter in XI 3.0 (SP 14) or above to access the adapter specific attributes in the PI message from the mapping.
This function reads the filename at runtime..which could be further used to name the target filename.
Refer the blog:
[http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1524276250DB01857650165891326676End?blog=/pub/wlg/4623]
Edited by: Puneet Singhal on Nov 27, 2009 8:41 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The code will put the filename to dynamic configuration but it seems incomplete as it is taking value from the Dynamic Configuration "Filename" field (and reffering it as oldValue) and update it with the new Filename (reffered in code as FileName, but the variable FileName is missing!!!!!
So the correct code shoudl be
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
*String FileName = "NewValue";*
String valueOld = conf.get(key);
conf.put(key,FileName);
Also your earlier thread was closed with a one line comment "answered". Please note that this a community forum where each one is willing to share their experience.. So instead of closing a thread with a comment ""answered" please write the steps which you have taken for the queries resolution
Thanks
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It will dynamically create filename.....to know more search with keywords Dynamic Configuration
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Willl it create filee with Time stamp in folder
Looking at the code you have given....the answer is NO
The FileName can have a Timestamp attached if you use the correct option in Receiver File CC (Add Timestamp, Add Counter, Add Message ID)
Regards,
Abhishek.
[Rules Of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.