on 2012 Jan 11 4:19 AM
Hi ,
I Need to do some programming so that when user is creating material number at the time when he gave material text system pop us the list of materials which have similar material text .
Can any one please tell me the logic i should use .
Thanks and Regards ,
Shikha
Hi,
I assume you're talking about the material description in the material master. If so, it is possible but it is likely to be slow as you are looking for matches which are similar to the description entered but there are so many ways in which it could vary. My suggestion would be to do the following:
Move the short text to a local variable and convert to upper case
Split the local short text at spaces into a range table to contain all words or terms.
Read table MAKT where MAKTX contains at least one of the entries in the range table
Loop through the materials returned from MAKT and count the number of terms in the range table that exist in the material description.
Order the results by the number of terms contained descending
Return the top 10 or so.
I did something similar to allow our users to check for materials similar to what they wanted.
Hope this helps.
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.