<?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 find a string into another string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818314#M918315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have 2 options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF ( P_FILE CS 'Balances_DMTHMPLAN' )
OR  ( P_FILE CS 'Balances_VMTHMPLAN' ).
*&amp;gt;&amp;gt;&amp;gt; Do Something
ELSE.
  MESSAGE E000 WITH TEXT-013 .
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SEARCH  P_FILE for 'Balances_DMTHMPLAN'.
  if sy-subrc NE 0.
    SEARCH  P_FILECP for 'Balances_VMTHMPLAN'.
    if sy-subrc NE 0.
      MESSAGE E000 WITH TEXT-013 .
    else.
*    Do something
    endif.
  else.
*    Do something
    endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Paul Chapman on May 14, 2008 6:47 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 May 2008 10:45:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-14T10:45:28Z</dc:date>
    <item>
      <title>how to find a string into another string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818313#M918314</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 want to give validation for two input files.as if i load any file between these two it should load it .But if i load the file other than this than it must give error as not a valid load file.&lt;/P&gt;&lt;P&gt;I am trying to do it with this code but it is getting done.&lt;/P&gt;&lt;P&gt;pls help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( P_FILE CP '&lt;STRONG&gt;Balances_DMTHMPLAN&lt;/STRONG&gt;' ) OR &lt;/P&gt;&lt;P&gt;    ( P_FILECP '&lt;STRONG&gt;Balances_VMTHMPLAN&lt;/STRONG&gt;' ).&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC  &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE E000 WITH TEXT-013 .                                  ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 10:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818313#M918314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-14T10:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a string into another string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818314#M918315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have 2 options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF ( P_FILE CS 'Balances_DMTHMPLAN' )
OR  ( P_FILE CS 'Balances_VMTHMPLAN' ).
*&amp;gt;&amp;gt;&amp;gt; Do Something
ELSE.
  MESSAGE E000 WITH TEXT-013 .
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SEARCH  P_FILE for 'Balances_DMTHMPLAN'.
  if sy-subrc NE 0.
    SEARCH  P_FILECP for 'Balances_VMTHMPLAN'.
    if sy-subrc NE 0.
      MESSAGE E000 WITH TEXT-013 .
    else.
*    Do something
    endif.
  else.
*    Do something
    endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Paul Chapman on May 14, 2008 6:47 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 10:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818314#M918315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-14T10:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a string into another string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818315#M918316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think you are checking the reverse condition....you should throw the error if the if statement fails....and i feel there is no need to check sy-subrc after if statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( p_file CP '&lt;STRONG&gt;Balances_DMTHMPLAN&lt;/STRONG&gt;' ) OR&lt;/P&gt;&lt;P&gt;( p_file CP '&lt;STRONG&gt;Balances_VMTHMPLAN&lt;/STRONG&gt;' ).&lt;/P&gt;&lt;P&gt;*&amp;lt;do your processing here&amp;gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;    MESSAGE e000 WITH text-013 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 10:49:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818315#M918316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-14T10:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a string into another string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818316#M918317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF ( P_FILE CP '&lt;STRONG&gt;Balances_DMTHMPLAN&lt;/STRONG&gt;' ) OR &lt;/P&gt;&lt;P&gt;( P_FILECP '&lt;STRONG&gt;Balances_VMTHMPLAN&lt;/STRONG&gt;' ).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF SY-SUBRC 0.  "NO NEED FOR THIS.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;MESSAGE E000 WITH TEXT-013 . ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does your p_file look like because the expression looks ok, but remember case sensitive!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2008 10:52:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-a-string-into-another-string/m-p/3818316#M918317</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-05-14T10:52:55Z</dc:date>
    </item>
  </channel>
</rss>

