on 09-11-2015 5:23 AM
Hi Experts,
Could you please help me in achieving in below requirement.
Scenario: XML to Proxy
1. Need to get the Source file name and populate it to Target File Name.
2. If using the Dynamic Configuration --- we cant test the mapping at mapping level,
So, we need to use input parameter, as we need to test the mapping.
Thanks,
MR
its a bit unclear as you said that you have a scenario xml to proxy then why and where would you write the filename what is the use of target file name if the target is proxy and not file
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use this code
public String getFileName(Container container){
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = conf.get(key);
return SourceFileName;
}
Map this UDF to root element or any dummy field in target XML.
In Receiver CC you need to set these
1. Receiver Comm Channel has ASMA , file name and "fail if ASMA missing" ticked.
2. in receiver communication channel -> File access parameters-> File name scheme -
> put any value say "*". This step is not compulsory.
use variable substituion
3. In target directory of receiver CC put the name of the directory where you need the file to be formed.
Hello Mahi,
Variable substitution is for writing the filename with content of the XML path.
your scenario is proxy, so you cant use VS.
And to get the filename you need to use UDF(Dyanmic configuration),To test in mapping just remove the UDF and test it. That is the only go.
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 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.