<?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: how to code this ..please help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836364#M922536</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;say var1= 'XX-5011'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var1+0(2) = 'XX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sandesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 May 2008 11:52:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-13T11:52:06Z</dc:date>
    <item>
      <title>how to code this ..please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836360#M922532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends:&lt;/P&gt;&lt;P&gt;     I've a variable whose value is like 'XX-5011'. Now I've a requirement. I've to put a validation like this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if this begins with 'XX'.&lt;/P&gt;&lt;P&gt;do something.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;do something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what should be the best way of putting this check that whether it starts from XX or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suitable points will be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards:&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 11:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836360#M922532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T11:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to code this ..please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836361#M922533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;ex: var1= 'XX-5011'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var1+0(2) = 'XX'.&lt;/P&gt;&lt;P&gt;  &amp;lt;do the processing&amp;gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  &amp;lt;do the processing&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 11:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836361#M922533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T11:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to code this ..please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836362#M922534</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;Just write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;condense variable.&lt;/P&gt;&lt;P&gt;if variable+0(2) eq 'XX'.&lt;/P&gt;&lt;P&gt;  ...do what you need....&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  ... do something else....&lt;/P&gt;&lt;P&gt;&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;Regards,&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 11:51:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836362#M922534</guid>
      <dc:creator>George_Lioumis</dc:creator>
      <dc:date>2008-05-13T11:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to code this ..please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836363#M922535</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;its better if you use an if condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var+0(2) =  'XX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;code&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;code&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 11:51:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836363#M922535</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-05-13T11:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to code this ..please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836364#M922536</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;say var1= 'XX-5011'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var1+0(2) = 'XX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sandesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 11:52:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836364#M922536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T11:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to code this ..please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836365#M922537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally, it is &lt;STRONG&gt;BAD&lt;/STRONG&gt; to use offsets if you can avoid it.  So while the above will work, they are not good practice.  Good practice would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF this CP 'XX*'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, however, that with CP, &lt;STRONG&gt;upper/lower case is disregarded&lt;/STRONG&gt;.  If you need to consider case use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: moff TYPE i.
FIND 'XX' IN this RESPECTING CASE MATCH OFFSET moff.
IF sy-subrc IS NOT INITIAL or moff GT 0.
  WRITE: / 'Fail'.
ELSE.
  WRITE: / 'Sucess'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, if you want to be super cool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIND REGEX '^XX.*' IN this.
IF sy-subrc IS NOT INITIAL.
  WRITE: / 'Fail'.
ELSE.
  WRITE: / 'Sucess'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matthew Billingham on May 13, 2008 2:14 PM&lt;/P&gt;&lt;P&gt;OK - never mind.  I see you chose to follow bad practice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 11:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836365#M922537</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-05-13T11:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to code this ..please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836366#M922538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;   you can use *(star), +(plus),#(hash) along with CP(contain pattern).&lt;/P&gt;&lt;P&gt;plz see below details also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CP (contains pattern) and NP (no pattern) operators perform a string search that allows pattern-matching characters. The expression v1 CP v2 is true when v1 contains a sting that matches the pattern in v2. The expression v1 NP v2 is true when v1 does not contain a string that matches the pattern in v2. The pattern matching characters allowed in v2 are given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Character	Used to&lt;/P&gt;&lt;P&gt;*(STAR)	Match any sequence of characters&lt;/P&gt;&lt;P&gt;+(PLUS)	Match any single character&lt;/P&gt;&lt;P&gt;#(HASH)	Interpret the next character literally&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#is the escape character. A single character following it is interpreted exactly. Special meaning, if it exists, is lost. You can also use # to make a search case sensitive or to search for the *, +, or # character. Below table  shows examples of how you might use these characters. The escape character is needed when you want to perform a case-sensitive search using CS, NS, CP, or NP. You also need it if you want to perform a pattern search (CP or NP) for a string containing *, +, or #.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Statement	True When&lt;/P&gt;&lt;P&gt;v1 CP &amp;#145;A+C&amp;#146;(A plus C)	v1 contains &amp;#147;a&amp;#148; in the first position and &amp;#147;c&amp;#148; in the third. Either character can be in upper- or lowercase. Any  &lt;/P&gt;&lt;P&gt;                                                   character can appear in the second position&lt;/P&gt;&lt;P&gt;v1 CP &amp;#145;&lt;STRONG&gt;Ab&lt;/STRONG&gt;&amp;#146;(star AB star)	The string can appear anywhere within v1. Either character can be in upper- or lowercase.&lt;/P&gt;&lt;P&gt;v1 CP &amp;#145;&lt;STRONG&gt;#A#b&lt;/STRONG&gt;&amp;#146;( star hash A hash B star)	v1 contains a capital A followed by lowercase b&lt;/P&gt;&lt;P&gt;v1 CP &amp;#145;&lt;STRONG&gt;##&lt;/STRONG&gt;&amp;#146;( star hash hash star)	v1 contains a #&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think this is useful for u,&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;reward me if it is useful to u.&lt;/STRONG&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pradeep kandgal on May 13, 2008 2:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 12:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-help/m-p/3836366#M922538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T12:11:09Z</dc:date>
    </item>
  </channel>
</rss>

