<?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: Problem with select statement using Ranges in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570543#M1270720</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;Firstly check if the entries does exist in the database table for the conditions you have given....&lt;/P&gt;&lt;P&gt;if so,,&lt;/P&gt;&lt;P&gt;did you try with the select query I had written because even for select-options you have to use IN like I had given you in my post....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if that also does not work,&lt;/P&gt;&lt;P&gt;then provide us the  select query you have changed and also try to debug what exactly the values are retrieved from the table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 May 2009 12:15:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-05T12:15:32Z</dc:date>
    <item>
      <title>Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570537#M1270714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;               I have used Ranges and used a select statement for selecting those ranges but I am facing a problem.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
RANGES: r_doctyp for EDIDC-DOCTYP.
r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low  = 'DEBMAS'.
append r_doctyp.


r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low  = 'MATMAS'.
append r_doctyp.

r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low  = 'PRICAT'.
append r_doctyp.

r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low  = 'ORDERS'.
append r_doctyp.

r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low  = 'INVOIC'.
append r_doctyp.

Select DOCNUM                                " IDoc number
       DOCTYP                                " IDoc Type
             from  EDIDC into table IT_ZEDIDC
             where CREDAT EQ s_credat-low
             and   DOCTYP EQ r_doctyp        " IDOC Types
             and   DIRECT EQ '1'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my select statement is only taking INVOIC.&lt;/P&gt;&lt;P&gt;But my statement should take any document type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 11:38:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570537#M1270714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T11:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570538#M1270715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DOCTYP &lt;STRONG&gt;IN&lt;/STRONG&gt; r_doctyp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 11:39:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570538#M1270715</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-05-05T11:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570539#M1270716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select DOCNUM                                " IDoc number&lt;/P&gt;&lt;P&gt;       DOCTYP                                " IDoc Type&lt;/P&gt;&lt;P&gt;             from  EDIDC into table IT_ZEDIDC&lt;/P&gt;&lt;P&gt;             where CREDAT EQ s_credat-low&lt;/P&gt;&lt;P&gt;             and   DOCTYP &lt;STRONG&gt;IN&lt;/STRONG&gt; r_doctyp        " IDOC Types&lt;/P&gt;&lt;P&gt;             and   DIRECT EQ '1'.&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 11:39:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570539#M1270716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T11:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570540#M1270717</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;change the select statement as given below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Select DOCNUM                                " IDoc number
       DOCTYP                                " IDoc Type
             from  EDIDC into table IT_ZEDIDC
             where CREDAT IN s_credat
             and   DOCTYP IN r_doctyp        " IDOC Types
             and   DIRECT EQ '1'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 11:40:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570540#M1270717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T11:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570541#M1270718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your "WHERE" clause is saying "EQ" to r_doctype so is matching to the last value you appended to your range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Range tables work like select-options &lt;/P&gt;&lt;P&gt;- you need the syntax to be "WHERE doctype IN r-doctype"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 11:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570541#M1270718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T11:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570542#M1270719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;          Even I have used IN but its not coming up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 12:11:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570542#M1270719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T12:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570543#M1270720</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;Firstly check if the entries does exist in the database table for the conditions you have given....&lt;/P&gt;&lt;P&gt;if so,,&lt;/P&gt;&lt;P&gt;did you try with the select query I had written because even for select-options you have to use IN like I had given you in my post....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if that also does not work,&lt;/P&gt;&lt;P&gt;then provide us the  select query you have changed and also try to debug what exactly the values are retrieved from the table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 12:15:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570543#M1270720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T12:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570544#M1270721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select DOCNUM " IDoc number&lt;/P&gt;&lt;P&gt;DOCTYP " IDoc Type&lt;/P&gt;&lt;P&gt;from EDIDC into table IT_ZEDIDC&lt;/P&gt;&lt;P&gt;where CREDAT &lt;STRONG&gt;IN&lt;/STRONG&gt; s_credat&lt;/P&gt;&lt;P&gt;and DOCTYP &lt;STRONG&gt;IN&lt;/STRONG&gt; r_doctyp " IDOC Types&lt;/P&gt;&lt;P&gt;and DIRECT EQ '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 12:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570544#M1270721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T12:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570545#M1270722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddarth,&lt;/P&gt;&lt;P&gt;                   Entries are there in Database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 12:18:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570545#M1270722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T12:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570546#M1270723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you try with the select query I had given earlier...&lt;/P&gt;&lt;P&gt;I had given the same one as Kiran has given in his recent post....&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Siddharth Chordia on May 5, 2009 2:21 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 12:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570546#M1270723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T12:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570547#M1270724</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;Your following select statement is correct. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Select DOCNUM                                " IDoc number
            DOCTYP                                " IDoc Type
            from  EDIDC into table IT_ZEDIDC
            where CREDAT IN s_credat
            and   DOCTYP IN r_doctyp        " IDOC Types
            and   DIRECT EQ '1'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why you are not getting result..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. structure of the IT_ZEDIDC is having two fields DOCNUM , DOCTYP  with same data lengths. If not it should be...&lt;/P&gt;&lt;P&gt;2. Order in the database table is must be similer to the order you maintained in the select statement.&lt;/P&gt;&lt;P&gt;3. As you are hard coding the input ranges make sure about every letter.&lt;/P&gt;&lt;P&gt;4. take a look at other where condition fields too.&lt;/P&gt;&lt;P&gt;5. check the table of the ranges in debugging mode.&lt;/P&gt;&lt;P&gt;6. why can't you declare separate work area and table for ranges...?&lt;/P&gt;&lt;P&gt;  like .... data: r_tab type range of &amp;lt;field&amp;gt;&lt;/P&gt;&lt;P&gt;             data: wa_tab like line of r_tab.&lt;/P&gt;&lt;P&gt;7. Use clear work area statement after the append statment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Naveen Inuganti.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 12:24:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570547#M1270724</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2009-05-05T12:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570548#M1270725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dheeru,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you just change your SELECT stmt to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Select            DOCNUM                                " IDoc number
                     DOCTYP                                " IDoc Type
             from  EDIDC into table IT_ZEDIDC
             where CREDAT EQ s_credat-low
             " and   DOCTYP EQ r_doctyp
             AND IDOCTP IN r_doctyp "--&amp;gt; use this clause
             and   DIRECT EQ '1'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can give this a try. I can see in my system  DOCTYP is not populated. You can check EDIDC in your system for an existing Idoc &amp;amp; validate:-))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on May 5, 2009 2:28 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 12:28:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570548#M1270725</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-05-05T12:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select statement using Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570549#M1270726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of EQ you must use IN   in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;remember this when we are using select-options ,in select statement use "IN" only.&lt;/P&gt;&lt;P&gt;                                            for  parameters , you have to use "EQ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 13:12:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement-using-ranges/m-p/5570549#M1270726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T13:12:21Z</dc:date>
    </item>
  </channel>
</rss>

