Hi Tanuja,
You have to achieve it by writing an ABAP routine. Some companies sell this as solutions for the HR module. If you would like to try, i would suggest you to take a look at this
http://scn.sap.com/docs/DOC-29209
Thanks
Shankar Narayanan
www.shankarnarayanan.com