cancel
Showing results for 
Search instead for 
Did you mean: 

File Name Scheme - Receiver Adapter

Former Member
0 Kudos

Hi,

I have a File Receiver Adapter which is using content conversion to take in XML and output a file. I want the output file to be called EOD286ccyymmdd.txt where ccyymmdd is the current date. Seems to be 2 options for file names:

1. Add Time Stamp: No use as this adds the Date & Time. I only want the date.

2. Variables: Don't think I can use this as it only seems to work if the data is part of the XML message packet. The date in ccyymmdd format is not contained in the XML anywhere.

Is there anyway of getting the File Scheme Name I want ?

Cheers,

PaulC.

Accepted Solutions (0)

Answers (4)

Answers (4)

pedro_baroni3
Active Contributor
0 Kudos

Hi Paul,

Or you can use UDF with Dynamic Configuration, see:

[Combining three different aspects of PI (ASMA, AF Module and variable substitution) in one shot|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13864] [original link is broken] [original link is broken] [original link is broken];.

Regards.

Pedro Baroni

naveen_chichili
Active Contributor
0 Kudos

Hi Paul,

You can rum operating system command after processing and rename the file as you required...

Regards,

Naveen

pedro_baroni3
Active Contributor
0 Kudos

Hi Paul,

You can use the "Variable Substitution" in Comm Channel Receiver.

See the Blog below:

[Dynamic File Name using XI 3.0 SP12 Part - I|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1888] [original link is broken] [original link is broken] [original link is broken];.

For this you can use the Date Function "currentDate", see:

[http://www.freeimagehosting.net/5aee9]

[http://www.freeimagehosting.net/fe924]

[http://www.freeimagehosting.net/9e30d]

[http://www.freeimagehosting.net/e1eab]

Best Regards.

Pedro Baroni

Former Member
0 Kudos

Hi,

You have one option in the File adapter receiver channel: 'Run Operating System command After message processing", where you can give any std OS command or you can give batch file (.bat) to run after the message processing. In batch file, you can write a set of commands which would rename the file according to your name format.

Another bit complex solution is create your own custom adapter module and change the file name scheme.

Thanks,

RK