<?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: select data where le date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804264#M345245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;tables: vbrk.
select-options : dte for vbrk-fkdat.
*                 cust_no for vbrk-kunrg.
data : begin of itab_vbrk occurs 0,
       vbeln like vbrk-vbeln,
       fkdat like vbrk-fkdat,
       kunrg like vbrk-kunrg,
       bstnk_vf like vbrk-bstnk_vf,
       end of itab_vbrk.
SELECT VBELN FKDAT KUNRG BSTNK_VF FROM VBRK INTO CORRESPONDING FIELDS OF
 TABLE ITAB_VBRK
WHERE  FKDAT LE DTE-low .

sort itab_vbrk by fkdat descending.
loop at itab_vbrk.
write:/ itab_vbrk-vbeln,
        itab_vbrk-fkdat.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this code ...&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, 25 Dec 2006 09:27:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-25T09:27:45Z</dc:date>
    <item>
      <title>select data where le date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804260#M345241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a select option (DTE) for date on selection screen. Now i want extract data from DB table to internal table where all dates shlod be LE from givin date in select option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my select statment is :&lt;/P&gt;&lt;P&gt;SELECT VBELN FKDAT KUNRG BSTNK_VF FROM VBRK INTO CORRESPONDING FIELDS OF TABLE ITAB_VBRK&lt;/P&gt;&lt;P&gt;WHERE KUNRG IN CUST_NO AND FKDAT IN DTE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i m getiing data only EQ givin date. but i need all dates wich r LE from givin date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Jitendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Dec 2006 09:03:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804260#M345241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T09:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: select data where le date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804261#M345242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually you should be rather using a parameter instead of a selec option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway with a SELECT OPTION you code should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN FKDAT KUNRG BSTNK_VF FROM VBRK INTO CORRESPONDING FIELDS OF TABLE ITAB_VBRK&lt;/P&gt;&lt;P&gt;WHERE KUNRG IN CUST_NO&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;AND FKDAT LT DTE-LOW&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Dec 2006 09:15:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804261#M345242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T09:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: select data where le date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804262#M345243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi , &lt;/P&gt;&lt;P&gt;Welcome to SDN,,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT VBELN FKDAT KUNRG BSTNK_VF FROM VBRK INTO CORRESPONDING FIELDS OF
 TABLE ITAB_VBRK
WHERE KUNRG IN CUST_NO AND FKDAT LE DTE-Low .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; "chk this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass the select-option value of dte into a variable and substitute this variable in the where clause .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will fetch u the records from Db for Date LE from date of ur selection screen.&lt;/P&gt;&lt;P&gt;LE --&amp;gt;&lt;/P&gt;&lt;P&gt;or LT--&amp;gt; for the date &lt;/P&gt;&lt;P&gt;hope this helps , &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, 25 Dec 2006 09:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804262#M345243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: select data where le date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804263#M345244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jitendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN FKDAT KUNRG BSTNK_VF FROM VBRK INTO CORRESPONDING FIELDS OF TABLE ITAB_VBRK&lt;/P&gt;&lt;P&gt;WHERE KUNRG IN CUST_NO AND FKDAT IN DTE-LOW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check with this code it will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Dec 2006 09:18:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804263#M345244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T09:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: select data where le date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804264#M345245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;tables: vbrk.
select-options : dte for vbrk-fkdat.
*                 cust_no for vbrk-kunrg.
data : begin of itab_vbrk occurs 0,
       vbeln like vbrk-vbeln,
       fkdat like vbrk-fkdat,
       kunrg like vbrk-kunrg,
       bstnk_vf like vbrk-bstnk_vf,
       end of itab_vbrk.
SELECT VBELN FKDAT KUNRG BSTNK_VF FROM VBRK INTO CORRESPONDING FIELDS OF
 TABLE ITAB_VBRK
WHERE  FKDAT LE DTE-low .

sort itab_vbrk by fkdat descending.
loop at itab_vbrk.
write:/ itab_vbrk-vbeln,
        itab_vbrk-fkdat.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this code ...&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, 25 Dec 2006 09:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804264#M345245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T09:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: select data where le date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804265#M345246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Jitendra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As highlighted by Sharath, do declare the date as PARAMETER instead of select options and use as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PARAMETERS: DTE TYPE FKDAT.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN FKDAT KUNRG BSTNK_VF FROM VBRK INTO   CORRESPONDING FIELDS OF TABLE ITAB_VBRK&lt;/P&gt;&lt;P&gt;WHERE KUNRG IN CUST_NO AND &amp;lt;b&amp;gt;FKDAT LE DTE&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the requirement is to use SELECT-OPTION, then ask the users to input the date in HIGH instead of LOW. In that case, your select statement will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 02:22:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804265#M345246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T02:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: select data where le date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804266#M345247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;  An example of how this will work is as given below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data : it_1 type table of mara.

select-options : s_matnr for mara-ersda.

data : r_matnr like line of s_matnr.
start-of-selection.

loop at s_matnr into r_matnr.
 r_matnr-option = 'LE'.
 modify s_matnr from r_matnr.

endloop.


select * into table it_1
from mara
where ersda in s_matnr.
data : wa like line of it_1.
loop at it_1 into wa .
write:/ wa-matnr.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What this code will do is select all the materials from MARA where ERSDA is less than or equal to s_matnr-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this and if you have any queries please do revert back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 04:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-data-where-le-date/m-p/1804266#M345247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T04:21:57Z</dc:date>
    </item>
  </channel>
</rss>

