cancel
Showing results for 
Search instead for 
Did you mean: 

Seeking Efficient Alternatives to SAP's "Distance" String Function for Long Inputs

chongarian
Explorer
0 Kudos

Dear Experts,

I am currently utilizing SAP's standard string function "distance" to identify words similar to given inputs. However, I've encountered a significant issue when processing long inputs, as the function takes an extended duration to execute, often exceeding 30 minutes. I suspect this is due to the large number of combinations involved in these instances.

Could you kindly suggest more efficient alternatives to this function that can handle long inputs more effectively?

Your assistance in this matter would be greatly appreciated.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

patrick_winkler
Product and Topic Expert
Product and Topic Expert
0 Kudos

The complexity of the function distance( val1 = text1 val2 = text2 [max = max] ) increases in line with the product of the lengths of the two strings. The calculation time can be limited by specifying max.

chongarian
Explorer
0 Kudos
Thank you, Patrick. We will keep it as a default solution. Could you please advise if there is an alternative function or class available that offers improved efficiency?
patrick_winkler
Product and Topic Expert
Product and Topic Expert

Answers (0)