Duplicate detection rule by business unit

Hi there,
Our CRM is used by multiple business units and they have different requirements for duplicate detection rules. For example, BU A would like to detect exact duplicate on Email Address 1 only, and BU B detects duplicates on Mobile only but allows duplicate
email address 1.
I have User 1 in BU A and owns the Email Address 1 duplicate check rule. Then I have User 2 in BU B trying to create a record with duplicate Email Address 1 and the Email Address 1 duplicate check rule fired. The Security role of User 2 allows
CRUD access to Duplicate Detection Rule at business unit level.
How do I configure so that only Mobile rule is fired for User 2, and only Email Address 1 rule is fired for User 1?
Thanks,
Henri

Hello Henri,
OOB duplicate detection is global setting and in case you will use it - the same rules would be used for all users in all BUs. To solve your problem you will have to develop own solution to implement your scenario.
Dynamics CRM MVP/ Technical Evangelist at
SlickData LLC
My blog

Similar Messages

  • Duplicate Detection Rules

    Is there anyway to create a duplicate detection rule in one entity on two different fields?  From the UI this seems not possible, but it seems like a lacking .. 
    For instance if you wanted to check a new contact against any email in email, email 2 or email 3 - you can only check across each of these fields for matches but you can't cross check them IE email to email 2 as an exact match.
    Please let me know if there is a way to accomplish this using the OOB duplicate detection.

    Hi Gaurav,
    Dont think this is possible OOB especially in Single Entity Duplicate detection rule
    where you check for duplicates in the same entity. You can have if you have
    Cross Entity Duplicate detection rule where you have option to set the base record attribute and matching record attribute.
    You can use plugins to achieve complex duplicate detection rules.
    Refer below link for the sample code:-
    http://parthimscrm.wordpress.com/2013/07/05/duplicate-detection-plugin-crm-2011/
    Hope this Helps!!!
    Thanks,
    Prasad
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • Business unit in mitigation control and business process in rule architect

    Dear Friends
    Can any one please tell me the difference between business unit configuration in mitigation control and business process in rule architect.
    If they are same, why we are configuring the same two times.
    full points awarded for good answer.
    Thanks and Regards
    A.Rama Krishna.
    Edited by: Ramakrishna Ailanani on Nov 25, 2008 10:02 AM

    Hello Ailanani,
    The use for these entities solely depends on the business and has to be decided between the implementors and the BPOs. This can vary a lot from organization to organization and thus cant be generally stated.
    Also, as this would be an integral part of the implementation, would advice you to be sure and clear once you define them or take help from some GRC AC consultants who can guide you on the same. Without a clear definition of the BPs and the BU's you may end up putting a lot of time, money and resource for a thing which probably you might have to reverse later.
    Regards,
    Hersh.

  • Questions on setting up PeopleSoft FIN AP Business Unit for India with TDS

    Hi,
    Does anyone here have some advice for me on how to handle AP transactions for a business unit set up for India with TDS (withholding) and statutory reporting.
    We are configuring AP BU for India in our existing database which has other BUs for other countries not using withholding. For India the way we understood on statutory is that all invoices must be recognised for withholding at the time of invoice entry or payment which ever ealiest. For PeopleSoft we always have to create voucher before we can make mayment so the earliest occurace will be at voucher entry that withholding should be deducted (at voucher post).
    The problem that we are encountering is that if we have prepayment invoice, we can use prepaid voucher to record this. However, when we receive the final invouce and entered into PeopleSoft the voucher post reversed the original withholding lines and recreate in the final invoice with final invoice amount. This could be in different period. As for the India rule the way we understood this is that the entries that created at prepaid should not be reversed, also those withholding might already be paid to the goverment in prior period before receiving the final invoice. The final invoice should have withholding calculate just for the difference of the invoice balance.
    Our other problem is on the statutory reporting that all transactions should be recorded in that particular period. Our current setup has AP close period at the end of each month which means we cannot enter invoices raised in previous period or have adjustments put in the period that already closed.
    Any help and advice on how companies that has India AP business unit deal with the above mentioned issues are much appreciated.
    Thank you.

    Thanks Marc Sachdeva.
    I don't mean where to set up withholding. I have alredy configured all withholding details and everything works fine in AP.
    However, as India statutory comes in, I'd like to know how other companies handle cases like accounting entries for transactions in specific period if your system has AP/GL closed periods. Normal cases would be put entries in the next accounting period. But as my understanding on the Indian rules is that withholding must be recorded at the time of entering the invoice. So how should adjustment be made.
    Another thing is the prepayment invoices, using PeopleSoft Prepaid voucher would cause the accounting entries for withholding lines to be reversed and then re-recorded when posting the final invoice (that matches with the prepaid). I would like to know how companies are dealing with such case as the TDS lines could be revsersed and recalculate in different accounting period. Also if the period that it revsered the TDS % could have changed and when the reverse happens it will recalculate withholding based on the new rate for the whole of invoice amt.
    For example an invoice of 10000 INR, 50% is to be recorded and paid in advance so raise the invoice of 5000 INR in Feb. TDS is 10%.
    - So vendor will be paid 4500 and 500 is for withholding.
    - In April then receive final invoice of 10000 INR, record into PS as 10000 but matched to prepaid so the remaining invoice is 5000. withholding rate in Apr is now 15% so 15% should be applied to the remaining invoice of 5000 INR. As the prepaid voucher option reversed withholding lines and recalculate with final invoice total so the withholding to be deducted is calculated at 15% = 1500 (10000 * 15%).
    - As the prepaid invoice withholding might have already been paid in March before the rate changed, the final invoice should have withholding of 750.
    I'm not sure if my understanding of recording withholding for India is correct and whether it really needs to be recorded in the month that invoice is raised. As the way I understood and have been told it has to be recorded in that month. I.e. invoice received on 30 April must be entered into accounting period of April. Our business close AP/GL about a week before the end of month so if we receive invoice on 30th April but our AP/GL already closed on 25th Apr then 30th Apr invoice should go to May accounting period. As statutury requirement is to record this into April. How does anyone handle this?
    Thanks.

  • How to set up Pymnt Method for different business units

    Hi,
    Can anyone shed some light as to how to set up P Method in FBZP in a way that one type can be identified according to its Business Unit?
    To clarify, FBZP is currently set up in a repeated way:
    Pymnt Methods:
    T - Transfer - Business Oil
    S - Transfer - Business Engineering
    V - Transfer - Business Equipment
    A - Boleto - Business Oil
    N - Boleto - Business Engineering
    C - Boleto - Business Equipment
    As you can see, we are repeating same payment method as it is needed for business to identify which business unit this refers to.
    Is there a way of setting up only one type of Transfer and one type of Boleto and how this will categorize the type of Business Unit ??
    Any input is welcome
    Regards
    Roger

    Hi Roger:
    How about some enhancement on F110? The logic would be something like read all the proposal lines, group by profit center and then re-assign the payment method based on profit center. There are couple of user exits available starting with RFFOX###, depending on the payment method and the program you using.
    Something similar to substitution rules user exit.
    Not sure if there is any other standard configuration to combine lines by profit center.
    Thanks.
    Rahul

  • How to Capture Multiple Cost centres and Business Unit information in a project?

    Dear Experts,
    With the help of UDA functionality in project super responsibility, I have captured Cost centre and Business unit information and this info will be used/reflected in CC and BU segments of all transactions gets recorded against that project.
    Now, our user wish to have multiple cost centres and business units to be tracked in the same one project. How is this feasible? Below example describes my requirement in a summary, please advise.
    An Indirect project is created when a defect on a machine reported from client's customer and all subsequent activities (purchases, travel to customer site to analyse and troubleshoot, purchases for any in-house analysis etc..involves costs spending internally) in resolving that defect/project involves 6 to 7 different departments (Sales, Tech Support, Quality team etc.,who actually work/travel and spend costs against project until defect resolution). And, each of the above departments will have 1 dedicated owner (project owners) to manage that project and each of these 6 or 7 owners owners will have their own cost centres (eg: 2345 - Sales team) against which they wish to see their transactions (travel, purchases during defect resolution) globally.
    So, all I want to know is how can I make one single project to accommodate multiple cost centresand business unit information to be assigned using UDA? Please let me know if I am not clear.
    Regards
    Venkat

    I think you should use the expenditure organization on the transaction itself to derive the CC/BU. Have AA lookups and define AA rules where you look at a Exp Org to BU or Cost Center to derive accounting.

  • Business unit and customer assignment

    Frnds
    whr do i assign business unit to customer?
    I have one customer assigned to a wrong Business Unit and i need to change it.
    so can you please tell me whr can i do that?
    thanks

    Hi,
    If this is a Characterstic defined - definitely this will be getting populated from Billing document in SD Module. Secondly, there could be a derivation rule defined as per your configuration. Derivation rules can be checked in Transaction code - KEDR.
    Thanks
    Murali.

  • Business process and business unit in compliance calibrator

    Dear Experts,
    Can any one please tell me the use of business process in rule architect and business unit in mitigation control.
    Thanks and Regards
    A.Rama Krishna

    Dear Rama,
    Basically business processes are the actual day to day processes any oraganisation carries out. When we have to group tcodes / functions for rule creation , we group them according to a business process so that we can easily relate them to each other within the business process. Eg : Procure to Pay.
    So the rules have to be created such that in this process there are no SOD violations in the access given to users. Thus it makes risk analysis more logical and simple for analysis.
    Thanks,
    Yajuvendra Sonalkar

  • Linking Corporate cockpit and Business Unit Cockpit

    hi all,
    Our requirement is to create Management cockpits for Corporate and Business unit : providing a picture of overall situation in corporation as well as in its strategic business units.
    The user should be able to move from aggregated figures for the entire group to the detailed information on each stategic business units.
    My problem is how should i link Corporate Cockpit with Strategic Business Unit Cockpit so that the user would be able to move from aggregated to detailed information ?
    Thanks in advance for suggestions.
    regards,
    Yogesh

    Hi,
    Q no 1:
    Sourcing Cockpit is an area from where you can source the requirements..There are two ways  by which sourcing can be done.
    1. The Purchase requisiton created from ECC 6.0 can be pushed to SRM for Sourcing . Either direct material with Part no or
    Service requirement without part number
    2. The shopping cart created in SRM can be converted to sourcing.
    once the requirments are flown from ECC 6.0 and  SRM . in the SRM server in sourcing node--click Carry our sourcing.
    you can get all the requirements.
    From this  you can convert  it to Purchase order,contract,Auction. Bid invitation.
    Q. no 2 :Business Rule Framework.(BRF)
    This is related to Workflow .From SRM 7.0 this workflow is called Process controlled workflow. Only by simple rules the
    Workflow for  Approval process for P.O ,Contract,Bid invitation can be done.
    If you are SAP ABAP person they you can confugure this .Normally  ABAP person will do this.. Please go to S ID and get the
    details there for Business rule framework
    Just check in this forum in Search you can get more details and notes
    go to  Google.com and enter business rule framework you get more material
    check this link
    http://www.sdn.sap.com/irj/sdn/nw-rules-management?rid=/webcontent/uuid/d00df7db-c783-2b10-aa97-ccfeacc19fcb [original link is broken]
    Regards
    G.Ganesh Kumar

  • Derive business unit from billing doc

    Hi all,
    I am trying to derive the business unit (VBRK-BZIRK) from the billing document instead of the customer master data.
    For that purpose, I added the charachteristic "billing document" (WWBD) and then I create  a derivation rule of type 'table lookup' with the following parameters:
    source:
    VBRK     VBELN     Billing Document     =     CO-PA     WWBD     Billing Document
    Assignment of table fields to target fields:
    VBRK     BZIRK     Business Unit     =     CO-PA     BZIRK     Business Unit
    on the condition tab I added the range of sales organizations for which this derivation needsto be active:
    CO-PA     VKORG     Sales Organization     >=     6000
    CO-PA     VKORG     Sales Organization     <=     8000
    When I test it in KEDR by entering, customer, sales org, billing document, is is working OK, but when I do an actual by creating a billing document, the derivation is not working.
    Does anyone know why this derivation is not working?
    And also, is there a way to analyze the actual derivation (not the test run in KEDR)?
    Thanks,
    Yoel.

    Hi Ajay,
    I finally got some ABAP help and was able to add an entry in table TKEZU using view V_TKEZU:
    Char.     BTran     Table     Field Name
    WWBD     KEDR     KOMK     BELNR
    Now, when I try to create the derivation rule with type table lookup I face another problem: in the 'source fields' section I
    am required to enter the operating concern (TKEZU-ERKRS), the field name (TKEZU-MERKMAL) and the business transaction (TKEZU-VRGNG), but when I enter the parameters (i.e. TKEZU-ERKRS=US10, TKEZU-MERKMAL=WWBD
    and TKEZU-VRGNG=KEDR) I get an error "Enter a valid source field. The field US10 is not a permitted source field" (message no. K/018).
    When I try to select values from the list (F4), I can only select out
    of the carachteristic names available in the system.
    Why am I not getting on the drop down list the real values for the table fields?
    Thanks,
    Yoel.

  • GRC AC ARM/ARQ: Approver based on Business Unit / Company...

    Dear all.
    I am wondering if it is feasible to stablishn approver based on a Business Unit / Company.
    That is to say:
    At the Access Request Creation functionality the requestor could indicate the first name, last name, ....and also it could indicate an specific company, or business unit.
    The requestor also assign some roles for some system.
    The requestor Submits the request and it goes to the approver assigned to the company
    Regards and thank you.

    Hi Neraaj. Thanks for your reply, was great!
    So now i am moving to next level. My idea is as follow:
    have a user requestor who creates Access Request. They set the user id, the name, last name and the Organization (not the department, not the company,...)
    I want to create a BRF+ to send the request to an Organizational owner for the Organization set by the requestor.
    For that i don't want to create an agent rule because i have to maintain the relationship Organization-Owner into the decision table.
    I want to create a BRF+ rule to fecth the owner of the Organization. Where is this owner set? I want to upload a Organizational strcuture into the Access Control organization Master Data. For each Access Control Organization view you can set different tabs AC users, AC roles and Owners. Just like into the image below:
    For that i suppose i need a DB Look up just to search for the Owner set in that tab but i am not pretty sure about:
    Where is this relationship located?. I have check at HRP100X tables and i found the organizations objects and more data but nothing like the approver.
    Once i have found this relationship i don't know if it is possible to get the owner into a variable and set this variable as the result of the function.
    Any advise will be well come.
    Regards and thank you.

  • Report of all sales orders for a business unit

    I am analyzing revenue, and I would like to run a report that would list all sales orders and the value of those orders in a particular business unit.
    I require the value of each and every sales contract during a certain period. Can I run a report that lists all sales contracts opened during a particular period?

    Hello,
      from the standard SAP menu, under: "Logistics --> Sales and Distribution  --> Sales --> Information System  --> Orders" you can find some transactions reporting sales orders lists, such as VA05 or SDO1, which perhaps could fit your requirements. Otherwise you can create a query to merge the tables containing the information that you need. As of my knowledge there's not an organizational level called "Business unit" in SAP, so you should check if in the transaction mentioned above the field you use to identify the "Business unit" is available.
    Hope to be useful.
    Best regards,
    Andrea

  • Problem in near duplicate detection in c#

    I have Develop application for near duplicate detection in c#.This application work for strings only but it's not working for pdf files.may be i think
    GetSimilarity method can not work properly but error not be raised.
    my application code like as:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.IO;
    using iTextSharp.text;
    using System.Threading;
    using iTextSharp.text.pdf;
    using iTextSharp.text.pdf.parser;
    using System.Text.RegularExpressions;
    using WindowsFormsApplication1.appcode;
    namespace WindowsFormsApplication1
    public partial class Form1 : Form
    string filename;
    FileInfo[] data1;
    FileInfo[] data2;
    string path;
    public Form1()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    OpenFileDialog openFileDialog = new OpenFileDialog();
    openFileDialog.CheckFileExists = true;
    openFileDialog.AddExtension = true;
    openFileDialog.Filter = "PDF files (*.pdf)|*.pdf";
    DialogResult result = openFileDialog.ShowDialog();
    if (result == DialogResult.OK)
    filename = Path.GetFileName(openFileDialog.FileName);
    path = Path.GetDirectoryName(openFileDialog.FileName);
    textBox1.Text = path + "\\" + filename;
    private void button2_Click(object sender, EventArgs e)
    OpenFileDialog openFileDialog = new OpenFileDialog();
    openFileDialog.CheckFileExists = true;
    openFileDialog.AddExtension = true;
    openFileDialog.Filter = "PDF files (*.pdf)|*.pdf";
    DialogResult result = openFileDialog.ShowDialog();
    if (result == DialogResult.OK)
    filename = Path.GetFileName(openFileDialog.FileName);
    path = Path.GetDirectoryName(openFileDialog.FileName);
    textBox2.Text = path + "\\" + filename;
    public static string ExtractTextFromPdf(string filename)
    using (PdfReader r = new PdfReader(filename))
    StringBuilder text = new StringBuilder();
    for (int i = 1; i <= r.NumberOfPages; i++)
    text.Append(PdfTextExtractor.GetTextFromPage(r, i));
    string first = text.ToString();
    return first;
    public static string Extract(string filename)
    using (PdfReader r = new PdfReader(filename))
    StringBuilder text = new StringBuilder();
    for (int i = 1; i <= r.NumberOfPages; i++)
    text.Append(PdfTextExtractor.GetTextFromPage(r, i));
    string second = text.ToString();
    return second;
    private void button3_Click(object sender, EventArgs e)
    StopWordsHandler stopword = new StopWordsHandler();
    string s = ExtractTextFromPdf(textBox1.Text);
    string s1 = Extract(textBox2.Text);
    string[] doc = new string[2]{s,s1 };
    TFIDF tfidf = new TFIDF(doc);
    float fl = tfidf.GetSimilarity(0,1);
    var sformatted = string.Format("Value: {0:P2}.", fl);
    StopWordsHandler.cs:
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace WindowsFormsApplication1.appcode
    class StopWordsHandler
    public static string[] stopWordsList=new string[] {
    "a",
    "about",
    "above",
    "across",
    "afore",
    "aforesaid",
    "after",
    "again",
    "against",
    "agin",
    "ago",
    "aint",
    "albeit",
    "all",
    "almost",
    "alone",
    "along",
    "alongside",
    "already",
    "also",
    "although",
    "always",
    "am",
    "american",
    "amid",
    "amidst",
    "among",
    "amongst",
    "an",
    "and",
    "anent",
    "another",
    "any",
    "anybody",
    "anyone",
    "anything",
    "are",
    "aren't",
    "around",
    "as",
    "aslant",
    "astride",
    "at",
    "athwart",
    "away",
    "b",
    "back",
    "bar",
    "barring",
    "be",
    "because",
    "been",
    "before",
    "behind",
    "being",
    "below",
    "beneath",
    "beside",
    "besides",
    "best",
    "better",
    "between",
    "betwixt",
    "beyond",
    "both",
    "but",
    "by",
    "c",
    "can",
    "cannot",
    "can't",
    "certain",
    "circa",
    "close",
    "concerning",
    "considering",
    "cos",
    "could",
    "couldn't",
    "couldst",
    "d",
    "dare",
    "dared",
    "daren't",
    "dares",
    "daring",
    "despite",
    "did",
    "didn't",
    "different",
    "directly",
    "do",
    "does",
    "doesn't",
    "doing",
    "done",
    "don't",
    "dost",
    "doth",
    "down",
    "during",
    "durst",
    "e",
    "each",
    "early",
    "either",
    "em",
    "english",
    "enough",
    "ere",
    "even",
    "ever",
    "every",
    "everybody",
    "everyone",
    "everything",
    "except",
    "excepting",
    "f",
    "failing",
    "far",
    "few",
    "first",
    "five",
    "following",
    "for",
    "four",
    "from",
    "g",
    "gonna",
    "gotta",
    "h",
    "had",
    "hadn't",
    "hard",
    "has",
    "hasn't",
    "hast",
    "hath",
    "have",
    "haven't",
    "having",
    "he",
    "he'd",
    "he'll",
    "her",
    "here",
    "here's",
    "hers",
    "herself",
    "he's",
    "high",
    "him",
    "himself",
    "his",
    "home",
    "how",
    "howbeit",
    "however",
    "how's",
    "i",
    "id",
    "if",
    "ill",
    "i'm",
    "immediately",
    "important",
    "in",
    "inside",
    "instantly",
    "into",
    "is",
    "isn't",
    "it",
    "it'll",
    "it's",
    "its",
    "itself",
    "i've",
    "j",
    "just",
    "k",
    "l",
    "large",
    "last",
    "later",
    "least",
    "left",
    "less",
    "lest",
    "let's",
    "like",
    "likewise",
    "little",
    "living",
    "long",
    "m",
    "many",
    "may",
    "mayn't",
    "me",
    "mid",
    "midst",
    "might",
    "mightn't",
    "mine",
    "minus",
    "more",
    "most",
    "much",
    "must",
    "mustn't",
    "my",
    "myself",
    "n",
    "near",
    "'neath",
    "need",
    "needed",
    "needing",
    "needn't",
    "needs",
    "neither",
    "never",
    "nevertheless",
    "new",
    "next",
    "nigh",
    "nigher",
    "nighest",
    "nisi",
    "no",
    "no-one",
    "nobody",
    "none",
    "nor",
    "not",
    "nothing",
    "notwithstanding",
    "now",
    "o",
    "o'er",
    "of",
    "off",
    "often",
    "on",
    "once",
    "one",
    "oneself",
    "only",
    "onto",
    "open",
    "or",
    "other",
    "otherwise",
    "ought",
    "oughtn't",
    "our",
    "ours",
    "ourselves",
    "out",
    "outside",
    "over",
    "own",
    "p",
    "past",
    "pending",
    "per",
    "perhaps",
    "plus",
    "possible",
    "present",
    "probably",
    "provided",
    "providing",
    "public",
    "q",
    "qua",
    "quite",
    "r",
    "rather",
    "re",
    "real",
    "really",
    "respecting",
    "right",
    "round",
    "s",
    "same",
    "sans",
    "save",
    "saving",
    "second",
    "several",
    "shall",
    "shalt",
    "shan't",
    "she",
    "shed",
    "shell",
    "she's",
    "short",
    "should",
    "shouldn't",
    "since",
    "six",
    "small",
    "so",
    "some",
    "somebody",
    "someone",
    "something",
    "sometimes",
    "soon",
    "special",
    "still",
    "such",
    "summat",
    "supposing",
    "sure",
    "t",
    "than",
    "that",
    "that'd",
    "that'll",
    "that's",
    "the",
    "thee",
    "their",
    "theirs",
    "their's",
    "them",
    "themselves",
    "then",
    "there",
    "there's",
    "these",
    "they",
    "they'd",
    "they'll",
    "they're",
    "they've",
    "thine",
    "this",
    "tho",
    "those",
    "thou",
    "though",
    "three",
    "thro'",
    "through",
    "throughout",
    "thru",
    "thyself",
    "till",
    "to",
    "today",
    "together",
    "too",
    "touching",
    "toward",
    "towards",
    "true",
    "'twas",
    "'tween",
    "'twere",
    "'twill",
    "'twixt",
    "two",
    "'twould",
    "u",
    "under",
    "underneath",
    "unless",
    "unlike",
    "until",
    "unto",
    "up",
    "upon",
    "us",
    "used",
    "usually",
    "v",
    "versus",
    "very",
    "via",
    "vice",
    "vis-a-vis",
    "w",
    "wanna",
    "wanting",
    "was",
    "wasn't",
    "way",
    "we",
    "we'd",
    "well",
    "were",
    "weren't",
    "wert",
    "we've",
    "what",
    "whatever",
    "what'll",
    "what's",
    "when",
    "whencesoever",
    "whenever",
    "when's",
    "whereas",
    "where's",
    "whether",
    "which",
    "whichever",
    "whichsoever",
    "while",
    "whilst",
    "who",
    "who'd",
    "whoever",
    "whole",
    "who'll",
    "whom",
    "whore",
    "who's",
    "whose",
    "whoso",
    "whosoever",
    "will",
    "with",
    "within",
    "without",
    "wont",
    "would",
    "wouldn't",
    "wouldst",
    "x",
    "y",
    "ye",
    "yet",
    "you",
    "you'd",
    "you'll",
    "your",
    "you're",
    "yours",
    "yourself",
    "yourselves",
    "you've",
    "z",
    private static Hashtable _stopwords=null;
    public static object AddElement(IDictionary collection,Object key, object newValue)
    object element = collection[key];
    collection[key] = newValue;
    return element;
    public static bool IsStopword(string str)
    //int index=Array.BinarySearch(stopWordsList, str)
    return _stopwords.ContainsKey(str);
    public StopWordsHandler()
    if (_stopwords == null)
    _stopwords = new Hashtable();
    double dummy = 0;
    foreach (string word in stopWordsList)
    AddElement(_stopwords, word, dummy);
    TFIDF.cs:
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace WindowsFormsApplication1.appcode
    class TFIDF
    private string[] _docs;
    private string[][] _ngramDoc;
    private int _numDocs=0;
    private int _numTerms=0;
    private ArrayList _terms;
    private int[][] _termFreq;
    private float[][] _termWeight;
    private int[] _maxTermFreq;
    private int[] _docFreq;
    public class TermVector
    public static float ComputeCosineSimilarity(float[] vector1, float[] vector2)
    if (vector1.Length != vector2.Length)
    throw new Exception("DIFER LENGTH");
    float denom=(VectorLength(vector1) * VectorLength(vector2));
    if (denom == 0F)
    return 0F;
    else
    return (InnerProduct(vector1, vector2) / denom);
    public static float InnerProduct(float[] vector1, float[] vector2)
    if (vector1.Length != vector2.Length)
    throw new Exception("DIFFER LENGTH ARE NOT ALLOWED");
    float result=0F;
    for (int i=0; i < vector1.Length; i++)
    result += vector1[i] * vector2[i];
    return result;
    public static float VectorLength(float[] vector)
    float sum=0.0F;
    for (int i=0; i < vector.Length; i++)
    sum=sum + (vector[i] * vector[i]);
    return (float)Math.Sqrt(sum);
    private IDictionary _wordsIndex=new Hashtable() ;
    public TFIDF(string[] documents)
    _docs=documents;
    _numDocs=documents.Length ;
    MyInit();
    private void GeneratNgramText()
    private ArrayList GenerateTerms(string[] docs)
    ArrayList uniques=new ArrayList() ;
    _ngramDoc=new string[_numDocs][] ;
    for (int i=0; i < docs.Length ; i++)
    Tokeniser tokenizer=new Tokeniser() ;
    string[] words=tokenizer.Partition(docs[i]);
    for (int j=0; j < words.Length ; j++)
    if (!uniques.Contains(words[j]) )
    uniques.Add(words[j]) ;
    return uniques;
    private static object AddElement(IDictionary collection, object key, object newValue)
    object element=collection[key];
    collection[key]=newValue;
    return element;
    private int GetTermIndex(string term)
    object index=_wordsIndex[term];
    if (index == null) return -1;
    return (int) index;
    private void MyInit()
    _terms=GenerateTerms (_docs );
    _numTerms=_terms.Count ;
    _maxTermFreq=new int[_numDocs] ;
    _docFreq=new int[_numTerms] ;
    _termFreq =new int[_numTerms][] ;
    _termWeight=new float[_numTerms][] ;
    for(int i=0; i < _terms.Count ; i++)
    _termWeight[i]=new float[_numDocs] ;
    _termFreq[i]=new int[_numDocs] ;
    AddElement(_wordsIndex, _terms[i], i);
    GenerateTermFrequency ();
    GenerateTermWeight();
    private float Log(float num)
    return (float) Math.Log(num) ;//log2
    private void GenerateTermFrequency()
    for(int i=0; i < _numDocs ; i++)
    string curDoc=_docs[i];
    IDictionary freq=GetWordFrequency(curDoc);
    IDictionaryEnumerator enums=freq.GetEnumerator() ;
    _maxTermFreq[i]=int.MinValue ;
    while (enums.MoveNext())
    string word=(string)enums.Key;
    int wordFreq=(int)enums.Value ;
    int termIndex=GetTermIndex(word);
    _termFreq [termIndex][i]=wordFreq;
    _docFreq[termIndex] ++;
    if (wordFreq > _maxTermFreq[i]) _maxTermFreq[i]=wordFreq;
    private void GenerateTermWeight()
    for(int i=0; i < _numTerms ; i++)
    for(int j=0; j < _numDocs ; j++)
    _termWeight[i][j]=ComputeTermWeight (i, j);
    private float GetTermFrequency(int term, int doc)
    int freq=_termFreq [term][doc];
    int maxfreq=_maxTermFreq[doc];
    return ( (float) freq/(float)maxfreq );
    private float GetInverseDocumentFrequency(int term)
    int df=_docFreq[term];
    return Log((float) (_numDocs) / (float) df );
    private float ComputeTermWeight(int term, int doc)
    float tf=GetTermFrequency (term, doc);
    float idf=GetInverseDocumentFrequency(term);
    return tf * idf;
    private float[] GetTermVector(int doc)
    float[] w=new float[_numTerms] ;
    for (int i=0; i < _numTerms; i++)
    w[i]=_termWeight[i][doc];
    return w;
    public float GetSimilarity(int doc_i, int doc_j)
    float[] vector1=GetTermVector (doc_i);
    float[] vector2=GetTermVector (doc_j);
    return TermVector.ComputeCosineSimilarity(vector1, vector2) ;
    private IDictionary GetWordFrequency(string input)
    //string convertedInput=input.ToLower() ;
    Tokeniser tokenizer=new Tokeniser() ;
    String[] words=tokenizer.Partition(input);
    Array.Sort(words);
    String[] distinctWords=GetDistinctWords(words);
    IDictionary result=new Hashtable();
    for (int i=0; i < distinctWords.Length; i++)
    object tmp;
    tmp=CountWords(distinctWords[i], words);
    result[distinctWords[i]]=tmp;
    return result;
    private string[] GetDistinctWords(String[] input)
    if (input == null)
    return new string[0];
    else
    ArrayList list=new ArrayList() ;
    for (int i=0; i < input.Length; i++)
    if (!list.Contains(input[i])) // N-GRAM SIMILARITY?
    list.Add(input[i]);
    return Tokeniser.ArrayListToArray(list) ;
    private int CountWords(string word, string[] words)
    int itemIdx=Array.BinarySearch(words, word);
    if (itemIdx > 0)
    while (itemIdx > 0 && words[itemIdx].Equals(word))
    itemIdx--;
    int count=0;
    while (itemIdx < words.Length && itemIdx >= 0)
    if (words[itemIdx].Equals(word)) count++;
    itemIdx++;
    if (itemIdx < words.Length)
    if (!words[itemIdx].Equals(word)) break;
    return count;
    Tokeniser.cs:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Collections;
    using System.Text;
    using System.Threading.Tasks;
    using System.Text.RegularExpressions;
    namespace WindowsFormsApplication1.appcode
    class Tokeniser
    public static string[] ArrayListToArray(ArrayList arraylist)
    string[] array = new string[arraylist.Count];
    for (int i = 0; i < arraylist.Count; i++) array[i] = (string)arraylist[i];
    return array;
    public string[] Partition(string input)
    Regex r = new Regex("([ \\t{}():;. \n])");
    //input = input.ToLower();
    String[] tokens = r.Split(input);
    ArrayList filter = new ArrayList();
    for (int i = 0; i < tokens.Length; i++)
    MatchCollection mc = r.Matches(tokens[i]);
    if (mc.Count <= 0 && tokens[i].Trim().Length > 0
    && !StopWordsHandler.IsStopword(tokens[i]))
    filter.Add(tokens[i]);
    return ArrayListToArray(filter);
    public Tokeniser()
    button3 is compare functionality.in this scope i have to write similarity logic in terms of percentage.
    oncle please check the code for similarty b/w the two pdf files.if any probelm please intimate.please help me.
    thank u.

    Hi
    Actually iText is a third party library to create PDF originally written for java. iTextSharp is the C# adaptation of that
    library. Question regarding iText are better asked on the iText forum, but this is Microsoft Forum:
    http://itextpdf.com/support
    Thanks for your understanding.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to Create Contract Templates In Other Business Units In Fusion Contract Management

    Hi All.
    I am working on Fusion PPM Release 9.
    I Have set Profile Options HZ_DEFAULT_BU_CRM to SH-Business Unit & HZ_ENABLE_MULTIPLE_BU_CRM to Yes in task Manage Administrator Profile Values.
    But LOV is showing only SH-Business Unit. I am not able to get other Business Units In LOV & Not able to create contract Template.
    Any help regarding above issue is Appreciable 
    Thanks
    Shaan

    Hi Vara,
    Check the basic settings for Student Contract accounting. Are you using "Create RFC Destination for Automatic Creation and Update" functionality? Please check that whether you have maintained any RFC or not. If yes, then remove that.
    The automatic creation function causes the system to automatically create a student account with the account-specific master data when it creates student master data. Check this in SAP_CM_ACCOUNT_DATA_UPDATE.
    The automatic update function causes the system to automatically update the relevant account data when it updates account-specific student master data.
    You can activate and deactivate the automatic creation and change function. You make this setting in the IMG activity (De)Activate Automatic Student Account Creation and Update.
    Regards
    Vinod Kumar

  • Detection rule for Office 365

    Hi
    I'm about to create a application for Office 365 in Configuration Manager 2012 R2.
    I've seen recommendation to look for %programfiles%\Microsoft Office 15\root\Office15. But will that not break when office is upgraded on the client?
    In registry I've HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\O365ProPlusRetail - en-us. And for the looks of it I cannot use this if a user decides to download and install a different version than en-us.
    Any idea on what detection rule I should use for Office 365 that works for next versions of Office 365 (office 2015)?

    Using folder check for "%programfiles%\Microsoft Office 15\root\Office15", might be a bad
    idea.
    You need to use the full path to WINWORD.exe or something.
    If you install Visio using Office 365 it will end up in the same folder, and that will make wrong detection of the application!
    You don't have to worry about the version of Office when running Office 365, but you can get the version directly from the
    WINWORD.exe if you for some reason wants to use it...
    I would recommend that you don't check for the version though.
    Ronni Pedersen | Microsoft MVP - ConfigMgr | Blogs:
    www.ronnipedersen.com/ and www.SCUG.dk/ | Twitter
    @ronnipedersen

Maybe you are looking for