Ansicht
Dokumentation

PAY_IN_EPF_957 - BAdI: PF and EDLI computation

PAY_IN_EPF_957 - BAdI: PF and EDLI computation

General Material Data   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

Add-In: HR IN: PF and EDLI computation

This Business Add-In is used in the Provident Fund (PY-IN) component.

This Add-In enables you perform the following:

  • Control the projected value for annual Provident Fund (PF)
  • Modify the Employee Deposit Linked Insurance (EDLI) basis
  • Control the projected value of employer annual provident fund and pension fund
  • The BAdI has the following methods to achieve the same:
  • IF_EX_HR_IN_EPF_CONT~PF_COMP
You can use this method in case you want to switch to nominal projection of PF instead of current PF projection.
Note
You should implement the PF nominal projection only if you have activated the nominal projection (for other components - Exemptions, regular salary etc) in your system to align with the entire solution.
The method has the following input parameters:
  • Personnel Number

  • Start Date and End Date

  • Payment date

  • Provident Fund Table

  • Input Table

  • Work Center/Basic Pay Table

  • /3F5 YTD Amount

  • /3F6 computed value

  • Country Grouping

The method has the following output parameters:
  • /3F5 projected Amount

To implement the PF nominal projection, perform the following steps:
  1. Create a new wage type for PF nominal basis, which will be nominal equivalent to EPF Basis (/111) wage type. For example new wage type - 9999,,
  2. Generate the PF nominal basis wage type by modifying the Create Nominal Basis Wage types (INWT) rule in the same way as for wage types Nominal basis for Housing (/12H) and Monthly Regular Salary (/12N)
  3. Modify the Store the Last Split basis Nominal Wage types in RT (IN2N) rule to get the latest split of the period
  4. Use the wage type to get the nominal PF contribution for the projection of annual PF
Sample Code
data : wa_it type pc207,
wa_epf type PC2_IN07,
wa_t511p type t511p.
data : act_pf_bas_per type pc207-betrg,
vpf_contri type pc207-betrg,
pfbas_40epf type pc207-betrg,
min_elig_pf_bas_cns type pc207-betrg,
fin_eepf_bas_per type pc207-betrg,
fin_eepf_ctr_per type pc207-betrg,
pfbas type pc207-betrg,
count type I.
LOOP AT input_table into wa_it WHERE LGART = '9999'. " with the assumption that 9999 is
act_pf_bas_per = wa_it-betrg. " PF nominal basis Wage type
ENDLOOP.
act_pf_bas_per = 10000. " for testing as wage type 9999 is missing
LOOP AT input_table into wa_it WHERE LGART = '/3F2'. " with the assumption that 9999 is
vpf_contri = wa_it-betrg. " PF nominal basis Wage type
ENDLOOP.
DESCRIBE TABLE epf LINES count.
LOOP AT EPF into wa_epf where apznr = count.
CLEAR pfbas_40epf.
pfbas_40epf = wa_epf-pfcon.
SELECT SINGLE * FROM t511p into wa_t511p
WHERE molga = '40'
AND konst = 'PFBAS'
AND begda <= wa_epf-endda
AND endda >= wa_epf-endda.
IF pfbas_40epf IS INITIAL.
MIN_ELIG_PF_BAS_CNS = wa_t511p-BETRG.
PFBAS_40EPF = wa_t511p-BETRG.
ELSE.
MIN_ELIG_PF_BAS_CNS = PFBAS_40EPF.
ENDIF.
IF wa_EPF-EEBAS = '1'.
* Getting PF Basis
* PERFORM fmin USING min_elig_pf_bas_cns act_pf_bas_per
* CHANGING fin_eepf_bas_per.
IF min_elig_pf_bas_cns GT act_pf_bas_per.
fin_eepf_bas_per = act_pf_bas_per.
ELSE.
fin_eepf_bas_per = min_elig_pf_bas_cns.
ENDIF.
ELSE.
* Getting PF Basis
fin_eepf_bas_per = act_pf_bas_per.
ENDIF.
* to compute the PF contribution for the Nominal PF basis
fin_eepf_ctr_per = fin_eepf_bas_per * wa_epf-eectr / 100.
* TO compute the latest value of /3F5
latest_3f5 = fin_eepf_ctr_per + vpf_contri.
ENDLOOP.
endmethod.

  • IF_EX_HR_IN_EPF_CONT~EDLI_COMP
You can use this method to modify the EDLI basis. The Eligible Pay maintained by the PF authority is currently INR 6500. In case there is loss of pay for the employee or if the employee joins your organization in the middle of the month, the system prorates the Eligible Pay to form the Employer Pension Basis. To avoid this proration, User Exit EXIT_HINCALC0_002 is available in Enhancement HRINCEPF.
As proration of eligible pay for Pension basis can be override by User Exit EXIT_HINCALC0_002, EDLI basis should align with the Pension basis effective from 08/2001 as per PF authority. Hence if you have implemented user exit EXIT_HINCALC0_002 for proration of eligible pay for Pension basis, you can use this BAdI for the proration of EDLI eligible pay as well to align with the PF authority notification 08/2001.
Note
This method is to modify the basis, not the EDLI contribution, not the EDLI contribution. EDLI contribution will happen as per the standard behavior of the system with the percentage maintained in Statutory Rates for Provident Fund (V_T7INF3) table.
The method has the following input parameters:
  • Personnel Number

  • Start Date and End Date

  • Payment date

  • Provident Fund Table

  • Input Table

  • Work Center/Basic Pay Table

  • Country Grouping

The method has the following output parameters:
  • EDLI table

Sample Code
DATA : num_mon_per type F,
num_mon_per_chk type F,
pf_bas_fac_per type F,
pf_elig_fac_per type F.
data : wa_it type pc207,
wa_edli type pc207,
wa_epf type pc2_in07,
wa_t511p type t511p.
data : wa_wpbp LIKE LINE OF wpbp.
data : act_pf_bas_per type pc207-betrg,
vpf_contri type pc207-betrg,
pfbas_40epf type pc207-betrg,
min_elig_pf_bas_cns type pc207-betrg,
fin_eepf_bas_per type pc207-betrg,
fin_eepf_ctr_per type pc207-betrg,
pfbas type pc207-betrg,
elig_pf_bas_per_chk type pc207-betrg,
pfbas_const type pc207-betrg,
FIN_EDLI_BAS_PER type pc207-betrg,
total_pf_basis type pc207-betrg,
flag_pf(1).
clear wa_it.
LOOP AT input_table into wa_it WHERE lgart = '/111'.
total_pf_basis = total_pf_basis + wa_it-betrg.
ENDLOOP.
* READ TABLE edli_tab into wa_edli." with key apznr = wa_epf-apznr.
LOOP AT epf into wa_epf."where apznr = wa_edli-apznr.
CALL FUNCTION 'HR_IN_CALC_MONTHS'
EXPORTING
split_begda = wa_epf-begda
split_endda = wa_epf-endda
IMPORTING
split_months_factor = num_mon_per.
* getting the factor for Eligible PF basis
pf_elig_fac_per = num_mon_per.
* get the basis proration through wage type /111
READ TABLE edli_tab into wa_edli with key apznr = wa_epf-apznr.
IF sy-subrc EQ 0.
READ TABLE wpbp into wa_wpbp WITH KEY apznr = wa_epf-apznr.
* getting the factor for Actual PF basis
pf_bas_fac_per = ( wa_epf-endda - wa_epf-begda + 1 ) /
( wa_wpbp-endda - wa_wpbp-begda + 1 ).
clear wa_it.
LOOP AT input_table into wa_it WHERE lgart = '/111'
and apznr = wa_epf-apznr.
act_pf_bas_per = wa_it-betrg * pf_bas_fac_per.
ENDLOOP.
* Read the eligible pay from T7INF3 or T511P
CLEAR pfbas_40epf.
pfbas_40epf = wa_epf-pfcon.
SELECT SINGLE * FROM t511p into wa_t511p
WHERE molga = '40'
AND konst = 'PFBAS'
AND begda <= wa_epf-endda
AND endda >= wa_epf-endda.
IF pfbas_40epf IS INITIAL.
min_elig_pf_bas_cns = wa_t511p-betrg.
* pfbas_40epf = wa_t511p-BETRG.
elig_pf_bas_per_chk = wa_t511p-betrg * pf_elig_fac_per.
pfbas_const = pfbas_const + elig_pf_bas_per_chk.
ELSE.
min_elig_pf_bas_cns = pfbas_40epf.
elig_pf_bas_per_chk = pfbas_40epf * pf_elig_fac_per.
pfbas_const = pfbas_const + elig_pf_bas_per_chk.
ENDIF.
IF total_pf_basis GT pfbas_const.
flag_pf = 'X'.
ELSE.
flag_pf = ''.
ENDIF.
IF wa_epf-payed = '1'.
* EDLI basis based on flags epf-PNBAS and flag_pf
IF wa_epf-pnbas = '1'.
IF flag_pf = 'X'.
fin_edli_bas_per = min_elig_pf_bas_cns.
ELSE.
fin_edli_bas_per = act_pf_bas_per.
ENDIF.
ELSE.
fin_edli_bas_per = act_pf_bas_per.
ENDIF.
ENDIF.
wa_edli-betrg = fin_edli_bas_per.
modify edli_tab index 1 from wa_edli.
ENDIF.
ENDLOOP.
endmethod.
  • Employer PF and Pension Computation - ER_PF_PNS

This method has the following parameters:

Importing Parameters:

  • EMPNO,,,,-,,Personnel Number

  • BEGDA,,,,-,,Start Date

  • ENDDA,,,,-,,End Date

  • PAYDATE,,,,-,,Date

  • EPF,,,,,,-,,HR PAY IN: Table type for EPF

  • INPUT_TABLE,,-,,Results Table

  • WPBP,,,,-,,Work Center/Basic Pay

  • YTD_3F3,,,,-,,HR Payroll: Amount

  • FLT_VAL,,,,-,,Country Grouping

  • YTD_3F4,,,,

Exporting Parameters

  • LATEST_3F3

  • LATEST_3F4,,-,,HR Payroll: Amount

You should only carry out this step if both of the following points apply:

  • The SAP standard processes do not suit your needs
  • You are a competent ABAP/4 programmer

In the standard system, the Business Add-In is not activated.

After calling up the IMG activity, a dialog box appears, in which the existing implementations are displayed. Choose Change, and proceed as follows:

  1. From the tab index, choose Interface.
  2. Place the cursor on the method, and double-click to enter method processing.
  3. Enter the coding for the implementation between the statements methodif_ex_hr_in_cco_processing ~ and endmethod.
  4. Save and implement your coding. Return to the Edit Implementation screen.
  5. Save the entries on the Edit Implementation screen.
Note: You can also change the implementation, and then activate it at a later time. In such a case, end the processing stage at this point.
  1. Choose Activate
The coding you stored in the method will be run when the application program is executed.

To display the sample code, choose Goto -> Sample Code -> Display.






General Material Data   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 17234 Date: 20240523 Time: 215134     sap01-206 ( 192 ms )