‎2008 Jun 19 12:48 PM
hi,
I have passed the select-option parameter as a table to my function module,
suppose i have passed it as date(it contains field date-high and date-low)
In my function module while i am looping the table and selecting the data according to date_low,it is going to select only the data according to date_low.
since the table contains only one row.
loop at date.
select the data according to date_low.
,...
date_low = date_low +1.
modify date_low.
endloop.
how can i select all the data from date_low and date_high?
‎2008 Jun 19 12:53 PM
Hi,
Do like this.
while date-low LE date-high.
select the data according to date_low.
,...
date-low = date-low +1.
endwhile.
Regards,
Jagadish
‎2008 Jun 19 12:53 PM
Hi,
Do like this.
while date-low LE date-high.
select the data according to date_low.
,...
date-low = date-low +1.
endwhile.
Regards,
Jagadish
‎2008 Jun 19 12:57 PM
explain reason. why you are looping by internal table?
where will you use that range of values between date-low and date-high?
‎2008 Jun 19 1:36 PM
Hi Mart,
I am using it for RFC,that's why i have used as select-option statement and passed
it as itab,for range also i have to pass it as itab.I can pass the itab,but the problem is
I am not able to loop it,it is going to select only date_low
‎2008 Jun 19 1:51 PM
In your FM declare a range and populate your low and high
date , use this range in select ..
ranges : r_date for sy-datum.
r_date-sign = 'I' .
r_date-option = 'BT'.
r_date-low = date_low.
r_date-high = date_high.
append r_date.
select * from <table> into ...
where date in r_date.
‎2008 Jun 19 12:58 PM
loop at date.
date-high = date-high+1.
date-low = date-low+1.
modify date index sy-tabix.
endloop.
‎2008 Jun 19 1:10 PM
Hi
Instead of looping at select option table u can specify date table with select query itself
like
Select * from table into internal_table
where xyz_date in date.
Rizwan
‎2008 Jun 19 1:21 PM
Don't pass the date range as separate tables, rather pass it as range table and select the data as using select option.
‎2008 Jun 19 1:25 PM
Hi,
there is issue design of ur FM .
You have to put 2 table parametrs or 2 import paremeters in the FM ,after that with in the Function module fill the internal table of type ranges (say itab).
After filling the ranges internal table, this can be used in ur select stament just as select option ( select ...where podat in itab)
revrt back if any issues.
regards,
Naveen