<?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: scripting in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripting/m-p/2213460#M474394</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rambabu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the following code. You can easily extract the positions of a special character&lt;/P&gt;&lt;P&gt;and calculate the length of the pieces in between.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: p_mail     TYPE char80.
DATA: mail       TYPE char80,
      atoff      TYPE i,
      pointoff   TYPE i,
      endlen     TYPE i.

mail = p_mail.
FIND FIRST OCCURRENCE OF '@' IN mail MATCH OFFSET atoff.
ADD 1 TO atoff.
SHIFT mail BY atoff PLACES LEFT.
FIND FIRST OCCURRENCE OF '.' IN mail MATCH OFFSET pointoff.
ADD 1 TO pointoff.
SHIFT mail BY pointoff PLACES LEFT.
endlen = STRLEN( mail ).
WRITE: / 'Length of pieces in ', p_mail,
       / 'Before @   : ', atoff,
       / 'Btw @ and .: ', pointoff,
       / 'After .    : ', endlen.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output of this little programm for a mail like First.LastName@SomeCompany.Country would look like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Length of pieces in  FIRST.LASTNAME@SOMECOMPANY.COUNTRY     
Before @   :          15                                       
Btw @ and .:          12                                    
After .    :           7    
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Timo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 May 2007 08:04:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-11T08:04:15Z</dc:date>
    <item>
      <title>scripting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripting/m-p/2213459#M474393</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;&lt;/P&gt;&lt;P&gt; i have to write code for email validations in scripting . but they didn't give any input i.e how many Characters include in that email?&lt;/P&gt;&lt;P&gt;i have to check is there '@ 'and  '.'   symbols are exist or not ?&lt;/P&gt;&lt;P&gt;but my doubt is after how many char  the @ symbol is exist and after @ how many chars are exists before dot symbol and after  dot symbol how many chars are exist .in this way  i wnat to write code for validations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz suggest me with sample code how can i follow this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rambabu.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 07:34:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripting/m-p/2213459#M474393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T07:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: scripting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripting/m-p/2213460#M474394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rambabu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the following code. You can easily extract the positions of a special character&lt;/P&gt;&lt;P&gt;and calculate the length of the pieces in between.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: p_mail     TYPE char80.
DATA: mail       TYPE char80,
      atoff      TYPE i,
      pointoff   TYPE i,
      endlen     TYPE i.

mail = p_mail.
FIND FIRST OCCURRENCE OF '@' IN mail MATCH OFFSET atoff.
ADD 1 TO atoff.
SHIFT mail BY atoff PLACES LEFT.
FIND FIRST OCCURRENCE OF '.' IN mail MATCH OFFSET pointoff.
ADD 1 TO pointoff.
SHIFT mail BY pointoff PLACES LEFT.
endlen = STRLEN( mail ).
WRITE: / 'Length of pieces in ', p_mail,
       / 'Before @   : ', atoff,
       / 'Btw @ and .: ', pointoff,
       / 'After .    : ', endlen.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output of this little programm for a mail like First.LastName@SomeCompany.Country would look like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Length of pieces in  FIRST.LASTNAME@SOMECOMPANY.COUNTRY     
Before @   :          15                                       
Btw @ and .:          12                                    
After .    :           7    
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Timo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 08:04:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripting/m-p/2213460#M474394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T08:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: scripting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripting/m-p/2213461#M474395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         Upto my knowledge I want to say the following conditions for validation purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. There must be only one  symbol @&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. After @ atleast one  symbol . must be there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.Mail shold start with characters not with numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.-,+like that symbols are not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; check wheather these conditions are useful or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suma.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 08:17:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripting/m-p/2213461#M474395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T08:17:41Z</dc:date>
    </item>
  </channel>
</rss>

