<?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: difference b/w check and if statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915819#M938625</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;Check statement, checks the condition with in a loop and if it satisfies the condition, the control moves to next statement in the loop. Otherwise, it terminates the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3571358411d1829f0000e829fbfe/content.htm]&lt;/P&gt;&lt;P&gt;Definitely useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward helpful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Lakshman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jun 2008 09:20:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-02T09:20:27Z</dc:date>
    <item>
      <title>difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915815#M938621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;difference b/w check and if statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 09:10:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915815#M938621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T09:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915816#M938622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Learn to search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Learn to use the on line help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 09:14:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915816#M938622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T09:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915817#M938623</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;LOOP ... WHERE is faster than LOOP/CHECK because LOOP ... WHERE &lt;/P&gt;&lt;P&gt;evaluates the specified condition internally. &lt;/P&gt;&lt;P&gt;As with any logical expressions, the performance is better if the &lt;/P&gt;&lt;P&gt;operands of a comparison share a common type. &lt;/P&gt;&lt;P&gt;The performance can be further enhanced if LOOP ... WHERE is combined &lt;/P&gt;&lt;P&gt;with FROM i1 and/or TO i2, if possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be helpful for you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Yogesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 09:16:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915817#M938623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T09:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915818#M938624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please read the following to see the differences.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK statement&lt;/P&gt;&lt;P&gt;1. &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9afe35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9afe35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/db986035c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/9f/db986035c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF statement &lt;/P&gt;&lt;P&gt;1. &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3571358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3571358411d1829f0000e829fbfe/content.htm&lt;/A&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;Regards,&lt;/P&gt;&lt;P&gt;Loo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 09:19:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915818#M938624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T09:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915819#M938625</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;Check statement, checks the condition with in a loop and if it satisfies the condition, the control moves to next statement in the loop. Otherwise, it terminates the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3571358411d1829f0000e829fbfe/content.htm]&lt;/P&gt;&lt;P&gt;Definitely useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward helpful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Lakshman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 09:20:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915819#M938625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T09:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915820#M938626</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;&lt;STRONG&gt;IF&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;IF log_exp1. &lt;/P&gt;&lt;P&gt;  [statement_block1] &lt;/P&gt;&lt;P&gt;[ELSEIF log_exp2. &lt;/P&gt;&lt;P&gt;  [statement_block2]] &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;[ELSE. &lt;/P&gt;&lt;P&gt;  [statement_blockn]] &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;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;These statements define a control structure which can contain several statement_block statement blocks; depending on the logical expressions log_exp, maximally one of the blocks is executed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After IF and ELSEIF, any number of logical expressions log_exp can be specified, while the expressions statement_block represent any kind of statement blocks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logical expressions are checked from top to bottom, starting &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the IF statement, and the statement block after the first true logical expression is executed. If none of the logical expressions is true, then the statement block after the ELSE statement is executed. &lt;/P&gt;&lt;P&gt;If the end of the executed statement block is reached or if no statement block was executed, then the processing is resumed after ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Converting a time output into Anglo American notation &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA time TYPE t. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;time = sy-uzeit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF time &amp;lt; '120000'. &lt;/P&gt;&lt;P&gt;  WRITE: / time, 'AM' . &lt;/P&gt;&lt;P&gt;ELSEIF time &amp;gt; '120000' AND &lt;/P&gt;&lt;P&gt;       time &amp;lt; '240000'. &lt;/P&gt;&lt;P&gt;  time = time - 12 * 3600. &lt;/P&gt;&lt;P&gt;  WRITE: / time, 'PM' . &lt;/P&gt;&lt;P&gt;ELSE. &lt;/P&gt;&lt;P&gt;  WRITE / 'High Noon'. &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;Syntax &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CHECK log_exp.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If the statement CHECK is executed in a loop and log_exp is incorrect, the statement CHECK immediately terminates the current loop pass and the program continues with the next loop pass. For log_exp, you can specify any logical expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Outside a loop, the statement CHECK exits the current processing block (see CHECK Processing Block). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Termination of the loop pass using CHECK when the loop index sy-index is odd-numbered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA remainder TYPE i. &lt;/P&gt;&lt;P&gt;DO 20 TIMES. &lt;/P&gt;&lt;P&gt;  remainder = sy-index MOD 2. &lt;/P&gt;&lt;P&gt;  CHECK remainder = 0. &lt;/P&gt;&lt;P&gt;  WRITE / sy-index. &lt;/P&gt;&lt;P&gt;ENDDO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if the condtion is true the if-endif block code is executed otherwise th ewhole block is ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;multiple conditions can be checked in if-else if-endif where as check can look after only onle conditon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check statement &lt;/P&gt;&lt;P&gt;CHECK &lt;/P&gt;&lt;P&gt;This statement will apply if you want to check condition before go to next statement. If the result of checking is u2019TRUEu2019, system will go to next step as normally. If the result of checking is u2019FALSEu2019, system will operate look like CONTINUE statement.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES. &lt;/P&gt;&lt;P&gt; WRITE:/ sy-index.  &lt;/P&gt;&lt;P&gt;CHECK sy-index &amp;gt; 2. &lt;/P&gt;&lt;P&gt; WRITE: u2019Afteru2019.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;The output is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1  &lt;/P&gt;&lt;P&gt;2  &lt;/P&gt;&lt;P&gt;3 After&lt;/P&gt;&lt;P&gt;4 After&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 09:20:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915820#M938626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T09:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915821#M938627</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 check statement is coded within a loop. It can act very much like continue, passing control immediately to the terminating statement of the loop and bypassing the statements between. Unlike continue, it accepts a logical expression. If the expression is true, it does nothing. If it is false, it jumps to the end of the loop.&lt;/P&gt;&lt;P&gt;check behaves like a continue statement when the logical expression is false. When it is true, it does nothing. &lt;/P&gt;&lt;P&gt;Syntax for the check Statement&lt;/P&gt;&lt;P&gt;The following is the syntax for the check statement. It can be used within a do, while, select, or loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[do/while/select/loop]&lt;/P&gt;&lt;P&gt;    ---&lt;/P&gt;&lt;P&gt;    check exp.&lt;/P&gt;&lt;P&gt;    ---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    [enddo/endwhile/endselect/endloop]&lt;/P&gt;&lt;P&gt;where: &lt;/P&gt;&lt;P&gt;u2022exp is a logical expression. &lt;/P&gt;&lt;P&gt;u2022--- represents any number of lines of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The if statement in ABAP/4 has relational operators for equality and inequality and special relational operators for string comparisons and for bit masks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is the syntax for the if statement. &lt;/P&gt;&lt;P&gt;if [not] exp [ and [not] exp ] [ or [not] exp ].&lt;/P&gt;&lt;P&gt;    ---&lt;/P&gt;&lt;P&gt;[elseif exp.&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;where: &lt;/P&gt;&lt;P&gt;u2022exp is a logical expression that evaluates to a true or false condition. &lt;/P&gt;&lt;P&gt;u2022--- represents any number of lines of code. Even zero lines are allowed. &lt;/P&gt;&lt;P&gt;The following points apply: &lt;/P&gt;&lt;P&gt;u2022Every if must have a matching endif. &lt;/P&gt;&lt;P&gt;u2022else and elseif are optional. &lt;/P&gt;&lt;P&gt;u2022Parentheses can be used. Each parentheses must be separated by a space. For example, if ( f1 = f2 ) or ( f1 = f3 ) is correct, and if (f1 = f2) or (f1 = f3) is incorrect. &lt;/P&gt;&lt;P&gt;u2022Variables can be compared with blanks or zeros using the addition is initial. For example, if f1 is initial will be true if f1 is type c and is blank. If f1 is any other data type, the statement is true if f1 contains zeros. &lt;/P&gt;&lt;P&gt;u2022To accomplish negation, not must precede the logical expression. For example, if not f1 is initial is correct. if f1 is not initial is incorrect. &lt;/P&gt;&lt;P&gt;u2022Variables can be compared with nulls using the addition is null. For example, if f1 is null. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls reward if helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajyalakshmi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rajyalakshmi Attili on Jun 2, 2008 3:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 09:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915821#M938627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T09:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915822#M938628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If :&lt;/P&gt;&lt;P&gt;if condition is true the block will execute otherwise i will skip block of code then execute the line after the line endif . You can give else condition in your program.&lt;/P&gt;&lt;P&gt;Check:&lt;/P&gt;&lt;P&gt;if condition is true then only it will enter to next line otherwise i will not execute bellow lines . check will not give else condition in your program.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 09:52:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915822#M938628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-03T09:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w check and if statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915823#M938629</link>
      <description>&lt;P&gt;The question was from 2008!....no need to bring it back from the dead.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 12:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-check-and-if-statement/m-p/3915823#M938629</guid>
      <dc:creator>ChrisSolomon</dc:creator>
      <dc:date>2019-10-03T12:32:13Z</dc:date>
    </item>
  </channel>
</rss>

