Ansicht
Dokumentation

OHAZA_ESS05 - User Exit: Converting Amounts for Salary Packaging and Rounding Types

OHAZA_ESS05 - User Exit: Converting Amounts for Salary Packaging and Rounding Types

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

Use this exit if the entered wage types (in infotypes) are for a different payroll periodicity than the periodicy specified in the SAP standard.

In addition, you also use this customer exit to set various rounding settings. You can round a component to the nearest cent, to the nearest ten cents, or the nearest Rand. The current default setting is to the nearest Rand.

Salary Packaging assumes that the wage types entered in the infotypes Recurring Payments and Deductions (0014) and External Insurance SA (0151) have the same periodicity that is advised in the payroll area on infotype Organizational Assignment (0001) (monthly amounts for a monthly payroll area).

For infotype Basic Pay (0008), Salary packaging assumes the periodicity as indicated in the table Pay Scale > Period Parameter Assignment (T510W) for the given pay scale type, pay scale area, and employee subgroup grouping. Note: Annual figures cannot be advised there.

It is therefore recommended to advise the figures according to the SAP standard periodicy. However, if you choose to use different periodicities, you must advise the appropriate periodicy in this user exit (in order for Salary Packaging to be able to correctly calculate figures).

If you want to use annual figures in infotype Basic Pay (0008), you must state (with this user exit) that all salary components on infotype 0008 are annual. In this case, the coding would appear as follows:

case info_record-infty.

when '0008'.

frequency = '06'. "annual periodicity

....

endcase.

Note: The value range for the frequency is set up in the Data Dictionary, in the domain PFREQ. To access this information, perform the following steps:

  1. In the SAP Easy Access menu, enter the transaction code SE11.
  2. In the domain field, enter PFREQand choose Display.
  3. The following frequencies are delivered as standard (in the Value range tab strip)

,, 01,,Monthly
,, 02,,Semi-monthly
,, 03,,Weekly
,, 04,,Bi-weekly
,, 05,,Every four weeks
,, 06,,Annually
,, 07,,Quarterly
,, 08,,Semi-annually

To use this user exit, proceed as follows:

WARNING

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 this step, you can implement the user exit PB160003 to define eligibility rules in accordance with your own requirements.

If you need to implement this user exit, you first create a project for the user exit, then assign the user exit to your project. Then you write the coding for the user exit, and finally activate the project.

For general information about user exits, refer to the Enhancements section in the Basis component documentation in the SAP library. In addition, there is detailed information about each user exit that you can access when you assign it to your project.

Start by creating your project:

  1. Enter the transaction code CMOD.
  2. Enter a name for your project (for example, Z_SPA_EXIT).
  3. Choose Modification -> Create.
  4. Enter a short text for your project and choose Save.

Next, you assign the user exit to your project:

  1. Choose Enhancement Assignment and enter the enhancement PB160003.
  2. Choose Save

Next, you make your coding modifications:

  1. Choose Components.
  2. Select the function exit EXIT_SAPLHRSPAZA_001.
  3. Change the include ZXHRSPAZAU03 according to your needs.

The system will then prompt you to create this include, and you can continue to write your coding in it.

Now you must activate your project. To do so,

  1. Return to the initial screen.
  2. Choose Activate project.

Additional Rounding Capability with this User Exit

In addition, to the activities described above, you also use this customer exit to set various rounding settings.

Enter the following syntax in order to set the different rounding options:

  • rounding = 'C' to not round, that is, to display cents (for example R50,89 remains R50,89)

  • rounding = 'T' toround to the nearest ten cents (for example R50,89 rounds to R50,90)

  • If no entry is made, the component will automatically round to the nearest Rand (R50,89 rounds to R51,00), as this is the current default setting.

Example

In addition to the example explained above in the previous section, you would also like to round all components to the nearest ten cent The syntax is then as follows:

case info_record-infty.

when '0008'.

frequency = '06'. "annual periodicity

....

endcase.

rounding = 'T'.

A further example is as follows, if you do not want to round cents for components in infotype Basic Pay (0008), that is, you would like the components to display cent values. For this example, the syntax is as follows:

case info_record-infty.

when '0008'.

frequency = '06'. "annual periodicity

rounding = 'C'.

....

endcase.






TXBHW - Original Tax Base Amount in Local Currency   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 7549 Date: 20240523 Time: 155943     sap01-206 ( 92 ms )