Skip to Content
author's profile photo Former Member
Former Member

HR_GET_QUOTA_DATA not providing Pending leaves correct till month??

Hi,

I am using this FM to fetch the absense quota and pending leaves of the employees.

I am not able to get the pending leaves correct, I mean suppose I generate payslip for april, may or june month, the pending leaves come the same.

I am posting my coding below, help me out figuring where the error could be??

CONCATENATE p_endda+0(4) '0101' INTO lv_p_begda.
CONCATENATE p_endda+0(4) '1231' INTO lv_p_endda.

CALL FUNCTION 'HR_GET_QUOTA_DATA'
EXPORTING
pernr = it_pa0000-pernr
qtype = '1'
mod = 'B'
dedu_datum = lv_p_endda
enti_datum = lv_p_endda
begda = lv_p_begda
endda = lv_p_endda
langu = sy-langu
TABLES
abwko = it_leave_details
cum_values = it_cum_values
EXCEPTIONS
infty_not_found = 1
missing_authority = 2
wrong_parameter = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

LOOP AT it_leave_details INTO is_leave_details.
CASE is_leave_details-ktart.
WHEN '06'.
it_final-days_av3 = it_final-days_av3 + is_leave_details-rest2.
* it_final-days_rh = it_final-days_rh + is_leave_details-deduct.
WHEN '07'.
it_final-days_av = it_final-days_av + is_leave_details-rest2.
* it_final-days_cl = it_final-days_cl + is_leave_details-deduct.
WHEN '08'.
it_final-days_av1 = it_final-days_av1 + is_leave_details-rest2.
* it_final-days_sl = it_final-days_sl + is_leave_details-deduct.
WHEN '09'.
it_final-days_av2 = it_final-days_av2 + is_leave_details-rest2.
* it_final-days_el = it_final-days_el + is_leave_details-deduct.
WHEN '26'.
it_final-days_av3 = it_final-days_av3 + is_leave_details-rest2.
* it_final-days_rh = it_final-days_rh + is_leave_details-deduct.
WHEN '27'.
it_final-days_av = it_final-days_av + is_leave_details-rest2.
* it_final-days_cl = it_final-days_cl + is_leave_details-deduct.
WHEN '28'.
it_final-days_av1 = it_final-days_av1 + is_leave_details-rest2.
* it_final-days_sl = it_final-days_sl + is_leave_details-deduct.
WHEN '29'.
it_final-days_av2 = it_final-days_av2 + is_leave_details-rest2.
* it_final-days_el = it_final-days_el + is_leave_details-deduct.
ENDCASE.
CLEAR is_leave_details.
ENDLOOP.

READ TABLE it_cum_values INTO is_cum_values INDEX 1.
it_final-days_tot1 = is_cum_values-rest2.
* it_final-days_tot = is_cum_values-deduct.
CLEAR: it_leave_details, it_cum_values.


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jun 27, 2012 at 07:54 AM

    Hi,

    Please let me know is Pending leaves are pending for approval or others ?

    Regards,

    Raja Sekhar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.