05-05-2006 8:46 PM
Hi,
How should I get the Hourly rate from infotype 0008 in HR?
Thank you!
Sunitha.
05-05-2006 8:52 PM
05-05-2006 8:58 PM
Can't we get the Hourly rate directly from Infotype 0008 or is there any other ways available to get that?
Thanks!
Sunitha.
05-05-2006 9:46 PM
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 thisll 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"
05-05-2006 10:49 PM
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
05-08-2006 4:42 AM
Hi Vick,
If you have any sample code, please do send me....
Thank you!
Sunitha.
03-30-2007 8:50 AM
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