<?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: sample code to identify special characters in a string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869056#M673152</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a million!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Karen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Oct 2007 05:42:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-05T05:42:36Z</dc:date>
    <item>
      <title>sample code to identify special characters in a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869050#M673146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to identify special characters in a string.... could anybody send me some code please.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Karen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 05:00:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869050#M673146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T05:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: sample code to identify special characters in a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869051#M673147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try fm&lt;/P&gt;&lt;P&gt;CHECK_STRING_SPEC_CHARACTERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reward points if dis helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 05:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869051#M673147</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2007-10-05T05:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: sample code to identify special characters in a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869052#M673148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;declare a constant that has all the special characters like&lt;/P&gt;&lt;P&gt;gc_spl(20) type c value '!@#$%....'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if string CA gc_spl.&lt;/P&gt;&lt;P&gt;string+0(sy-fdpos) = space.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK_STRING_SPEC_CHARACTERS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 05:07:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869052#M673148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T05:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: sample code to identify special characters in a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869053#M673149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: str(100) type c.&lt;/P&gt;&lt;P&gt;data: str_n type string.&lt;/P&gt;&lt;P&gt;data: str_c type string.&lt;/P&gt;&lt;P&gt;data: len type i.&lt;/P&gt;&lt;P&gt;data: ofst type i.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;str = '#ABCD%'.&lt;/P&gt;&lt;P&gt;len = strlen( str ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if ofst = len.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if str+ofst(1) co sy-abcde.&lt;/P&gt;&lt;P&gt;    concatenate str_c str+ofst(1) into str_c.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    concatenate str_n str+ofst(1) into str_n.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ofst = ofst + 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;write:/ str.&lt;/P&gt;&lt;P&gt;write:/ str_c.&lt;/P&gt;&lt;P&gt;write:/ 'spacial chracter',20 str_n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function module  &amp;lt;b&amp;gt;SF_SPECIALCHAR_DELETE&amp;lt;/b&amp;gt; &amp;lt;b&amp;gt;DX_SEARCH_STRING&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_address1 = i_adrc-street.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK NOT L_ADDRESS1 IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = STRLEN( l_address1 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do len times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not l_address1+l(1) ca&lt;/P&gt;&lt;P&gt;'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if i_adrc-street+l(1) CO sy-abcde.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;elseif i_adrc-street+l(1) CO L_NUMCHAR.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;l = l + 1.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : spchar(40) type c value '&lt;STRONG&gt;~!@#$$%^&amp;amp;&lt;/STRONG&gt;()?...'etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :gv_char .&lt;/P&gt;&lt;P&gt;data:inp(20) type c.&lt;/P&gt;&lt;P&gt;take the string length .&lt;/P&gt;&lt;P&gt;len = strlen (i/p).&lt;/P&gt;&lt;P&gt;do len times &lt;/P&gt;&lt;P&gt;MOVE FNAME+T(1) TO GV_CHAR.&lt;/P&gt;&lt;P&gt;IF gv_char CA spchar.&lt;/P&gt;&lt;P&gt;MOVE fname&lt;EM&gt;T(1) TO inp2&lt;/EM&gt;T(1).&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;T = T + 1.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZEX4 .&lt;/P&gt;&lt;P&gt;PARAMETERS: fname LIKE rlgrap-filename .&lt;/P&gt;&lt;P&gt;DATA: len TYPE i,&lt;/P&gt;&lt;P&gt;T TYPE I VALUE 0,&lt;/P&gt;&lt;P&gt;inp(20) TYPE C,&lt;/P&gt;&lt;P&gt;inp1(20) type c,&lt;/P&gt;&lt;P&gt;inp2(20) type c,&lt;/P&gt;&lt;P&gt;inp3(20) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :gv_char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : spchar(20) type c value '#$%^&amp;amp;*()_+`~'.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( fname ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE:/ len.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO len TIMES.&lt;/P&gt;&lt;P&gt;MOVE FNAME+T(1) TO GV_CHAR.&lt;/P&gt;&lt;P&gt;IF gv_char ca spchar.&lt;/P&gt;&lt;P&gt;MOVE fname&lt;EM&gt;T(1) TO inp&lt;/EM&gt;T(1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;T = T + 1.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE INP.&lt;/P&gt;&lt;P&gt;write:/ 'Special Characters :', inp. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful..........&lt;/P&gt;&lt;P&gt;Minal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 05:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869053#M673149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T05:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: sample code to identify special characters in a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869054#M673150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data zstring type string value 'hi* how r u'.&lt;/P&gt;&lt;P&gt;data zerror type T130F-KZREF.&lt;/P&gt;&lt;P&gt;data zch.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CHECK_STRING_SPEC_CHARACTERS'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    string          = zstring&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   CHARACTER       = zch&lt;/P&gt;&lt;P&gt;   ERRORFLAG       = zerror&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / zch,zerror.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 05:15:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869054#M673150</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2007-10-05T05:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: sample code to identify special characters in a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869055#M673151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write a program to give input as &amp;#147;+91-44-42040260&amp;#148;, output should be &amp;#147; 91 44 42040260&amp;#148;.&lt;/P&gt;&lt;P&gt;Ans : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:INPUT(15) VALUE '+91-44-42040260',&lt;/P&gt;&lt;P&gt;STR(4) VALUE '+ - '.&lt;/P&gt;&lt;P&gt;TRANSLATE INPUT USING STR.&lt;/P&gt;&lt;P&gt;WRITE:/ INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward point if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 05:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869055#M673151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T05:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: sample code to identify special characters in a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869056#M673152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a million!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Karen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 05:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-to-identify-special-characters-in-a-string/m-p/2869056#M673152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T05:42:36Z</dc:date>
    </item>
  </channel>
</rss>

