<?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 Checking the valid email add in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-the-valid-email-add/m-p/3437417#M825468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform the check on a string where it contains email address. &lt;/P&gt;&lt;P&gt;For eg: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;abc@yahoo.com - &lt;STRONG&gt;this is a valid email add&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;@yaho.com - &lt;STRONG&gt;this is invalid email add&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;qwertyuyu.com - &lt;STRONG&gt;this is invalid email add&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think is there any standard FM can perform such check?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Feb 2008 03:35:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-25T03:35:13Z</dc:date>
    <item>
      <title>Checking the valid email add</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-the-valid-email-add/m-p/3437417#M825468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform the check on a string where it contains email address. &lt;/P&gt;&lt;P&gt;For eg: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;abc@yahoo.com - &lt;STRONG&gt;this is a valid email add&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;@yaho.com - &lt;STRONG&gt;this is invalid email add&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;qwertyuyu.com - &lt;STRONG&gt;this is invalid email add&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think is there any standard FM can perform such check?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 03:35:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-the-valid-email-add/m-p/3437417#M825468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T03:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Checking the valid email add</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-the-valid-email-add/m-p/3437418#M825469</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;Please try this code. I hope it will meet most of your requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM check_email_val .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lv_len type i,&lt;/P&gt;&lt;P&gt;      lv_len1 type i,&lt;/P&gt;&lt;P&gt;      lv_len2 type i,&lt;/P&gt;&lt;P&gt;      lv_char1,&lt;/P&gt;&lt;P&gt;      lv_char2(2) type c,&lt;/P&gt;&lt;P&gt;      lv_char3,&lt;/P&gt;&lt;P&gt;      lv_last_3 type i,&lt;/P&gt;&lt;P&gt;      lv_email(40) type c,&lt;/P&gt;&lt;P&gt;      lv_email_str(40) type c,&lt;/P&gt;&lt;P&gt;      lv_temp1(40) type c,&lt;/P&gt;&lt;P&gt;      lv_temp2(40) type c,&lt;/P&gt;&lt;P&gt;      lv_temp3(40) type c,&lt;/P&gt;&lt;P&gt;      lv_temp4(40) type c,&lt;/P&gt;&lt;P&gt;      lv_temp5(10) type c,&lt;/P&gt;&lt;P&gt;      lv_temp6(10) type c,&lt;/P&gt;&lt;P&gt;      lv_rev_str(20) type c,&lt;/P&gt;&lt;P&gt;      lv_last_4(4) type c,&lt;/P&gt;&lt;P&gt;      lv_flag1 type c,&lt;/P&gt;&lt;P&gt;      lv_flag2 type c,&lt;/P&gt;&lt;P&gt;      lv_flag3 type c,&lt;/P&gt;&lt;P&gt;      lv_str(6) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_email = zuserpass-email.&lt;/P&gt;&lt;P&gt;lv_len = strlen( lv_email ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ok_code EQ 'PRO'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*check whether @ symbol is there, depending on flag validate any further&lt;/P&gt;&lt;P&gt;IF lv_email CA '@'.&lt;/P&gt;&lt;P&gt; lv_flag1 = 'X'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt; lv_flag1 = ' '.&lt;/P&gt;&lt;P&gt; Message S013(zusermsg). "Email ID must have a '@'&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF lv_flag1 = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*split and check whether the split halves have any '@' or special characters leaving out '_' and '.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT lv_email at '@' INTO lv_temp3 lv_temp4.&lt;/P&gt;&lt;P&gt;IF ( lv_temp3 CA '@&lt;EM&gt;~!#$%^&amp;amp;*()-&lt;/EM&gt;={}}[]'',/?&amp;lt;&amp;gt;:"|\`' ) OR ( lv_temp4 CA '@&lt;EM&gt;~!#$%^&amp;amp;*()''-&lt;/EM&gt;={}}[],/?&amp;lt;&amp;gt;:"|\`' ).&lt;/P&gt;&lt;P&gt;Message S016(zusermsg). "Special characters except '_' , '.' , '@' are not allowed&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;&lt;/P&gt;&lt;P&gt;*checking whether there is an '_' of '.' in immediate precedence to '@'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*reversing lv_temp3 and taking its first character&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'STRING_REVERSE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    STRING          = lv_temp3&lt;/P&gt;&lt;P&gt;    LANG            = sy-langu&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    RSTRING         = lv_rev_str&lt;/P&gt;&lt;P&gt;         .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*fetching the character just before '@'&lt;/P&gt;&lt;P&gt;lv_char1 = lv_rev_str+0(1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( lv_char1 EQ '_' ) or ( lv_char1 EQ '.' ).&lt;/P&gt;&lt;P&gt;MESSAGE S021(zusermsg). "Cannot have '_' or '.' just before or just after '@'&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;*fetching the character just after '@'&lt;/P&gt;&lt;P&gt;lv_char3 = lv_temp4+0(1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( lv_char3 EQ '_' ) or ( lv_char3 EQ '.' ).&lt;/P&gt;&lt;P&gt;MESSAGE S021(zusermsg).&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;&lt;/P&gt;&lt;P&gt;*checking whether a '.' is present in lv_temp4&lt;/P&gt;&lt;P&gt;IF lv_temp4 CA '.'.&lt;/P&gt;&lt;P&gt;lv_flag2 = 'X'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;lv_flag2 = ' '.&lt;/P&gt;&lt;P&gt;MESSAGE S020(zusermsg). "Email ID should have a '.'&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*further checking whether there is a '.' separating email id into two halves&lt;/P&gt;&lt;P&gt;IF lv_flag2 EQ 'X'.&lt;/P&gt;&lt;P&gt; SPLIT  lv_temp4 at '.' INTO lv_temp1 lv_temp2.&lt;/P&gt;&lt;P&gt; IF lv_temp1 EQ ' '.&lt;/P&gt;&lt;P&gt; MESSAGE S018(zusermsg). "Enter a valid portal name&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF lv_temp2 EQ ' '.&lt;/P&gt;&lt;P&gt; MESSAGE S019(zusermsg). "Domain name cannot be blank&lt;/P&gt;&lt;P&gt; ELSE.&lt;/P&gt;&lt;P&gt; lv_flag3 = 'X'.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. "end of flag2 IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*check for a valid domain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF lv_flag3 EQ 'X'.&lt;/P&gt;&lt;P&gt; IF ( lv_temp2 CP 'com' ) OR ( lv_temp2 CP 'edu' ) OR ( lv_temp2 CP 'net' ) OR ( lv_temp2 CP 'org' ).&lt;/P&gt;&lt;P&gt;  LEAVE TO SCREEN 1003.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*if email ID is of type co.in&lt;/P&gt;&lt;P&gt;IF lv_temp2 CA '.'.&lt;/P&gt;&lt;P&gt; SPLIT lv_temp2 at '.' INTO lv_temp5 lv_temp6.&lt;/P&gt;&lt;P&gt; IF lv_temp5 CP 'co'.&lt;/P&gt;&lt;P&gt;  lv_len1 = strlen( lv_temp6 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; the email ID should be of the form co.xx&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF lv_len1 GT 2.&lt;/P&gt;&lt;P&gt;  MESSAGE S022(zusermsg). "Email Id will be of the form .com, .org, .net or .co.in or .co.uk etc.&lt;/P&gt;&lt;P&gt;  EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; checking whether the penultimate and the final character are alphabets&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_char2 = lv_temp6+0(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF ( lv_char2 NA 'aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ' ).&lt;/P&gt;&lt;P&gt;  MESSAGE S023(zusermsg). "Invalid domain name&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN 1003.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE. "to the 'co' IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE S022(zusermsg). "Email Id will be of the form .com, .org, .net or .co.in or .co.uk etc.&lt;/P&gt;&lt;P&gt;ENDIF. " end of 'co' IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. "end of first IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. "end of lv_temp CA '.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. "end of flag3 IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. "end of flag1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. "end of ok_code IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " check_email_val&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 03:46:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-the-valid-email-add/m-p/3437418#M825469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T03:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Checking the valid email add</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-the-valid-email-add/m-p/3437419#M825470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FSCHU,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; use &lt;STRONG&gt;cl_http_client class&lt;/STRONG&gt; and send a dummy http request to the site to see whether its available or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out the following program for sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSWF_TEST_HTTP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: if you are connecting to internet via proxy and the url you are trying to reach is on internet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SICF GOTO-&amp;gt;HTTP client proxy settings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in global settings tab&lt;/P&gt;&lt;P&gt;check the check box "proxy setting is active"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the "HTTP log" tab&lt;/P&gt;&lt;P&gt;enter proxy host name e.g proxy.sap.com....&lt;/P&gt;&lt;P&gt;enter the proxy server port (generally 80)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if required you need to enter &lt;/P&gt;&lt;P&gt;proxy server authentication (uid/pwd)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 03:49:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-the-valid-email-add/m-p/3437419#M825470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T03:49:43Z</dc:date>
    </item>
  </channel>
</rss>

