<?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: IF elseif endif in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611335#M1278710</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;The number of if conditions should match with the endif statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double click on the if statement you will get the correct endif you coded.&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;Sabu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 May 2009 08:19:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-11T08:19:52Z</dc:date>
    <item>
      <title>IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611328#M1278703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i m writing a report using if elseif condition...i m getting following error&lt;/P&gt;&lt;P&gt;if v_x = 'X'.&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;elseif v_y = 'X'.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;elseif v_z = 'X'.&lt;/P&gt;&lt;P&gt;select ...into itab...&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;select single....&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;elseif v-c = 'X'.&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;Above code is showing error as " NO Open IF Statement"&lt;/P&gt;&lt;P&gt;at the elseif statement.pls hlp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 07:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611328#M1278703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T07:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611329#M1278704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;paste the proper code please .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 07:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611329#M1278704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T07:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611330#M1278705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you close the previous statement before the elseif statement by means of putting &lt;STRONG&gt;.&lt;/STRONG&gt; ?&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;Sarbajit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sarbajit Majumdar on May 11, 2009 1:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 07:46:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611330#M1278705</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2009-05-11T07:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611331#M1278706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;if p_upload eq 'X'.
    call function 'UPLOAD'
..
    if sy-subrc ne 0.
      message e000 with 'unable to read file'.
    else.
...
      if v_line gt 0.

        loop at i_itab.
          select single vbeln lifsk vdatu..

          if sy-subrc eq 0.
..
          endif.
        endloop.
      else.
..
      endif.
    endif.

  elseif p_del_gi eq 'X'.
...
      LOOP AT i_vbelv into wa_vbelv.
      select single kunnr auart lifsk vdatu..
       if sy-subrc = 0.
...
      endif.
    endloop.

  elseif p_req_dl eq 'X'.
    select vbeln lifsk vdatu into (vbak-vbeln, vbak-lifsk, vbak-vdatu)
...
    endselect.

  else.
    select vbeln lifsk vdatu into (vbak-vbeln, vbak-lifsk, vbak-vdatu)
...
    endselect.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on May 11, 2009 9:48 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on May 11, 2009 9:48 AM - add  tags and removed unnecessary lines taking the post over the character limit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 07:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611331#M1278706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T07:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611332#M1278707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its simple,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just count the No of If's you written and Endif's you written,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one condition is not closed properly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 07:56:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611332#M1278707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T07:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611333#M1278708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pretty print your code, and you should see, by the indentation, where the problem lies.  I have not found a problem with your code, however, it looks fine to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 07:56:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611333#M1278708</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-05-11T07:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611334#M1278709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    please check the code how many IF conditions are in your code , I thought some endif conditions are missed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   My suggestion is , why you use loop and select statment Consecutively ...and please check the code performance once- how much time it will take for execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siva Prasad&lt;/P&gt;&lt;P&gt;SAP-Practice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 08:09:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611334#M1278709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T08:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611335#M1278710</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;The number of if conditions should match with the endif statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double click on the if statement you will get the correct endif you coded.&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;Sabu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 08:19:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611335#M1278710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T08:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: IF elseif endif</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611336#M1278711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Here your code looks fine, may be the error is coming from another stage of code.&lt;/P&gt;&lt;P&gt;   Here your error shows that you have defined 'Endif' extra as there is no 'If' for that.&lt;/P&gt;&lt;P&gt;   Check your code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 08:30:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-endif/m-p/5611336#M1278711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T08:30:12Z</dc:date>
    </item>
  </channel>
</rss>

