cancel
Showing results for 
Search instead for 
Did you mean: 

how to program for user exit_saplmgmu_001

Former Member
0 Kudos
107

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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