‎2009 Mar 12 3:36 AM
Hi all,,
I want to compare two texts (words) ,, Is this possible.??
Like one is : ARC DOOR DELY
and another is : ASSOCIATED ROAD CARRIERS LTD
both has same vendor code "800007'
this is possible to compare 1st and 2nd text or line...
Please Help me..
‎2009 Mar 12 3:44 AM
Hi, character types can be compared.... but I am not sure why you want to compare texts....
lv_1 = 'ARC DOOR DELY'.
lv_2 = 'ASSOCIATED ROAD CARRIERS LTD '.
if lv_1 eq lv_2 .
false.
else.
true.
endif.
‎2009 Mar 12 3:41 AM
Try to use:
CS--->Contains string
Ex:
If string1 CS String1.
Logic
Endif.
List of comparison operator are in the link below.
[Compare words|http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3516358411d1829f0000e829fbfe/content.htm]
Hope this resolves your query
Regards,
Gurpreet
‎2009 Mar 12 3:44 AM
Hi, character types can be compared.... but I am not sure why you want to compare texts....
lv_1 = 'ARC DOOR DELY'.
lv_2 = 'ASSOCIATED ROAD CARRIERS LTD '.
if lv_1 eq lv_2 .
false.
else.
true.
endif.
‎2009 Mar 12 4:13 AM
hI JAY...
Lv_1 = 'ARC DOOR DELY'.
lv_2 = 'ASSOCIATED ROAD CARRIERS LTD '.
in this two lines i want to comapre
first character of first line with first character of second line of first word..
then 2nd character of first line with first character of second line of 2nd word...
and so on...
Hows this possible...
please help me....
‎2009 Mar 12 4:31 AM
Hi:
Use offset like
Lv_1 = 'ARC DOOR DELY'.
lv_2 = 'ASSOCIATED ROAD CARRIERS LTD '.
this is bit by bit comparision
if lv_10(1) = lv_20(1)
if lv_11(1) = lv_21(1)
if lv_12(1) = lv_22(1)
so on...
For 1st and 2nd position
if lv_10(1) = lv_21(1)
etc
Regards
Shashi
‎2009 Mar 12 3:48 AM
Hi friend,
Also try CP (Contains Pattern).
Ex:
a1 = 'ARC DOOR DELY'.
a2 = 'ASSOCIATED ROAD CARRIERS LTD'.
IF a1 CP a2.
......
ELSE.
......
ENDIF.
Thanks..
Edited by: Sap Fan on Mar 12, 2009 4:48 AM