mercredi 25 février 2015

Identifying nearly identical messages in list

It looks like a simple task, but how would you solve it? I don't get any solution right now.



ls_message-text = 'Pernr. 12345678 (Pete Peterson) is valid (06/2015).
append ls_message to lt_message.

ls_message-text = 'Pernr. 12345678 (Pete Peterson) is valid (07/2015).
append ls_message to lt_message.


This is the code I got, the thing is, this is the message I am showing in my application. The customer says that the 2 messages are the same. The second should be deleted.

How would you compare it to delete the line? The table might contain more then 2 lines and also with another text like "is not valid".

I cant extent the structure to have more fields for comparison, I can only use the string comparison on this one field. Are there string comparisons possible with a regex or something?


Aucun commentaire:

Enregistrer un commentaire