cancel
Showing results for 
Search instead for 
Did you mean: 

pick up the input file if delta betweeb two files is > 30%

Former Member
0 Kudos

Hi Experts,

A file is placed at the source folder..will it be possible for XI to check if previous file exists in that folder..

If yes then if th diffrence between both fields is greater than 30 % then pick up the file???

I do not see any which way it can be done in XI..

pls share ur thoughts..

Regards,

Teja

Edited by: Ravindra Teja on Jan 24, 2010 8:53 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

No standard option in SAP PI for achive your requirement.

But you can use archive option for every processed file and by using custom development function compare previous and current file. And based on comparison make a solution.

BR,

Dzmitry

Former Member
0 Kudos

Hi Dzmitry Novik ,

custom development function as in???

adapter module??

pls share ur thoughts

Answers (3)

Answers (3)

Former Member
0 Kudos

made changes at source application

Former Member
0 Kudos

Teja,

Could you please explain more in details how did you achive this requirement?

Shabarish_Nair
Active Contributor
0 Kudos

/people/shabarish.vijayakumar/blog/2009/07/30/sourcefiletimestamp--an-useful-asma this might help you identify a change in the file. but still not if the change is 30%

you might still have to maybe store the file size using the ASMA SourceFileSize in the adapter and then have a logic included to lookup the previous size and then do a math on the 30%

i must say u have an odd requirement in your hands hehe

Former Member
0 Kudos

Hi Shabarish,

Its not the file size actually...

some filed say quantity...has to be compared... then reject the new file...

yeah some strange requirement indeed...

goin bonkers trying to get it done...

Edited by: Ravindra Teja on Jan 24, 2010 1:15 PM

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>If yes then if th diffrence between both fields is greater than 30 % then pick up the file???

maybe there is an easier one - try not sending files without the difference ?

sometimes XI does not have to be used and a sender application can be customized instead

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal...

I think i did not explain therequirement clearly....

If the file has a delta greater than (30%) the previous file...I have to discard the current file in PI...

Any idea how i can achieve this???

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

maybe pick up both files (one as attachment)

then in the adapter module compare both of them and remove or not one of them on the basis of your req

Regards,

Michal Krawczyk

Former Member
0 Kudos

Thanks Michal...

Yes this is a nice idea..lemme start off right away...

I ll have to put a . right???

any help onthe code???

Would ther be some blog on reading both files or how to read an attachment using adapter modules??

appreciate ur help

Edited by: Ravindra Teja on Jan 24, 2010 11:54 AM