04-25-2006 12:29 PM
The program will have a selection screen with the parameter option for empid (Provide F4 help) and select option for Start Date and End Date (Provide the F4 functionality to the date fields.)
2. When the user Executes the program, the program will do the following:
a. It has to display the calendar year for the start date and end date(same as Microsoft outlook calendar) . For Ex: you had taken casual leave on 12/04/05 then this date should be colored with yellow. And use different colors for different type of leaves.(it should cover casual, sick, optional, vacation and privilege leaves).
we have maintained separate ztable to get the leave data.
m_merlin@rediffmail.com
ashvender@rediffmail.com
04-25-2006 12:36 PM
Hi,
U can these function Modules to achieve date calulation.
-
Date Manipulation
SD_DATETIME_DIFFERENCE
MONTHS_BETWEEN_TWO_DATES.
RE_ADD_MONTH_TO_DATE
CALCULATE_DATE
HR_JP_MONTH_BEGIN_END_DATE
Use this function module to findout days and dates
Useful Link for ur problem.
http://72.14.207.104/search?q=cache:ZbQsSxuRZp4J:www.geocities.com/victorav15/sapr3/abapfun.htmlFunctionalModuleINABAP&hl=en&gl=in&ct=clnk&cd=1
u can manually print the report on the screen by defining the page size.
select all the dates on which the leave was availed.
colour dates based onn the leave type while writing.
Regards
Manoj
Message was edited by: Manoj Gupta
04-25-2006 12:37 PM
Hi Ashvender,
There is a Function Module that satisfies your requirement.
It is <b>AC_BUILD_CALENDAR</b>.
Regards,
SP.
04-25-2006 12:38 PM
Hi,
Use the class CL_GUI_CALENDAR with a dialog container and you should be able to use the method SET_DAY_INFO to highlight specifc days.
Regards,
Ravi
Note : Please close the thread, if the issue is resolved.
04-25-2006 12:54 PM
Hi Ashwneder,
1. To implement the first part of your requirement , you can use the following code :
REPORT ZKUN_DATE1 .
tables : ztable.
parameter : empid type ztable-empid.
select-options sdate for sy-datum.
Here i am assuming the table ztable contains the field empid.
2. After you execute the button , you should retrieve the dates for the various leaves from the database table as below :
select cas_leave Sick_leave opt_leave vac_leave pri_leave from ztable into table itab where empid = empid and sdate = sdate-low and edate = sdate-high.
Note : Ztable is assumed to be the database table containig the other fileds also .
Also ztable-sdate =Start date
ztable-edate = End date.
3. to display the data you can use the following code .
Loop at itab.
write the code tro display.
Endloop.
Here to display the various leaves as colored , you should use the option For coloring.
The synax for coloring is :
<b>FORMAT COLOR <n> [ON] INTENSIFIED [ON|OFF] INVERSE [ON|OFF].</b>
Note : When n = 3, the color is yellow.
Simlarly other values of n will give you different color.
Hope this solves your provblem.
Regards,
Kunal.
Note : Reward the helpful answer.