on 05-19-2017 2:07 PM
Hi SCN ppl,
The requirement is to remove date from filename and send it to target .Filename is
abc_date.csv and need to send abc.csv to target.
I read few blogs on this and I think we need to create dummy objects(as it is a pass through) in ESR and create UDF and map to root node at target.
Are there any other ways to achieve ??...
Kindly give your valuable suggestions
Thanks
SARIKA
Hi,
You need to use Java mapping for this.
Simply create one DT with any structure you wish as this will not be used for mapping. In the OM, take the Outbound and Inbound SI and in MM use Java Mapping.
Java mapping will be very simple. Just take input data through inputStream and out same data as it is using outputSteream as you don't want to do any modification in the data. In between set Dynamic Configuration as you have done in the UDF.
Try it in your interface. Let me know if you need help in Java Mapping.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarika!
Dummy objects are usually created in ID and no ESR objects are created if we really mean "pass-through".
If you want to use UDF in message mapping you should create ESR objects according to your scenario.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evgeniy,
I have created ESR objects and using below UDF to remove date from Filename.
<Filename>_20052017 need to send this filename as <Filename>.
try {
String filename = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = conf1.get(key1);
filename = filename.substring((filename.length()-9), filename.length);
conf1.put(key1,filename);
return filename;
}
catch(Exception e)
{
String exception = e.toString();
return exception;
}
I am getting below error.
Can you pls help me on this.
Thanks
SARIKA
User | Count |
---|---|
85 | |
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.