<?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 if statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122673#M741579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus,&lt;/P&gt;&lt;P&gt;need to seek advice on this.&lt;/P&gt;&lt;P&gt;any way to make the [perform no] only show once? as abap not supports goto, what can i streamline this kind of code so that only show once.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select single .......&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;       select single ......&lt;/P&gt;&lt;P&gt;          if sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;                select single ....&lt;/P&gt;&lt;P&gt;                    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;                        perform yes.&lt;/P&gt;&lt;P&gt;                    else.&lt;/P&gt;&lt;P&gt;                        perform no.&lt;/P&gt;&lt;P&gt;                    endif.&lt;/P&gt;&lt;P&gt;          else.&lt;/P&gt;&lt;P&gt;              perform no.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;     else.&lt;/P&gt;&lt;P&gt;          perform no.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Nov 2007 13:16:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-23T13:16:09Z</dc:date>
    <item>
      <title>if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122673#M741579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus,&lt;/P&gt;&lt;P&gt;need to seek advice on this.&lt;/P&gt;&lt;P&gt;any way to make the [perform no] only show once? as abap not supports goto, what can i streamline this kind of code so that only show once.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select single .......&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;       select single ......&lt;/P&gt;&lt;P&gt;          if sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;                select single ....&lt;/P&gt;&lt;P&gt;                    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;                        perform yes.&lt;/P&gt;&lt;P&gt;                    else.&lt;/P&gt;&lt;P&gt;                        perform no.&lt;/P&gt;&lt;P&gt;                    endif.&lt;/P&gt;&lt;P&gt;          else.&lt;/P&gt;&lt;P&gt;              perform no.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;     else.&lt;/P&gt;&lt;P&gt;          perform no.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2007 13:16:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122673#M741579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-23T13:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122674#M741580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i understood the problem correctly... can this be the solution?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT SINGLE .......
IF sy-subrc = 0.
  SELECT SINGLE ......
  IF sy-subrc = 0 .
    SELECT SINGLE ....
    IF sy-subrc = 0.
      PERFORM yes.
    ENDIF.
  ENDIF.
ENDIF.
IF sy-subrc &amp;lt;&amp;gt; 0 .
  PERFORM no.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2007 13:21:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122674#M741580</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2007-11-23T13:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122675#M741581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks and point given.&lt;/P&gt;&lt;P&gt;so i do not need to have else and when sy-subrc &amp;lt;&amp;gt; 0 will all perform no. right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2007 13:37:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122675#M741581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-23T13:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122676#M741582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Eliana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM select_singles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;PERFORM yes.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;PERFROM no.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM select_singles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ...&lt;/P&gt;&lt;P&gt;CHECK sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;SELECT SINGLE ...&lt;/P&gt;&lt;P&gt;CHECK sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;SELECT SINGLE ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2007 13:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122676#M741582</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-11-23T13:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122677#M741583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if any of select statement fails the corresponding if statenment will not be executed and execution will come to to IF SY-SUBRC &amp;lt;&amp;gt; 0 with non zero sy-subrc value .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so answer is yes.. just remove all ELSEs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2007 13:48:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-statement/m-p/3122677#M741583</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2007-11-23T13:48:11Z</dc:date>
    </item>
  </channel>
</rss>

