‎2008 Jun 18 6:52 AM
In the selection screen, i enter April month i.e. 04. Now i have to go 5 months back i.e. November i.e. 11. Now from table T247, I want to select data from November to April. Ho do i do it.
‎2008 Jun 18 6:55 AM
select ....
from
into table...
where date+4(2) > 04 and "<<<check where the months offset need to reflect
date+4(2) < 05.
‎2008 Jun 18 6:56 AM
Hi,
Give select-options for the month.
select data according to this select-options.
And then enter your specific range on selection screen.
Reward pts. if usefull.
regards,
Dhan
‎2008 Jun 18 6:57 AM
HI
It is better to select all the months data and read it with u r month ........other wise fill the range table of month and get the values...........
Actually problem is if u want select the months from 11 to 04........u have to select 11,12,01,02,03,04.............But it will not select like that if u write the Between clause in select.
Edited by: vamshi naini on Jun 18, 2008 11:27 AM
‎2008 Jun 18 7:09 AM
How do i do it. I want to select 11,12,01,02,03,04 and user will enter only 04.
‎2008 Jun 18 10:15 AM
ranges: r_mnr fro t247-mnr.
r_mnr-low = '04'.
r_mnr-option = 'EQ'.
r_mnr-sign = 'I'.
append r_mnr...............etc.
in select use this range table with IN
‎2008 Jun 18 10:29 AM
hi!
1. declare the input variable as ranges.
2. assign the values for ranges sign, option, low, high
3. before assigning the values , calculate the needed months range and append the range.
i,e so_month-low = p_month
so_month-high = p_month - 5.
then assign these variables to ranges low and high.
hope ur needed ranges will come.
regards,
nagulan
‎2008 Jun 18 10:39 AM
hi use this function module..
CCM_GO_BACK_MONTHS to get the date v_date high ..
v_date-low = s_date-low.
use the select * from pa0002
into table itab
where pernr = s_pernr
and begda le v_date-high
and endda ge v_date-low .
‎2008 Jun 18 10:52 AM
Hi,
If you want you can also use BETWEEN clause in select condition.
Example :
DATA: LOW TYPE I VALUE '04',
HIGH TYPE I VALUE '11.
SELECT FIELDS.....
FROM TABLE
INTO TABLE ITAB
WHERE PARAMETER BETWEEN LOW AND HIGH.This will help you.
Plz reward if useful.
Thanks,
Dhanahsri.
Edited by: Dhanashri Pawar on Jun 18, 2008 11:52 AM
Edited by: Dhanashri Pawar on Jun 18, 2008 11:53 AM