cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the duplicate files.

Former Member
0 Kudos

Hi Experts,

I have the requirement that i need to handle the duplicate files i.e. if there is more then one file present for a particular day then i need to discard the second file and to raise an alert also.

Can any one please suggest me the alternate ways to handle this.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Check this blogs, for validating the duplication,

/people/swaroopa.vishwanath/blog/2005/06/24/generic-approach-for-validating-incoming-flat-file-in-sap-xi--part-1

/people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-ii

/people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-i

Regards,

Nithiyanandam

Former Member
0 Kudos

Hi,

Hi,

For this type of requirement u need to use the lookup.

Follow the steps

1) Creat UDF which hold the file no from the input element and map the output of UDF to target root nod. the output which returns to this UDF is either True or fale so if its true then it will run the scenario and if it is false then it will reject that file and raise an alert.

2) pass file no to R3 system using.

3) Maintain one table in R3 which will hold the file no.

4) When the first time ur scenario rund the file no is passed through UDF to R3 system and in the FM u need to write a program which will update the file no in table.

5) For the second time again file no is passed to R3 and in the UDf u need to first select teh value from table and compare the value with the value which is passed if its not equal then update the new value and if it is equal then raise an alert using the SALERT_CREATE function module.

See the document for alert and lookup.

Alert:

For raising an alert you need to first configure the alert please follow the below weblog written by Michal Krawczyk

/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step

Configuration steps are: go to transaction ALRTCATDEF

1) Define Alert Category

2) Create container elements which are used for holding an error messages.

3) Recipient Determination.

Alert can be triggered in different ways.

1) Triggering by Calling a Function Module Directly.

/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

Lookup:

• RFC lookup using JCO (without communication channel)

/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups

• RFC lookup with communication channel.

/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

Thnx

Chirag