Get vacation quota
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.
Aman Bal replied
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.
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.
Reward points for each helpful answer.