cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate File check

Former Member
0 Kudos

Hi All,

When we process file from ftp, bymistake if the legacy people place the same file.How can we identify the file is processed.

Regards,

venu.

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you can get the name of your file

and put it in a table (in an abap mapping for example)

and check inside the same mapping

if the table already containes the file name

and if so finish the mapping if not continue

Regards,

michal

Former Member
0 Kudos

Hi Michal,

Thank u very much, but how can we do this ?could u pls clarify the following doubts? I'm new to ABAP mapping..

Do we need any BPM process for it?

How can we get the name of file and how to put in a table?

If i found same file in a table how can i reject mapping?

Regards,

venu

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>How can we get the name of file and how to put in a table?

if you have < sp14 you can do it with a simple adater module

if you have sp14 and above you can do it with adapter message properties

>>>Do we need any BPM process for it?

no, just a simple abap mapping

>>>> and how to put in a table?

a standard table in ABAP (mapping)

>>>If i found same file in a table how can i reject mapping?

by mapping some value which will end the BPM

if you use the BPM for example

Regards,

michal

Former Member
0 Kudos

Hi Michal,

Could u pls tell me where i should write this module, and how to call in XI? If I could know it i may write the necessary logic inside.

Right now I'm having SP9 , but they r going to upgrade it to SP14 in coming days.

How to stop message processing , if i could find the same file?

If u don't mind , could u pls explain detailly

Regards,

venu

MichalKrawczyk
Active Contributor
0 Kudos

>>>>Right now I'm having SP9 , but they r going to upgrade it to SP14 in coming days.

wiat for sp14 then it's so easy with it

have a look at my weblog on how to get the filename

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

>>>How to stop message processing , if i could find the same file?

if you find the same name you map X in some tag for instance

in the BPM sinde a switch step you do - if X then

cancel process

and that's it

Regards,

michal

Answers (2)

Answers (2)

STALANKI
Active Contributor
0 Kudos

You have an alternative way around.

We used a RFC which will take filename and update in the datbase in a table like zduplicate which has two fields filename and flag.You update the flag as read initially and after succeessful sending of Idoc we call the RFC and update it as 'P'.

So if the same file is fed in we check in the table wether the filename = 'P' .if yes we reject it before even processing it.

You can do it in the message mapping by opening a sap jco also.

it z upto u to decide what is feasible for ur project.

Former Member
0 Kudos

Or, you can write an adapter user-module and check the file name. If duplicate than do not send the message to XI. This way, you will not incur the overhead of XI server's message processing.

Regards,

Bill