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: 

How to get the Hourly Rate from Infotype 0008

Former Member
0 Kudos

Hi,

How should I get the Hourly rate from infotype 0008 in HR?

Thank you!

Sunitha.

6 REPLIES 6

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I guess it really depends, in some cases the hourly rate is there, in others you will need to take the annual salary and divide by 2064. This is how it is done at one client.

Regards,

Rich Heilman

0 Kudos

Can't we get the Hourly rate directly from Infotype 0008 or is there any other ways available to get that?

Thanks!

Sunitha.

0 Kudos

Hi

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 this’ll give you idea!!

<b>P.S award the points.!!! DOn`t forget :)!!!!</b>

Good luck

Thanks

Saquib Khan

"Knowledge comes but wisdom lingers!!"

"Some are wise and some are otherwise"

Former Member
0 Kudos

Hi,

U need to read for the wage type and the wage type amount, different wage types are assigned for the hourly and monthly employees.If u need a sample code let me know

Regards

Vick

0 Kudos

Hi Vick,

If you have any sample code, please do send me....

Thank you!

Sunitha.

Former Member
0 Kudos

Hi sunitha,

For this you need to change the processing class -10, base on reduction factor /803, system will apply the hourly pay cal formula.

regards,

abhijeet