<?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 BETWEEN does not work. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452569#M1999599</link>
    <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;8b889d0e8e6f4ed39f6c58e35664518f&lt;/SPAN&gt; nice work. I assumed the IF should work, even I didn't like it. I checked Jörgen approach, and it worked too.&lt;/P&gt;&lt;P&gt;So, I guess the OP did something wrong while gathering the data, and the variable doesn't has that 1780000000 (10 positions) value when it reaches the IF, maybe it's 178000000 (9 positions).&lt;/P&gt;&lt;P&gt;This problem needs to be debugged in the system where it "crashes".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Still... I really think he's approaching the problem the wrong way: the check should be done versus the document type, and not its number.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jul 2021 10:22:04 GMT</pubDate>
    <dc:creator>VXLozano</dc:creator>
    <dc:date>2021-07-29T10:22:04Z</dc:date>
    <item>
      <title>IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452561#M1999591</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;My IF &amp;lt;provided_number&amp;gt; BETWEEN &amp;lt;number&amp;gt; AND &amp;lt;number&amp;gt; does not work on numbers it should.&lt;/P&gt;
  &lt;P&gt;This is the part of my code that does't work:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;IF wa_ini-vbelv BETWEEN '1700000000' AND '1789999999'.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;My code just completely ignores this part. For the number '1780000000', which, I reckon, should fall into the statement, it just completely skips my IF.&lt;BR /&gt;Instead of adding any code for that IF, I tried simply assigning a strict value of '0000000000' for every value meeting that IF's requirements - it doesn't work. That IF is just ignored every single time.&lt;BR /&gt;&lt;BR /&gt;--------------------&lt;/P&gt;
  &lt;P&gt;Perhaps the above is enough tor resolve my issue. If not -&amp;gt; see below for a specific description of what I am trying to do and my code. I think it might be a lot - so thank you in advance.&lt;/P&gt;
  &lt;P&gt;--------------------&lt;/P&gt;
  &lt;P&gt;The idea of my code is to extract invoices' numbers from VBFA for the provided document number. VBFA 'contains' the document flow - it has two columns important to me here:&lt;BR /&gt;- vbelv -&amp;gt; the previous document in relation to the provided one,&lt;BR /&gt;- vbeln -&amp;gt; the next document in relation to the provided one.&lt;BR /&gt;&lt;BR /&gt;Which means that for the document flow looking like '1 - 2 - 3 - 4', being provided '4' and wanting to display '2', I would need to first SELECT VBELV where VBELN = 4 (save '3' to a variable), then SELECT VBELV where VBELN = my_variable_holding_3 and then I end up with '2' I wanted. That explains what my code is supposed to be doing.&lt;BR /&gt;&lt;BR /&gt;I'll also mention that one VBELV can have many VBELNs… Next documents branch out of the previous one. It's basically traversing a tree with a lot of branches. That's why I need to specify the range of values the VBELV or VBELV that's being reached for needs to be in.&lt;BR /&gt;&lt;BR /&gt;The idea is just to find invoices which are documents starting with 1* and return then with the exception of invoices starting with 17* for which I need to look even deeper and find document 18* (because 17* means there's an another type of an invoice I need to get).&lt;/P&gt;
  &lt;P&gt;I am also adding a part of my code for context. Perhaps it will be required to examine my problem. I am not adding all of it, because I don't think it's relevant to the problem. Also, everything apart from the problem with 17* works without an issue.&lt;BR /&gt;NRFAKTURYDOWZ is a name of the column I am displaying the output in (this is a query in SQ02).&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt; 
   &lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TABLES: vbfa.
TYPES: BEGIN OF ty_vbf,
  vbelv TYPE vbfa-vbelv,
  END OF ty_vbf.&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty2_vbf,
  vbeln TYPE vbfa-vbeln,
END OF ty2_vbf.

*These are used throughout the code, including the part I did not include in this section.
DATA: wa_ini TYPE ty_vbf,
      wa_prev TYPE ty_vbf,
      wa_next TYPE ty2_vbf,
      wa_v178 TYPE ty_vbf,
      wa_n178 TYPE ty2_vbf.


*Selecting the first 'previous document' where vbeln = provided number.
SELECT SINGLE vbelv
FROM vbfa
INTO wa_ini
WHERE vbeln = BKPF-XBLNR
  AND vbeln &amp;gt;= '1000000000'
  AND vbeln &amp;lt;= '9999999999'.


*Selecting the 'next document' of the previously selected vbelv.
SELECT SINGLE vbeln
FROM vbfa
INTO wa_next
WHERE vbelv = wa_ini-vbelv.


*Making sure the initially selected VBELV is within the proper range.
IF wa_ini-vbelv BETWEEN '1000000000' AND '2999999999'.
*Here is the guy that won't work and won't stop driving me nuts.
  IF wa_ini-vbelv BETWEEN '1700000000' AND '1789999999'.
    SELECT SINGLE vbelv
      FROM vbfa
      INTO wa_v178
      WHERE vbeln = wa_ini-vbelv.
        SELECT SINGLE vbeln
        FROM vbfa
        INTO wa_n178
        WHERE vbelv = wa_v178-vbelv
        AND vbeln BETWEEN '1880000000' AND '1889999999'.
          IF NOT wa_n178 IS INITIAL.
            NRFAKTURYDOWZ = wa_n178-vbeln.
          ELSE.
            NRFAKTURYDOWZ = ''.
          ENDIF. 
ENDIF.
 NRFAKTURYDOWZ = wa_ini-vbelv.
ELSEIF.&amp;lt;br&amp;gt;&amp;lt;mooooooreeeee coooooodeeeee&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;If you made it here, allow me to express my most sincere gratitude. I am fully aware that's a lot of stuff and your time is precious. I am really thankful and wish you a great day.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Bartek&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 07:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452561#M1999591</guid>
      <dc:creator>bmierzwi</dc:creator>
      <dc:date>2021-07-29T07:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452562#M1999592</link>
      <description>&lt;P&gt;First of all, thanks to you for the work you did with the question. It's refreshing to see people who care about it.&lt;/P&gt;&lt;P&gt;Few things/suggestions:&lt;/P&gt;&lt;P&gt;- if you are trying to find some kind of document, maybe you should consider to use the doc.type field, not the number... if some functional adds a new range for your documents, your program will stop working properly&lt;/P&gt;&lt;P&gt;- (I assume you did, but it's worth to ask) did you debugged it? Put a break-point in the failing IF and checked the real value of the variable?&lt;/P&gt;&lt;P&gt;- if the BETWEEN didn't work, try to change it for a "normal" condition couple (vbeln &amp;gt;= 17... and vbeln &amp;lt;= 18...&lt;/P&gt;&lt;P&gt;I cannot think about other options, yet&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Edition:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;By suggestion of  &lt;SPAN class="mention-scrubbed"&gt;juby.kothari&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;- try with ranges, using IN (look Juby's answers)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But I keep my first point: if the range comes from some sort of document type configuration, you should use the document type field, not the range.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 08:27:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452562#M1999592</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-29T08:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452563#M1999593</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;bmierzwi&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;Check  in debugging for the field 's  value wa_ini-vbelv   , &lt;STRONG&gt;SELECT SINGLE&lt;/STRONG&gt; vbelv. May be chances it is other than the ranges '1700000000'AND'1789999999'. &lt;/P&gt;&lt;P&gt;Pon Raja Sekharan.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 08:52:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452563#M1999593</guid>
      <dc:creator>ponrajasekharan</dc:creator>
      <dc:date>2021-07-29T08:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452564#M1999594</link>
      <description>&lt;P&gt;Hello  &lt;/P&gt;&lt;P&gt;Please try using ranges, BETWEEN  at times does not work in SELECT queries correctly. Please use Ranges , put your details low and high values and use option 'BT'. &lt;/P&gt;&lt;P&gt;Hope this resolved your issue&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Juby&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 09:21:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452564#M1999594</guid>
      <dc:creator>former_member598787</dc:creator>
      <dc:date>2021-07-29T09:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452565#M1999595</link>
      <description>&lt;P&gt;Yes, this is a good answer. I will not write one of my own, but add to this one... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As a side note, technically, vbfa-vbelv is a "character like field", with length 10. So the BETWEEN comparison is not done numerically, but character for character. See the section &lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abencomparison_type.htm" target="_blank"&gt;Character-Like Comparison Type in this ABAP Documentation page&lt;/A&gt; for more information. That being said, as you are specifying all 10 characters this should still work.&lt;/P&gt;&lt;P&gt;In addition to suggestions above, you can verify/test with this simple little test program to in your system...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA preceeding_document TYPE vbfa-vbelv.
preceeding_document = '1780000000'.
IF preceeding_document BETWEEN '1700000000' AND '1780000000'.
  WRITE 'Between'.
ELSE.
  WRITE 'Nope'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Jul 2021 09:53:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452565#M1999595</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-07-29T09:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452566#M1999596</link>
      <description>&lt;P&gt;This is really puzzling. As I love a good puzzle, I extracted the relevant code and just added a few write-statements to see what gets accessed and what not. I also added a version of the IF-statement with GT/LT which works fine as well:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: vbfa.
TYPES: BEGIN OF ty_vbf,
  vbelv TYPE vbfa-vbelv,
  END OF ty_vbf.

*These are used throughout the code, including the part I did not include in this section.
DATA: wa_ini TYPE ty_vbf.

wa_ini-vbelv = '1780000000'.

IF wa_ini-vbelv BETWEEN '1000000000' AND '2999999999'.
   WRITE: / wa_ini-vbelv, 'First IF'.
*Here is the guy that won't work and won't stop driving me nuts.
  IF wa_ini-vbelv BETWEEN '1700000000' AND '1789999999'.
    Write: / wa_ini-vbelv, 'Second IF'.
  ENDIF.
  IF wa_ini-vbelv GT '1700000000' AND
     wa_ini-vbelv LT '1789999999'.
   write: / wa_ini-vbelv, 'GT/LT IF'.
  ENDIF.
  write: / 'After Second IF'.
ENDIF.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is working for me with the 2nd IF-Statement correctly getting accesed, given a value of '1780000000' for VBELV:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1962454-if-statement-debugging.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Unless there are some really weird HEX-values in the variables, I don't really know what could be causing this.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 10:04:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452566#M1999596</guid>
      <dc:creator>BaerbelWinkler</dc:creator>
      <dc:date>2021-07-29T10:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452567#M1999597</link>
      <description>&lt;P&gt;Nice point,  &lt;SPAN class="mention-scrubbed"&gt;jorgen_lindqvist41&lt;/SPAN&gt; ... checked and worked, mainly because 0 &amp;lt; 9 even in character values in SAP (012345...).&lt;/P&gt;&lt;P&gt;But the point is: if the variable is not numeric, the use of BETWEEN is risky.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 10:11:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452567#M1999597</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-29T10:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452568#M1999598</link>
      <description>&lt;P&gt;Although I'm not sure it will fix it, I like your approach an added it to "my" answer (now ours :P)&lt;/P&gt;&lt;P&gt;Sadly, I cannot "like" your answer, and because I don't think it's the solution, I cannot vote it. But kudos, mate.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 10:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452568#M1999598</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-29T10:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452569#M1999599</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;8b889d0e8e6f4ed39f6c58e35664518f&lt;/SPAN&gt; nice work. I assumed the IF should work, even I didn't like it. I checked Jörgen approach, and it worked too.&lt;/P&gt;&lt;P&gt;So, I guess the OP did something wrong while gathering the data, and the variable doesn't has that 1780000000 (10 positions) value when it reaches the IF, maybe it's 178000000 (9 positions).&lt;/P&gt;&lt;P&gt;This problem needs to be debugged in the system where it "crashes".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Still... I really think he's approaching the problem the wrong way: the check should be done versus the document type, and not its number.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 10:22:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452569#M1999599</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-29T10:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452570#M1999600</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;a BETWEEN b AND c&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is strictly equivalent to&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;a &amp;gt;= b AND a &amp;lt;= c&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Jul 2021 10:39:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452570#M1999600</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-07-29T10:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452571#M1999601</link>
      <description>&lt;P&gt;Thanks for kind words and looking into my issue.&lt;BR /&gt;&lt;BR /&gt;- Unfortunately, I can't rely just on document type (VBTYP_N) as all invoices are labeled the same ('M') and I need to have a different action performed for invoices starting with 17*. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; I think I just can't differentiate them by doc. type field. The only ones that have a different value are the ones I am looking for (18*) which have the document type of '5'. Sadly, I can't even test if that would be a good move to utilize the type here as that IF is just never used by my program.&lt;BR /&gt;&lt;BR /&gt;- I couldn't start the debugger before, it just didn't start (I am new to ABAP, I might be making silly mistakes), it started up when I placed my BREAK at the top of my code.&lt;/P&gt;&lt;P&gt;- I also tried different approaches to this (&amp;lt;=, &amp;gt;=, declaring DATA variables and comparing them instead of string literals) to no avail. What's more, my approach works just fine in every other section of the code that uses BETWEEN. This logic here, where I am trying to pinpoint 17*-like invoices is the only place where it's malfunctional.&lt;BR /&gt;&lt;BR /&gt;That's to address your points. I managed to resolve the problem.&lt;BR /&gt;If you take a look at my code, you'll see that at the bottom of my "outer" IF statement, the 'NRFAKTURYDOWZ = wa_ini-vbelv.' part is not wrapped in ELSE section… Which means that it always overwrote any value that I manager to extract previously. That created the impression that my "inner" IF statement was completely ignored… because whatever it did, I ordered my code to just overwrite the value anyway. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Since you pointed me into the direction that allowed me to find the problem - I am marking your response as the answer.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks a ton and cheers. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 11:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452571#M1999601</guid>
      <dc:creator>bmierzwi</dc:creator>
      <dc:date>2021-07-29T11:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452572#M1999602</link>
      <description>&lt;P&gt;Thanks for taking the time to look into my issue.&lt;/P&gt;&lt;P&gt;If you take a look at my code, you'll see that at the bottom of my "outer" IF statement, the 'NRFAKTURYDOWZ = wa_ini-vbelv.' part is not wrapped in ELSE section… Which means that it always overwrote any value that I manager to extract previously. That created the impression that my "inner" IF statement was completely ignored… because whatever it did, I ordered my code to just overwrite the value anyway. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I will try your alternative to the way I use BETWEEN in the future, so thank you for that additional knowledge.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Bartek&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 11:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452572#M1999602</guid>
      <dc:creator>bmierzwi</dc:creator>
      <dc:date>2021-07-29T11:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452573#M1999603</link>
      <description>&lt;P&gt;Thank you for taking the time to read through my problem.&lt;BR /&gt;&lt;BR /&gt;Turned out it was the bottom-most part of my code that caused the problem... The last 'NRFAKTURYDOWZ = wa_ini-vbelv.' should have been put within ELSE statement. Without it it just always overwrote whatever value was there and made me think my IF is simply ignored… because I was plainly overwriting it every single time.&lt;BR /&gt;&lt;BR /&gt;Thanks again for the time and support.&lt;BR /&gt;Cheers,&lt;BR /&gt;Bartek&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 11:58:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452573#M1999603</guid>
      <dc:creator>bmierzwi</dc:creator>
      <dc:date>2021-07-29T11:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452574#M1999604</link>
      <description>&lt;P&gt;Glad to be helpful, and welcome aboard.&lt;/P&gt;&lt;P&gt;Look around for debugging tutorials, to change the code (even to put a break-point on it) it's not a good idea, because it will change the environment and, by that, the results of the debug.&lt;/P&gt;&lt;P&gt;For the next time, use /H before to run the program (in the selection screen, before the Run/F8 thing, or, if you have access to the code, double-clicking at the top left of a code line, you'll set a session break-point.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 13:39:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452574#M1999604</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-29T13:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: IF BETWEEN does not work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452575#M1999605</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;bmierzwi&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Hi Bartosz,&lt;/P&gt;&lt;P&gt;hope you don't mind an additional suggestion for your code? &lt;/P&gt;&lt;P&gt;If this is part of a report program which has a selection screen, I'd put the ranges you need to query in the IF-statements into the selection-screen as select-options and use the "IN" option for the IF-Statements like "IF vbelv IN S_V_INCL" ( for VBELV included) and "IF vbelv IN S_V_SPC (for VBELV with special logic) - you'll need to come up with proper names for them. The point is, that it's a lot more flexible if you have the option to provide the information via the selection-screen as you for example may not even have data for the same number ranges in the development, test or prod systems. And sooner rather than later somebody will need the special logic done for other numbers not covered by what is hard-coded in the program. If this is all handled via select-options, it can be easily handled without requiring code-changes.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Bärbel&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 14:34:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-between-does-not-work/m-p/12452575#M1999605</guid>
      <dc:creator>BaerbelWinkler</dc:creator>
      <dc:date>2021-07-29T14:34:39Z</dc:date>
    </item>
  </channel>
</rss>

