cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate checking based on the content of the incoming file

Former Member
0 Kudos

Hi,

We have a requirement where in we have to check whether a file has been duplicated or not based on the contents of an incoming file.The threads which I have seen in SDN deal with the duplicate checking based on the filename of the incoming file.

The incoming file has the following structure :

Recordset Occurance-1

|....... Idoc Occurance 1...unbounded

|...... segment Occurance 1

We are required to make a check based on certain fields which occur in the segment.There are about 4 fields which we will have to take from the incoming file and carry out the check.These 4 fields exist in different segments.We will have to update a ztable with these 4 fields and then perform an rfc lookup to check for the contents of the incoming files with this table,and reject or process the file based on whether the entries exist in the table or not.

Please let me know if there is any way this can be achieved.

Appreciate if anyone could help me on this.

Thanks and Regards,

Induja

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Check my Blog where the filename is stored and a RFC lookup is done to avoid duplicate files.

For your requirement store the record instead of the filename.

Thanks

SaNv...

Former Member
0 Kudos

Hi SanV,

Thanks for the reply.Mine is a file to proxy scenario.The incoming file has the format which I have mentioned above and the fields I have to update in the table is a part of the element 'segment'.I do not want to update the entire segment in the table.I want to update only parts of the segment in the table using which I can check the uniqueness of each incoming file.

For example :

<segment>a1234bcd efg5678 hijklmnqrs</segment>

<segment>b1112tuv wxy..</segment>

Now I want to update only the highlighted fields in the table and perform the check.For this should I import the entire record and then check for the required fields in that and then update those fields alone in the table?

Based on the output of this,I want to either send out a mail for the rejected files or pass it on to the mapping which routes the data to the proxy.

Please could you give me any more ideas.

Thanks and Regards,

Induja

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

>>I do not want to update the entire segment in the table.I want to update only parts of the segment in the table using which I can check the uniqueness of each incoming file.

Remember passing WXY alone will always reject any file that has a record combination of WXY means if WXY is updated in the table for record b1112tuv wxy and the next time if the same WXY is passed for another record let it be C888tuv wxy the record will be considered as a duplicate logically, but it is not the one in actual.

>><segment>a1234bcd efg5678 hijklmnqrs</segment>

>><segment>b1112tuv wxy..</segment>

How you determine the value that will be passed to the RFC. In segment occurance 1 no value is passed and in the other a value is there to be passed.

Thanks

SaNv...

Former Member
0 Kudos

Hi SanV,

For example,

<segment>a1234bcd efg5678 hijklmnqrs</segment>

<segment>b1112tuv wxy..</segment>

Now I want to update the table with 1234,5678,lmn and 1112.And these are the fields which I want to use for checking the uniqueness of the incoming field.And these fields are distributed in such a way that they do not come in the same segment node.

However,the segment can be identified by the first field in it,in this case a and b.As per our requirement,we have two segments(not consecutive ones) from which we will have to take 4 fields that will have to update the table and will also serve to check for duplicates.The incoming files will have to be checked against all these 4 entries and only then decided whether to be processed further or rejected.

Please could you let me know if you have any ideas on this.

Thanks and Regards,

Induja

Former Member
0 Kudos

Hi,

Please could anybody give any more ideas on this.

Thanks and Regards,

Induja

Answers (3)

Answers (3)

kkram
Contributor
0 Kudos

Hello

I would rather do the duplicate check in the ABAP proxy instead of the RFC lookup and throw an application if there was a duplicate. It is cleaner than doing RFC lookup in mapping on both performance as well as design.

Thanks

KK

Former Member
0 Kudos

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5877---- [original link is broken] [original link is broken] [original link is broken]


Imp

/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1888-----Imp [original link is broken] [original link is broken] [original link is broken]

bhavesh_kantilal
Active Contributor
0 Kudos

lol, wats this reply?

Former Member
0 Kudos

Use RFC lookup to achive below thing