<?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: ranges question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582913#M262913</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if STATUS_1 eq 'X' and STATUS_0 eq 'X'.&lt;/P&gt;&lt;P&gt;        r_FRGKZ_line-low    = '0'.&lt;/P&gt;&lt;P&gt;        r_FRGKZ_line-sign   = 'I'.&lt;/P&gt;&lt;P&gt;        r_FRGKZ_line-option = 'BT'.&lt;/P&gt;&lt;P&gt;        r_FRGKZ_line-HIGH    = 'Z'.&lt;/P&gt;&lt;P&gt;      append r_FRGKZ_line to r_FRGKZ.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        r_EBAKZ_line-sign   = 'I'.&lt;/P&gt;&lt;P&gt;        r_EBAKZ_line-option = 'BT'.&lt;/P&gt;&lt;P&gt;        r_EBAKZ_line-low    = ''.&lt;/P&gt;&lt;P&gt;        r_EBAKZ_line-HIGH   = 'X'.&lt;/P&gt;&lt;P&gt;      append r_EBAKZ_line to r_EBAKZ.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;select * into TEBAN from EBAN&lt;/P&gt;&lt;P&gt;  where frgkz in r_frgkz&lt;/P&gt;&lt;P&gt;    and EBAKZ in r_EBAKZ.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2006 10:13:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-26T10:13:40Z</dc:date>
    <item>
      <title>ranges question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582912#M262912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, need help &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get information from table EBAN with a function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two imput var:&lt;/P&gt;&lt;P&gt;STATUS_0 and STATUS_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in my FM i have ranges declaration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA: r_FRGKZ type range of eban-FRGKZ,
        r_FRGKZ_line like line of r_FRGKZ.

  DATA: r_EBAKZ type range of eban-EBAKZ,
        r_EBAKZ_line like line of r_EBAKZ.

  if STATUS_0 eq 'X'.
        r_FRGKZ_line-sign   = 'I'.
        r_FRGKZ_line-option = 'EQ'.
        r_FRGKZ_line-low    = '0'.
      append r_FRGKZ_line to r_FRGKZ.

        r_EBAKZ_line-sign   = 'I'.
        r_EBAKZ_line-option = 'EQ'.
        r_EBAKZ_line-low    = ' '.
      append r_EBAKZ_line to r_EBAKZ.
  endif.
  if STATUS_1 eq 'X'.
        r_FRGKZ_line-sign   = 'I'.
        r_FRGKZ_line-option = 'EQ'.
        r_FRGKZ_line-low    = 'Z'.
      append r_FRGKZ_line to r_FRGKZ.

        r_EBAKZ_line-sign   = 'I'.
        r_EBAKZ_line-option = 'EQ'.
        r_EBAKZ_line-low    = 'X'.
      append r_EBAKZ_line to r_EBAKZ.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then i use select:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * into TEBAN from EBAN
  where frgkz in r_frgkz
    and EBAKZ in r_EBAKZ.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything works fine if only STATUS_0 or STATUS_1 is set to 'X'. If both of them are 'X' then I don't get a good result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question: how to make SAP use all conditions from line 1 and then all conditions from line 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 10:09:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582912#M262912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T10:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: ranges question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582913#M262913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if STATUS_1 eq 'X' and STATUS_0 eq 'X'.&lt;/P&gt;&lt;P&gt;        r_FRGKZ_line-low    = '0'.&lt;/P&gt;&lt;P&gt;        r_FRGKZ_line-sign   = 'I'.&lt;/P&gt;&lt;P&gt;        r_FRGKZ_line-option = 'BT'.&lt;/P&gt;&lt;P&gt;        r_FRGKZ_line-HIGH    = 'Z'.&lt;/P&gt;&lt;P&gt;      append r_FRGKZ_line to r_FRGKZ.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        r_EBAKZ_line-sign   = 'I'.&lt;/P&gt;&lt;P&gt;        r_EBAKZ_line-option = 'BT'.&lt;/P&gt;&lt;P&gt;        r_EBAKZ_line-low    = ''.&lt;/P&gt;&lt;P&gt;        r_EBAKZ_line-HIGH   = 'X'.&lt;/P&gt;&lt;P&gt;      append r_EBAKZ_line to r_EBAKZ.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;select * into TEBAN from EBAN&lt;/P&gt;&lt;P&gt;  where frgkz in r_frgkz&lt;/P&gt;&lt;P&gt;    and EBAKZ in r_EBAKZ.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 10:13:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582913#M262913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T10:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: ranges question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582914#M262914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zastawny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just Clear the variables r_FRGKZ_line and r_EBAKZ_line before assigning any values to them. That might help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 10:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582914#M262914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T10:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: ranges question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582915#M262915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't see anything wrong.... what sort of bad result are you getting and under what circumstances?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is TEBAN a table? maybe you should be coding &lt;/P&gt;&lt;P&gt;select * into &amp;lt;b&amp;gt;table&amp;lt;/b&amp;gt; TEBAN from EBAN  where frgkz in r_frgkz    and EBAKZ in r_EBAKZ.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 10:18:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582915#M262915</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-09-26T10:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: ranges question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582916#M262916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Everything works fine if only STATUS_0 or STATUS_1 is set to 'X'. If both of them are 'X' then I don't get a good result&lt;/P&gt;&lt;P&gt;--&amp;gt;&lt;/P&gt;&lt;P&gt;What do you mean by good result ..can you please check and confirm that if you have data with both status_0 and status_1 as defined in the ranges.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 10:18:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582916#M262916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T10:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: ranges question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582917#M262917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; one info to you.&lt;/P&gt;&lt;P&gt;if RANGES field is empty,then all the records will come into the table. so first check your RANGES table whether its empty or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so change your code to,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; if STATUS_0 eq 'X'  AND
    STATUS_1 eq ''.    
*--Only 1st field is selected.
     select * into TEBAN from EBAN
             where EBAKZ in r_EBAKZ.
 ELSEIF STATUS_0 eq ''  AND
    STATUS_1 eq 'X'.    
*--only 2nd field is selected
     select * into TEBAN from EBAN
             where frgkz in r_frgkz.
 ELSEIF STATUS_0 eq 'X'  AND
    STATUS_1 eq 'X'.  
*--both fields are selected
      select * into TEBAN from EBAN
        where frgkz in r_frgkz
          and EBAKZ in r_EBAKZ.
 ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;test with this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;srikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 10:21:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ranges-question/m-p/1582917#M262917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T10:21:21Z</dc:date>
    </item>
  </channel>
</rss>

