Skip to Content

Automatic Duplicate Check for Resources in KM Repositories


You want to keep your repository free of duplicate documents? This small application can help you with the task. The application detects duplicate documents when they are uploaded and moves them to a duplicate folder. Using standard KM subscription on the duplicate folder a user can get notifications whenever a duplicate has been uploaded. The duplicate detection is based on comparing the hash values of documents.


SAP code or applications samples and tutorials are NOT FOR PRODUCTION USE unless specifically noted. You may not demonstrate, test, examine, evaluate or otherwise use them in a live operating environment or with data that has not been sufficiently backed up. You may not rent, lease, lend, or resell SAP code or application samples and tutorials.


The SDN Article can be downloaded as PDF from the link above.

There is a Portal Archive (PAR) attached to the PDF document. Please use a recent version of Adobe Acrobat Reader to access the attachment according to the screenshot below. The PAR file also contains the source code.


You must be Logged on to comment or reply to a post.
  • Hi lars,
    A much needed functionality…Great..
    The duplication is based on file content, as far I got it from the blog. But if one more duplicate resource is being uploaded with a diffrent name?


    • Hi Sandip,
      filename and timestamp are not relevant during the duplicate check. Only the SHA-1 hash value of the files are compared. If the hash is equal we assume it is a duplicate.
      Cheers Lars
      • Thanks Lars for a informative blog….

        Something i thought we need to code on ….we have a requirement wherin the existing KM documents should be print protected and the end users shouldnt be able to save it on their desktop is this possible…

        Many thanks for ur response…
        Greetings from Cardiff