Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8150

Compare 2 String Values and Count How Many Chars Are Different

$
0
0

Dear All,

 

I need to compare 2 string fields, which contain names, and count how many different characters there are. If there are more than 3 different characters that line will be marked 'X'. For example;

 

NAME: JAKC BAUE

CHANGED NAME: JACK BAUER

 

Here there are 3 different characters so;

 

FLAG = 'X'.

 

NAME: ACK BOUER

CHANGED NAME: JACK BAUER

 

FLAG = ' '

 

I discussed with an ABAP developer and we could not find an exact solution because the first name field is usually entered by mistake and the second one contains the fixed name. That s why there are so many cases.

 

Calculating length differences work for some cases but not all, also 'CP' doesnt cover all the cases so I decided to ask for other opinions. Please feel free to write down your suggestions.

 

Regards,

Merih


Viewing all articles
Browse latest Browse all 8150

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>