cancel
Showing results for 
Search instead for 
Did you mean: 

how to get weekly/hourly salary of employees?

Former Member
0 Kudos

Hi All,

Iam fresher in ABAP and now iam doing one report in HR. In that report i have to calucalate weekly/hourly salary of employees, but my confusion is how can i deteremine whether that employee is working as hourly / weekly basis?

Anybody can help me ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ranjith,

In order to know whether the employee is paid hourly/weekly/monthly, you need to do the following:

1. Get the Employee Group (PERSG) and Employee Sub group (PERSK) from Infotype 0001

2. Read the table T503 to get ABART (Grouping for Personnel Calc. Rule) for the given PERSA and PERSK.

Based on the following ABART values you can decided how the employee is getting paid:

1 - Hourly

2 - Periodic (wage)

3 - Periodic (salary)

4 - Every 14 days (total)

5 - Weekly (total)

6 - Two-month period

7 - Two-month period

8 - Daily

9 - Annually

The above values for ABART are fixed by SAP and cannot be customized.

Hope this clarifies your doubt.

Thanks and Regards,

JP

Former Member
0 Kudos

Use the following logic:

  • get the period parameters

SELECT SINGLE permo

INTO l_permo

FROM t549a

WHERE abkrs = p0001-abkrs.

  • go into period parameter table to get payroll time units

SELECT SINGLE zeinh

INTO l_zeinh

FROM t549r

WHERE permo = l_permo.

  • get the annual salary

CALL FUNCTION 'RP_ANSAL_FROM_PERNR'

EXPORTING

f_date = sy-datlo

  • F_TCLAS = 'A'

f_pernr = p0000-pernr

IMPORTING

f_ansal = l_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.

  • The below function module can give you every type of *

  • salary.

  • call function module to get hourly rate

CALL FUNCTION 'RP_ALLPERIODS_FROM_ANSAL'

EXPORTING

p_ansal = l_ansal

p_divgv = p0008-divgv

p_zeinh = l_zeinh

  • P_SUBTY = 0

p_molga = c_10

  • P_TCLAS = 'A'

p_pernr = p0000-pernr

p_date = sy-datum

IMPORTING

  • P_MONTH =

  • P_SMTHY =

  • P_BWKLY =

  • P_WEKLY =

p_houry = l_hourly

  • P_4WKLY =

  • P_QTRLY =

  • P_SMANN =

EXCEPTIONS

feature_error = 1

OTHERS = 2.

IF sy-subrc = 0.

gt_data-payrate = l_hourly.

ENDIF.

Hope it helps. Please close the issue with appropriate points if helpful.

Good luck.

Venu

Former Member
0 Kudos

Is the problem solved?

Please close the issue with appropriate points if helpful.

Venu

Former Member
0 Kudos

Thnx venu.

I tried ur code.

when i am printing the l_ansal, gettinng th annual salary but l_zeinh getting like 1, 2 .. numbers .

so hw can i determine these record for houly wotking / weekly?

Former Member
0 Kudos

Hi Rajith,

This function module will return different types of employee salary, hourly, weekly, monthly..etc.

The export parameter from the fn.module P_WEKLY will get you the weekly salary.

I don't understand clearly about your statement 'but l_zeinh getting like 1, 2 .. numbers '..

If not solved, please explain clearly with your question.

Good luck.

Venu

Hope it helps. Please close the issue with appropriate points if helpful.

Good luck.

Venu

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

U can check this field PA0001-ABKRS(Payroll Area)

this gives whether the employee is working on

hourly / weekly basis.

Regards,

GSR.

Former Member
0 Kudos

i checked ABKRS field but that for Payroll Area.

Is it correct?

How can i use this one?

suresh_datti
Active Contributor
0 Kudos

Hi Ranjith,

You can get all the info from an employee's Basic Pay Record (0008). The Pay Scale Group should tell you whether the employee is hourly etc.. and the actual Rate is tied to a Wagetype. If you display an employee's 0008 record in PA20, you will get an idea.

Regards,

Suresh Datti