Skip to Content

Remove date from Filename

May 19, 2017 at 01:07 PM


avatar image

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



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member May 21, 2017 at 02:15 AM


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.



Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Apu Das,

Thanks for your inputs.

I have done Java mapping and could achive it.



Evgeniy Kolmakov May 19, 2017 at 02:00 PM

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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



DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/","FileName");

filename = conf1.get(key1);

filename = filename.substring((filename.length()-9), filename.length);


return filename;


catch(Exception e)


String exception = e.toString();

return exception;


I am getting below error.

Can you pls help me on this.



gmgtz.png (12.0 kB)

It should be filename.length() ;