on 12-26-2013 11:12 AM
How to get the particular field name from mapping to comm channel to create file name dynamically?
Hi Chandra,
Please go through the below blog which explains in step by step .
SAPTechnical.COM - Enable Variable substitution in Receiver File adapter
Regards
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandra,
Please find the below answer.Still if you have query please post your Structure and the target value you want to populate.
Let us suppose assume that you have a str like below:
Test(root node)
-Header
-Body
-DocumentHeader
DocumentNumber
Then at the target side if you want to cretae the file name with the DocumentNumber then you can go for Variable substitution.Please find the below Screenshots for the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Monikandan,
Thanks for the info, but I want to create a file name in target comm channel with mapping input data.
Thanks,
Chandar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandar,
Adding to monikandan comments.
if the file name is coming xml then you can use variable substitution also.
check this blog for detail http://wiki.scn.sap.com/wiki/display/XI/Dynamic+file+name+and+directory+in+Receiver+File+Adapter+-+s...
Regards,
Muniyappan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chander,
You can create file name dynamically by below UDF in message mapping.
1. Create a UDF
2. Set Dynamic configuration
UDF will accept two parameters
public String getFileName(Container container, var1 String, var2 String) throws StreamTransformationException{
//For getting filename
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String filename = var1 + var2;
conf.put(key, filename);
return FileName;}
Best Regards,
Monikandan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.