2010 Oct 08 3:13 PM
How to check for Trade mark and Registered Trade mark symbols in a String?
How to check for Trade mark and Registered Trade mark symbols in a String?
2010 Oct 08 7:29 PM
declare data type x with the code...
search string for the data values...
trademark = data: tmark(1) type x value '99',
reg trademark = data: rtmark(1) type x value 'AE'.
Since you can't do this in a UNICODE-enabled program, you have the option of turning off the Unicode check in Attributes, or finding another way to declar the hex values.
reference: http://www.ascii-code.com/
2010 Oct 09 4:39 PM
Hi Kartik,
I don't have problems, just paste the characters into editor
FORM trademark .
CONSTANTS:
lc_tm TYPE char01 VALUE 'u2122',
lc_r TYPE char01 VALUE '®'.
DATA:
lv_test TYPE string VALUE 'this is ABAP u2122 registerd by SAP ® '.
IF lv_test CA lc_tm .
WRITE: / 'found', lc_tm, 'at position', sy-fdpos, 'in:', lv_test.
ENDIF.
IF lv_test CA lc_r .
WRITE: / 'found', lc_r, 'at position', sy-fdpos, 'in:', lv_test.
ENDIF.
ENDFORM. " TRADEMARKI hope you are on unicode (who is not?)
Regards,
Clemens