Extraction of years from the interval of two dates.
I am part of development for a planning application. I have maintained master data for "Study". This master data has number of fields out of which i am also maintaining "Start Date" and "End Date".
For example, lets say start date is: 01/01/2006 and end date is: 31/12/2008 which spans over three years. I want to retrieve the years 2006, 2007 and 2008 from the master data.
Next i want to display these three years in a year dropdown inside a web-template.
Hope to get the solution from the GURUS.
Abhijit Pathak replied
<Font Face="Tahoma" Color ="Blue">
1. Create an Exit Variable on YEAR characteristic of your Planning Area (0FISCYEAR or 0CALYEAR
as the case may be)
2. Create a Function Module to populate above user exit variable on year
3. In the function module, first read the value of "Study" entered by user and then
a. Go to master data table of "Study" and pick up the values of start date and end date
b. Find start year and end year from those start and end dates
c. Populate low and high values of your year variable interval with these values
4. Use the above created user exit variable on YEAR in your desired layout (lead or data column as the
requirement may be)
Hope this helps.
*Please reciprocate by assigning posts if above response was useful