2005 Dec 02 9:19 AM
Hi Friends,
How should i get the monthly salary and previous monthly salary of an employee in HR?
Is any function module or code if available or some guidlines will help me.
Thank you.
Prashant
2005 Dec 02 9:43 AM
Hi Prashant,
You are correct.
Say if you want to get month salary for december, pass begin date as December 1st.
If you want to get month salary for November, pass begin date as november 1st. Then devide by 12 to get the salary.
Award me points, if it solves ur problem.
Regards,
Sudhakar.
2005 Dec 02 9:27 AM
Hi Prashant,
For salary you can get from Infotype 0008 - Basic Pay.
You can use FM 'RP_ANSAL_FROM_PERNR'. It will give you annaul salary for the Person. You can devide by 12 to get monthly salary.
CALL FUNCTION 'RP_ANSAL_FROM_PERNR'
EXPORTING
f_date = v_date
f_tclas = 'A'
f_pernr = p0008-pernr
IMPORTING
f_ansal = v_ansal
EXCEPTIONS
internal_error = 1
error_read_0001 = 2
error_read_0008 = 3
error_at_indirect_evaluation = 4
currency_conversion_error = 5
OTHERS = 6.
IF sy-subrc <> 0.
ENDIF.
Regards,
Sudhakar.
2005 Dec 02 9:39 AM
your answer is helpful , but i want the previous monthly salary also.
Which might be diff. if employee is promoted.
Does it mean if i give one month old date to FM then this will return me previous month salary?
2005 Dec 02 9:43 AM
Hi Prashant,
You are correct.
Say if you want to get month salary for december, pass begin date as December 1st.
If you want to get month salary for November, pass begin date as november 1st. Then devide by 12 to get the salary.
Award me points, if it solves ur problem.
Regards,
Sudhakar.
2005 Dec 02 9:48 AM
2006 Jan 11 5:51 AM
Hello friends,
How should i get the annual salary between two dates.
For example if an employees annual salary was 12000 (1000 * 12) and was then changed in June to 18000 (1500 * 12) then the annual salary would be 15000 (1000 * 6)+(1500 * 6).
Which function module will give me this result?
Thanks
Prashant
2006 Jan 11 6:03 AM
2006 Jan 11 6:33 AM