on 07-20-2012 7:37 AM
Hi,
Could anyone explain how to create the Directory Dynamically.
I chkd the below links but couldn't acheive
http://scn.sap.com/community/pi-and-soa-middleware/blog/2009/03/26/dynamic-configuration-vs-variable...
Please could any one explain me the step by step Procedure for this.
1)Create a new UDF with input parameter inputDirectory
2)Use the below code
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
"http://sap.com/xi/XI/System/File",
"Directory");
conf.put(key,inputDirectory);
return inputDirectory;
3)Value for inputDirectory(you can set a constant directory path or you can manipulate from the source to produce a value) -> UDF-> Root node of target
4)Enable Adapter Specific Message Attributes in receiver channel, tick the Directory checkbox
5)Just fill a dummy value in TargetDirectory path in receiver channel
6)Activate the objects and test your scenario, directory will be set at runtime
Message was edited by: Zameer Farook
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are gonna create folders dynamically using values in ur payload..
Refer this link
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=272171407
I guess you can achieve your requirement using same communication channel.
By using multi mapping and variable substitution together you can achieve this.
1)Change the occurrence of inbound interface in Messages tab to 0..unbounded
2)You have to determine the directory path in message mapping and set in one of the fields in target.
(Like, check for an input value to be 'A' then set directory as /FirstDirectory/, else /SecondDirectory/ to that target field)
3)Then refer the directory path target field at runtime using variable substitution
The point to note here is if your output is XML file and the directory value cannot be in the output payload, then this will not help. However for flat files you can remove that content using FCC parameters.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
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.