<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Find special characters in string (using mask) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428111#M1245612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You and Srini identifed the characters that you don't want. But I think that would be dangerous. there are a lot more special characters possible than can be displayed on a standard keyboard. Sinc the OP has said he just wants "normal" characters, it will be safer to figure out what they are and include only them (CO) rather than try to guess at all the other possibilities and exclude them using CA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Mar 2009 20:15:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-30T20:15:12Z</dc:date>
    <item>
      <title>Find special characters in string (using mask)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428107#M1245608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have the following requirement, perhaps someone has got a hint for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got a string of 255 characters.&lt;/P&gt;&lt;P&gt;I want to realize that this string only contains characters of a "normal" format, like&lt;/P&gt;&lt;P&gt;a-z, A-Z and numbers.&lt;/P&gt;&lt;P&gt;Any characters like , - # for example are not allowed and I would like to know, how to check my string.&lt;/P&gt;&lt;P&gt;How can I achive that? With FIND or SEARCH?&lt;/P&gt;&lt;P&gt;I am not really familiar with these ABAP KEY WORDS. Can I use masks for example like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  no_good type c value '[#,+,*...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIND no_good in STRING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or something like that?&lt;/P&gt;&lt;P&gt;Thanks and best regards&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2009 19:33:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428107#M1245608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-30T19:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Find special characters in string (using mask)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428108#M1245609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can check as :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if STRING CA no_good .&lt;/P&gt;&lt;P&gt;*--write your comments ..&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2009 19:36:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428108#M1245609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-30T19:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Find special characters in string (using mask)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428109#M1245610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be safer to identify those characters that you want to allow and use the CO (contains only) operator. Check its documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2009 19:39:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428109#M1245610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-30T19:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find special characters in string (using mask)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428110#M1245611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: l_data(10) type c,       
      l_special(10) type c.

l_data = 'AAA%%AA'.          " You can give your value here 
L_special = '!@#$%^&amp;amp;*()'.     " This need to be maintained wth the char which you don't want 

IF l_data ca l_special.
 WRITE: 'Special'.


else.
 WRITE: 'Only ALPHA.'.


ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. - @ Rob, sorry I haven't check you have already given this as CO. Just a doubt, I think we have to use CA here, because we need to check this for each byte level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kuntal Nandi on Mar 30, 2009 2:55 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2009 19:52:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428110#M1245611</guid>
      <dc:creator>former_member376453</dc:creator>
      <dc:date>2009-03-30T19:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find special characters in string (using mask)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428111#M1245612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You and Srini identifed the characters that you don't want. But I think that would be dangerous. there are a lot more special characters possible than can be displayed on a standard keyboard. Sinc the OP has said he just wants "normal" characters, it will be safer to figure out what they are and include only them (CO) rather than try to guess at all the other possibilities and exclude them using CA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2009 20:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428111#M1245612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-30T20:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Find special characters in string (using mask)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428112#M1245613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob - got your point. Just to confirm, previously I was trying to do it with CO ,thats why I was late to reply &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt; . Probably I am doing something wrong. It should come as 'Only ALPHA.' in the below case, but its coming as &lt;/P&gt;&lt;P&gt;'Special'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: l_data(10) TYPE c,
      l_special TYPE string.

l_data = 'AAAAA'.


IF l_data CO sy-abcde.
  WRITE: 'Only ALPHA.'.
ELSE.
  WRITE: 'Special'.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kuntal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2009 20:28:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428112#M1245613</guid>
      <dc:creator>former_member376453</dc:creator>
      <dc:date>2009-03-30T20:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find special characters in string (using mask)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428113#M1245614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Me too. I wonder if I have misinterpreted my thinking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, this seems to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: f1 TYPE string,
      f2 TYPE string  VALUE 'a=',
      f3 TYPE string  VALUE 'abdA6a'.

CONCATENATE sy-abcde 'abcdefghigklmnopqrstuvwxyz1234567890' INTO f1.

IF f2 CO f1.
  WRITE: /001 f2, 'correct'.
ELSE.
  WRITE: /001 f2, 'incorrect'.
ENDIF.

IF f3 CO f1.
  WRITE: /001 f3, 'correct'.
ELSE.
  WRITE: /001 f3, 'incorrect'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Mar 30, 2009 4:51 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2009 20:44:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428113#M1245614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-30T20:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find special characters in string (using mask)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428114#M1245615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;thanks a lot so far, I have rewarded points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give you a feedback....&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2009 06:15:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-special-characters-in-string-using-mask/m-p/5428114#M1245615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-31T06:15:20Z</dc:date>
    </item>
  </channel>
</rss>

