cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting file based on FileName from Adapter Module

Former Member
0 Kudos

HI SDNers,

I need to create an adapter module for Sender File Adapter which checks the name of the File and only then sends it to ABAP Stack.

Filenames will be having a date format according to which the files should be processed by PI e.g. a file having its name as 20100420.xml needs to be processed by PI system only on 20th April 2010. Adapter needs to process only these files and ignore rest of the files in the folder.

Kindly guide me on how to achieve this. I have studied the following blog by Sandeep Jaiswal [Adapter Module to stop processing of duplicate file (FTP Location)|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9664] [original link is broken] [original link is broken] [original link is broken];

but in my requirement I cannot empty the file contents since the file are not duplicate but need to be processed as per their names.

Can some experts please throw some light on this?

Regards,

Gautam Purohit

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Gauram,

Just for clarity purpose,

Will there by any other files in directory other than you wish to process, if no, you can go ahead with wild card.

If source is generating file with date stamp only then souce can change it to generate on a pattern which can be used. Files which have been processed, can be archived or delete so there are no additional / unwanted files in directory.

Additionally, if none above is appliable, you can write the code in java module & generate the file name dynamically (as per system date as you have mentioned in example ) & use it.

Regards

Sushil

Former Member
0 Kudos

Hi Sushil,

Thanks for the response.

But there can be any number of files in the directory. I dont need to change the filename or add a timestamp to it. I need to picj up only files which have the system date in their name and I need to do this at the Adapter Module Level. I am aware of how to achieve this by using dynamic configuration at mapping level. But I need to check the file and then select/deselect it at module level.

Regards,

Gautam Purohit