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: 

is there a good FM to calculate hourly rates that will take into

Former Member
0 Kudos
244

consideration 12 hour employees that are indirectly evaluated as well as salaried EEs?

6 REPLIES 6

former_member181962
Active Contributor
0 Kudos
82

Check this one,

HR_ECM_CALCULATE_HOURLY_RATE

Regards,

ravi

ferry_lianto
Active Contributor
0 Kudos
82

Hi Robert,

Have you looked this FM <b>HR_ECM_CALCULATE_HOURLY_RATE</b>?

Regards,

Ferry Lianto

former_member181966
Active Contributor
0 Kudos
82

Hi,

As you already got the answer , I don’t wna repeat the same post ...!!

<b>Tip</b> For HR related FM ... You can go SE37 ->Press F4 and give Package = p* and Delete the # of hits . I always search the FMs like this..

Hope this’ll give you idea!!

<b>Pl... award the points.</b>

Good luck

Thanks

Saquib Khan

"Some are wise and some are otherwise"

0 Kudos
82

how about using FM RP_ALLPERIODS_FROM_ANSAL? anyone have experience with this one?

ferry_lianto
Active Contributor
0 Kudos
82

Here is sample code.

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.

0 Kudos
82

thanks. i think i'll use 'RP_ALLPERIODS_FROM_ANSAL'