cancel
Showing results for 
Search instead for 
Did you mean: 

what is the purpose of this fuction

Former Member
0 Kudos

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);

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

....

Former Member
0 Kudos

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

former_member187339
Active Contributor
0 Kudos

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

Former Member
0 Kudos

sure...........

former_member200962
Active Contributor
0 Kudos

It will dynamically create filename.....to know more search with keywords Dynamic Configuration

Regards,

Abhishek.

Former Member
0 Kudos

Hi Abhishek,

Willl it create filee with Time stamp in folder

former_member200962
Active Contributor
0 Kudos
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]