<?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: Verify SSN in the string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018556#M1347227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get Regex info from this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.regular-expressions.info/" target="test_blank"&gt;http://www.regular-expressions.info/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test these regex in SAP by using program DEMO_REGEX_TOY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2009 15:33:03 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2009-08-13T15:33:03Z</dc:date>
    <item>
      <title>Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018549#M1347220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have a requirement while reading the input file.&lt;/P&gt;&lt;P&gt;Input file is mixed up with several header records and data records&lt;/P&gt;&lt;P&gt;Every data record has SSN starting at fixed position.&lt;/P&gt;&lt;P&gt;So we need to identify the SSN in the data record and store that entire record and skip other records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SSN format is xxx-xx-xxxx . All are numbers .&lt;/P&gt;&lt;P&gt;I think there might be easier to way to compare and identify this format.&lt;/P&gt;&lt;P&gt;Could anyone suggest the best way to do these.(May be comparing patterns,some string operation etc).Also i need to check all the 'X' are numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 21:22:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018549#M1347220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T21:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018550#M1347221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Every data record has SSN starting at fixed position.&lt;/P&gt;&lt;P&gt;&amp;gt; So we need to identify the SSN in the data record and store that entire record and skip other records.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If the SSN is at a fixed position, then that position identifies it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 21:28:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018550#M1347221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T21:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018551#M1347222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;I am sorry for not specific.&lt;/P&gt;&lt;P&gt;Actually i need to identify the data record(differentiate between data record and other lines based on the SSN).&lt;/P&gt;&lt;P&gt;So based on the SSN format , i could exactly know that string has an SSN and therefore identify it as data record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also as  SSN starts at fixed position,First I shall grab the 11 literals from that position and i need to verify whether that part of string is in the format XXX-XX-XXXX.I just need the logic to verify that part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kumar B on Aug 12, 2009 5:44 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 21:33:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018551#M1347222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T21:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018552#M1347223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   First Grab those SSN number in a variable of type CHAR11 say var_ssn.&lt;/P&gt;&lt;P&gt;   Then if var_ssn+4(1) = '-'&lt;/P&gt;&lt;P&gt;        and var_ssn+7(1) = '-'&lt;/P&gt;&lt;P&gt;        and var_ssn+0(3) CO '1234567890'&lt;/P&gt;&lt;P&gt;        and var_ssn+5(2) CO '1234567890'&lt;/P&gt;&lt;P&gt;        and var_ssn+8(4) CO '1234567890'.&lt;/P&gt;&lt;P&gt;         Then it contains SSN number and is confirmed to be a data record.&lt;/P&gt;&lt;P&gt;         endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vimal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 21:53:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018552#M1347223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T21:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018553#M1347224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using RegEx using pattern : &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;^(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search in SCN on how to use this pattern.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 22:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018553#M1347224</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-08-12T22:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018554#M1347225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this code by cut &amp;amp; paste into a test program and try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report zars
  no standard page heading line-size 255.
parameters : ssn(15) type c.
data matcher type ref to cl_abap_matcher.
matcher = cl_abap_matcher=&amp;gt;create(
             pattern = `^d{3}-d{2}-d{4}$`
             ignore_case = 'X'
             text = ssn ).

if matcher-&amp;gt;match( ) is initial.
  message 'Invalid ssn Format' type 'I'.
else.
  message 'Valid ssn format' type 'I'.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 01:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018554#M1347225</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-13T01:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018555#M1347226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi a®s,&lt;/P&gt;&lt;P&gt;Could you please expain the above the pattern u specified.&lt;/P&gt;&lt;P&gt;Any links that could help to understand the patterns and more about the class cl_abap_matcher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 15:27:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018555#M1347226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T15:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018556#M1347227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get Regex info from this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.regular-expressions.info/" target="test_blank"&gt;http://www.regular-expressions.info/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test these regex in SAP by using program DEMO_REGEX_TOY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 15:33:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018556#M1347227</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-13T15:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018557#M1347228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also check this SDN presentation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/866072ca-0b01-0010-54b1-9c02a45ba8aa&amp;amp;overridelayout=true" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/866072ca-0b01-0010-54b1-9c02a45ba8aa&amp;amp;overridelayout=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 15:36:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018557#M1347228</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-13T15:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018558#M1347229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a®s&lt;/P&gt;&lt;P&gt;The above presentation,I had just read this morning..&lt;/P&gt;&lt;P&gt;Thanks for the same.Kindly post if you have any other links etc regarding the same .&lt;/P&gt;&lt;P&gt;I assigned the points..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Vimal for the post.I feel that was a nice and simple way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 15:41:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018558#M1347229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T15:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018559#M1347230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll find help on regular expressions everywhere on the web. Now I guess your question is answered... you may close the thread. Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 20:41:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018559#M1347230</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-08-13T20:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Verify SSN in the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018560#M1347231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you can use FM &lt;STRONG&gt;BCA_US_VALIDATE_SSN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 20:52:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/verify-ssn-in-the-string/m-p/6018560#M1347231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T20:52:57Z</dc:date>
    </item>
  </channel>
</rss>

