<?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: finding the range for 2 different fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940626#M1152370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi create range for it&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; ranges :r_range for HRV1218-EXPR_LOW     &lt;/P&gt;&lt;P&gt;then populate the range with values high and low &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;     SELECT  field1 field2  FROM HRV1218 &lt;/P&gt;&lt;P&gt;      INTO ITAB&lt;/P&gt;&lt;P&gt;      WHERE EXPR_LOW IN r_expr      OR &lt;/P&gt;&lt;P&gt;                  EXPR_HIGH IN r_expr&lt;/P&gt;&lt;P&gt;                  AND OBJID = OBJID.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt; thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Dec 2008 09:25:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-22T09:25:28Z</dc:date>
    <item>
      <title>finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940621#M1152365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   In table HRV1218 the fields EXPR_LOW and EXPR_HIGH stores the range value when configrued responsibility. I want to get the range from these 2 fields. How to write the select query. I tried with between statement since its are 2 different field. Here is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : OBJID TYPE OBJID.&lt;/P&gt;&lt;P&gt;DATA : ORGID TYPE ORGID.&lt;/P&gt;&lt;P&gt;DATA : PA LIKE PA0001-WERKS.&lt;/P&gt;&lt;P&gt;DATA : LT_ITAB TYPE HRV1218 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PA = '1027'.&lt;/P&gt;&lt;P&gt;SELECT OBJID FROM HRP1240 INTO OBJID WHERE EXT_OBJID = '01000014'.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;  SELECT ALL FROM HRV1218 INTO LT_ITAB WHERE EXPR_LOW IN ('00000000') AND&lt;/P&gt;&lt;P&gt;                                               EXPR_HIGH IN ('99999999') AND OBJID = OBJID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT LT_ITAB.&lt;/P&gt;&lt;P&gt; WRITE LT_ITAB.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am not getting any thing in my LT_ITAB. I want the range between the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In table EXPR_LOW = '00000000' and EXPR_HIGH = '99999999' suppose the when the value is 60000709 i should get the other fields in the table. How to get this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 08:56:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940621#M1152365</guid>
      <dc:creator>vijy_mukunthan</dc:creator>
      <dc:date>2008-12-22T08:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940622#M1152366</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;IN is not the correct way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ALL FROM HRV1218 INTO LT_ITAB &lt;/P&gt;&lt;P&gt;WHERE  ( EXPR_LOW &amp;gt;= '00000000'  and&lt;/P&gt;&lt;P&gt;                EXPR_LOW &amp;lt;= '99999999') and&lt;/P&gt;&lt;P&gt;(EXPR_HIGH &amp;gt;= '00000000'  and EXPR_HIGH &amp;lt;= ('99999999')) AND OBJID = OBJID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 09:04:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940622#M1152366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T09:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940623#M1152367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As far as I get ur problem try this out &lt;/P&gt;&lt;P&gt;SELECT ALL FROM HRV1218 INTO LT_ITAB WHERE EXPR_LOW GE '00000000' AND&lt;/P&gt;&lt;P&gt;EXPR_HIGH LE '99999999' AND OBJID = OBJID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Sahil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 09:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940623#M1152367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T09:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940624#M1152368</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;Do like this:&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
   r_expr   TYPE RANGE            
                  OF HRV1218-EXPR_LOW.   
    ....................................................
    .....................................................
     wa_expr-sign = 'I'.
    wa_expr-option = 'BT'.
    wa_expr-low = '00000000'.
    wa_expr-high = '99999999'.
    APPEND wa_expr TO r_expr.
    ...................................................
    ...................................................
    SELECT * FROM HRV1218 
      INTO LT_ITAB
      WHERE (EXPR_LOW IN r_expr
      OR EXPR_HIGH IN r_expr)
      AND OBJID = OBJID.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Neha Shukla on Dec 22, 2008 2:35 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 09:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940624#M1152368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T09:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940625#M1152369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try few things:&lt;/P&gt;&lt;P&gt;1. Try to directly select data based on the values you are putting in the query directly from se16. Just to cross verify, since you are using IN or =&lt;/P&gt;&lt;P&gt;2. Use relational operators LE or GE so that even if there is some other value data will get selected.&lt;/P&gt;&lt;P&gt;3. Check the value in your variable OBJID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 09:18:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940625#M1152369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T09:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940626#M1152370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi create range for it&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; ranges :r_range for HRV1218-EXPR_LOW     &lt;/P&gt;&lt;P&gt;then populate the range with values high and low &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;     SELECT  field1 field2  FROM HRV1218 &lt;/P&gt;&lt;P&gt;      INTO ITAB&lt;/P&gt;&lt;P&gt;      WHERE EXPR_LOW IN r_expr      OR &lt;/P&gt;&lt;P&gt;                  EXPR_HIGH IN r_expr&lt;/P&gt;&lt;P&gt;                  AND OBJID = OBJID.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt; thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 09:25:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940626#M1152370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T09:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940627#M1152371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi neha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  What is the type of  wa_expr? when i try to declare the type as r_expr its showing error as&lt;/P&gt;&lt;P&gt;I declared as wa_expr like r_expr OCCURS 0  .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"WA_EXPR" is a table without a header line and therefore has no component called "SIGN".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i declared like this&lt;/P&gt;&lt;P&gt;wa_expr like r_expr OCCURS 0 WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its showing this error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When using "WITH HEADER LINE", the line type cannot be a table type&lt;/STRONG&gt;. .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 09:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940627#M1152371</guid>
      <dc:creator>vijy_mukunthan</dc:creator>
      <dc:date>2008-12-22T09:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940628#M1152372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, declare it as &lt;/P&gt;&lt;P&gt;ranges,&lt;/P&gt;&lt;P&gt;press f1 on ranges &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 09:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940628#M1152372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T09:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range for 2 different fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940629#M1152373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) declare an internal table &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;begin of so_hrv218 occurs 0, &lt;/P&gt;&lt;P&gt;  SIGN(1)    type c, &lt;/P&gt;&lt;P&gt;  OPTION(2) type c, &lt;/P&gt;&lt;P&gt;  LOW         like bukrs, &lt;/P&gt;&lt;P&gt;  HIGH         like bukrs, &lt;/P&gt;&lt;P&gt;end of so_hrv218. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) declare a work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) pass the following values into the work area and then to the table so_hrv218&lt;/P&gt;&lt;P&gt;    wa_so_hrv218-sign = 'I'.&lt;/P&gt;&lt;P&gt;    wa_so_hrv218-option = 'BT'.&lt;/P&gt;&lt;P&gt;    wa_so_hrv218-low = '00000000'.&lt;/P&gt;&lt;P&gt;    wa_so_hrv218-high = '99999999'.&lt;/P&gt;&lt;P&gt;    APPEND wa_expr TO r_expr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Declare ranges&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) then go on with the simple SQL select query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;srikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2008 10:57:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-the-range-for-2-different-fields/m-p/4940629#M1152373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-22T10:57:57Z</dc:date>
    </item>
  </channel>
</rss>

