on 04-17-2015 4:12 AM
Hello Community.
I have a proxy to file scenario with two receivers.
Receiver channels use file content conversion.
For the first receiver the file name has to be the value of a payload field in the source structure but this value can't be written into the target file, if I map it to the target structure, either XML validation or content conversion fails depending on where in the target structure I add the new field. So I can't use variable substitution to solve this.
For the other receiver, the file name has a complex structure with the organization name and the date formatted in "dd-MM-YY---HH:mm:ss".
For example: ORG-dd-MM-YY---HH-mm-ss.csv.
Processing parameter "File Construction Mode" lets me add the time stamp to the file name but not with the right format.
It would be great if any of you can help a little, I'm in a pinch now with these file names.
Thank you very much.
Hi Juan,
You can create UDF using DynamicConfiguration as mention in below blog for both files.
Combining three different aspects of PI in one shot - Process Integration - SCN Wiki
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Juan,
Please try this approach,
Add same receiver interface twice in Interface Determination.
Create two OM / MM.
UDF (Each mapping will have slightly different UDF).
public String udf_Dynamic(String var1, Container container) throws StreamTransformationException {
Map mapParameters = (Map) container.getInputHeader().getAll();
mapParameters.put(DynamicConfigurationKey.create("http://sap.com/xi/XI/Dynamic", StreamTransformationConstants.DYNAMIC_CONFIGURATION), "");
DynamicConfiguration conf = (DynamicConfiguration) mapParameters.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
//Use input var1 for First UDF and for Second UDF use Date format
DateFormat dateFormat = new SimpleDateFormat("dd-MM-yy--HH-mm-ss");
conf.put(key, ("NewDynamicName_" + dateFormat.format(new Date())) + ".csv");
return var1;
}
FYI.
You can reuse OM/MM with Parameterized Mapping Programs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Juan
Do both receiver channels belong to the same receiver business system/component? In other words, are there two receivers in the Receiver Determination step (or Receiver tab in ICO)?
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
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.