cancel
Showing results for 
Search instead for 
Did you mean: 

File validation for duplication

Former Member
0 Kudos

Hello All,

I am looking for the best solution for validation of duplicate file being read in xi pipeline.

1. a file will come to FTP folder...

2. XI will pick the file...and in the adapter module we just need to check whether a file with the same name arrived/processed earlier or not.

3. If it has been then generate the error flag and in the receiver determination it will be put on to the error directory

4. If it has not been processed earlier then it will go and do the work its supposed to do.

How do i check if the file has been earlier read/process by xi pipeline?

Any ideas?

Regards,

Anirban

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Anirban,

Lets suppose you are moving all successful files to archive folder.

Then for every file picked up by XI call

<b>"Run Operating System Command Before Message Processing"</b>

If the file (filename) is already available move the file to error folder else process and move it archive folder.

That helps!!

Regards,

Former Member
0 Kudos

If filename is the only way you can determine if the data is unique and you want to do this validation in XI only then one approach can be this:

As the filenames after each processing of the file are not available in XI for validation, we will have to store them in a external table in XI which will only store the filename. you can use a synchronous RFC/Proxy to insert the filename into the table and at the same time write the logic in this RFC/Proxy to return the status if the file has already been processed and the name is present in the table. you will have to use a BPM and once you receive a msg then you can map it this RFC data type and then call this RFC receiver. based on the response of the RFC/Proxy you can decide whether you want to proceed further or not.

if you want to do it in the adapter module then you can create a separate table on the same database on which XI is installed and then use the normal java JDBC connection code to connect to the table and insert the filename and check if the name is already present.

If you are comfortable with java then the 2nd approach will be better according to me as you are avoiding the BPM as well as you are figuring out at the 1st step itself if the file has to be processed or not and you can avoid creating the other data types..etc. But then in the module error handling and monitoring might be a little difficult.

Cheer's

Former Member
0 Kudos

Thanks a lot!! any other work arounds from the community ?

Regards,

Anirban

Former Member
0 Kudos

Hi Anirban !

I agree with dreamcatcher. Maybe you can use one adapter module in the sender to "check in" the file and another adapter module in the receiver adapter to "check out" the file and be sure that it was processed ok.

If you don't want to use adapter module, you still can avoid use BPM. You can start a sync RFC connection via JCO from a java UDF in graphical mapping or use the generic lookup API

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1...

Regards,

Matias.