cancel
Showing results for 
Search instead for 
Did you mean: 

XI file sender: filename validation to stop processing a file twice

Former Member
0 Kudos

Hello folks,

I have a file sender adapter for a text file with name convention that includes a date - e.g. orders_YYYYMMDD.txt. We have a business requirement to ensure that we don't post the same file more than once. The file can be huge, so it's not really an option to pick up the file contents in one message.

Options I have tried:

- I do not know of a setting in the file adapter to achieve this.

- write a perl script to read the filename and translate [hex-encode] this into a Message GUID, then post the file via HTTP adapter

- - if the file name is not too long (guid is 32 hex chars) this method works well for small files that are in XML format.

- - Text files need too much perl coding to translate to XML. Large files that need to be split will fail on the 2nd chunk.

Options I don't want to use:

- Use BPM to call an RFC/Proxy that validates the filename - this will cause me to read the whole file, or I have to implement a 'pipe' in BPM to ensure EOIO processing. (We have this elsewhere, but it's not good for performance)

- Actually, I don't want to manage this in ABAP/Ztables at all if possible.

I am about to start work on a Module Processor to mangle the GIUD in the file adapter, similar to the HTTP method above (don't have any idea of whether this will be possible yet)...

Can anyone recommend another method to achieve this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

two solutions i can think of quickly is;

1. A script that runs to check if the file name already exists and then moving the file so that it is not processed by the adapter.

2. An adapter module that checks for the same.

Former Member
0 Kudos

@Shabarish

Thanks for the reply.

- I am in the process of writing an adapter module (as I mentioned in the original post)

- An OS script that checks for filename [e.g. in the archive directory] would not allow me to do any archiving.

Former Member
0 Kudos

Hi Derek,

Intially when the file is picked then archive it to another directory.

with this the same file will not be processed twice.

Rgds,

Kumar

Former Member
0 Kudos

@Kumar

Thanks for the reply. Unfortunately this does not stop the source system from transmitting the same file twice.

Shabarish_Nair
Active Contributor
0 Kudos

<i>Unfortunately this does not stop the source system from transmitting the same file twice.</i>

>>

well then u will have to do some manipulations in the source system, which is not recommended. its better that you handle the same @ the integration level.