‎2009 Apr 13 4:53 AM
Dear friends,
How to select the record from BSEG table between Date range. Please give me the solution . Am also try to find the solution in SDN also.
select-options post_dt for bkpf-budat obligatory default sy-datum NO-EXTENSION.
select belnr budat from bkpf into corresponding fields of table it_head
where bukrs eq compcode
and gjahr eq year
and blart eq doctype
and budat in post_dt
order by belnr budat.
For this select query is working in perfect for single date only. But i want to select the date date range wise.
Thanks
Saravanan R
‎2009 Apr 13 5:19 AM
Remove NO-EXTENSION from select query beacuse it will suppress the upper limit and it work just as parameter.
select-options post_dt for bkpf-budat obligatory default sy-datum.
Provide the upper and the lower value data from BSEG table will be fetched according to range.
Regards,
Gurpreet
‎2009 Apr 13 5:19 AM
Remove NO-EXTENSION from select query beacuse it will suppress the upper limit and it work just as parameter.
select-options post_dt for bkpf-budat obligatory default sy-datum.
Provide the upper and the lower value data from BSEG table will be fetched according to range.
Regards,
Gurpreet
‎2009 Apr 13 5:30 AM
Hi:
just do like this
SELECT-OPTIONS post_dt FOR bkpf-budat OBLIGATORY DEFAULT sy-datum
NO-EXTENSION.
Regards
Shashi
‎2009 Apr 13 7:30 AM
‎2009 Apr 13 7:34 AM
HI,
U can check the Select Quert by using IN s_option.
Like eg:--
Select * form Zemp where empno in s_empno.
Hope this example will help u...
here Zemp is a table...... empno is a field s_empno is a Select-option.
Thanks and rEgards
Suraj S Nair
‎2009 Apr 13 9:12 AM
Hi,
Your coding works fine and retrieves all records which satisfy WHERE clause. Check at your table level how many records you have for your condition and check with internal table content.
Regards,
Prasanth
‎2009 Apr 13 5:40 AM
Hi,
Dont use No-Extention as this will enable ur selection option to act like a Parameter, as ur requrement is for Date range, do as per Gurpreets suggestion.
‎2009 Apr 13 7:14 AM
hi,
With NO-extension the select-option works as a Parameter..... and its not as per ur requirement to have a range at selection.....
Thanks
Suraj