11-22-2007 7:27 PM
hi guys,
i need to know if an employee has enough quota to have vacations, i know that that info comes from it 2006, my problem is that with out time managment, every employee earn vacation days during the year.
so sometimes in it 2006 you will have enough quota, but if u try to give them vacation by pa30, sap return a message that the employee does not have enough vacation quota.
i need some function that returns me the real value, not the one from it 2006,
i debbuged pa30 and uses the function HR_DEDUCE_QUOTA, is there another way to get this?
tks in advance.
11-22-2007 9:12 PM
This FM will give you deductions.
CALL FUNCTION 'HR_GET_QUOTA_DEDUCTION'
EXPORTING
pernum = p_pernr
sbegda = pn-begda
sendda = pn-endda
TABLES
qdisded = dedu
EXCEPTIONS
record_not_found = 1
OTHERS = 2.
this FM will give you accruals which get listed in PT50.
CALL FUNCTION 'HR_TIME_RESULTS_IN_INTERVAL'
EXPORTING
int_pernr = p_pernr
int_begda = pn-begda
int_endda = pn-endda
int_cltyp = '1'
TABLES
int_time_results = time_results
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5
OTHERS = 6.
Other importan FM is HR_GET_QUOTA_DATA
hope this helps.
A
<i><b>Reward points for each helpful answer.</b></i>
11-22-2007 9:12 PM
This FM will give you deductions.
CALL FUNCTION 'HR_GET_QUOTA_DEDUCTION'
EXPORTING
pernum = p_pernr
sbegda = pn-begda
sendda = pn-endda
TABLES
qdisded = dedu
EXCEPTIONS
record_not_found = 1
OTHERS = 2.
this FM will give you accruals which get listed in PT50.
CALL FUNCTION 'HR_TIME_RESULTS_IN_INTERVAL'
EXPORTING
int_pernr = p_pernr
int_begda = pn-begda
int_endda = pn-endda
int_cltyp = '1'
TABLES
int_time_results = time_results
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5
OTHERS = 6.
Other importan FM is HR_GET_QUOTA_DATA
hope this helps.
A
<i><b>Reward points for each helpful answer.</b></i>
11-22-2007 9:50 PM
Hi Amandeep,
i look for some examples with this 2 functions, and im lost,
i read hat u do a report using this 2 functions.
can u post an example in how to use this FM?
tks in advance
11-22-2007 9:58 PM
2. <b>HR_GET_QUOTA_DEDUCTION</b>
DATA:dedu LIKE ptdisded OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'HR_GET_QUOTA_DEDUCTION'
EXPORTING
pernum = p_pernr
sbegda = pn-begda
sendda = pn-endda
TABLES
qdisded = dedu
EXCEPTIONS
record_not_found = 1
OTHERS = 2.
3. <b>HR_TIME_RESULTS_IN_INTERVAL</b>
DATA: time_results TYPE ptm_time_results OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'HR_TIME_RESULTS_IN_INTERVAL'
EXPORTING
int_pernr = p_pernr
int_begda = pn-begda
int_endda = pn-endda
int_cltyp = '1'
TABLES
int_time_results = time_results
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5
OTHERS = 6.
hope this helps.
Cheers
Amandeep
Reward points for each helpful answer.
11-22-2007 10:21 PM