Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

salary

Former Member
0 Kudos
162

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
102

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.

7 REPLIES 7

Former Member
0 Kudos
102

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.

Former Member
0 Kudos
102

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?

Former Member
0 Kudos
103

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.

Former Member
0 Kudos
102

Awarded the points ....solved the problem also.

Thanks

Former Member
0 Kudos
102

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

0 Kudos
102

hI,

CHECK this FM..

HRCM_EMPLOYEE_PERIOD_SALARY

Regards

vijay

Former Member
0 Kudos
102

This FM doesn't give the desired result