SAP ABAP IMG Activity HR_ECM_00_AD_E13 (Business Add-In: Calculate Employee Salary Data)
Hierarchy
EA-HRGXX (Software Component) Sub component EA-HRGXX of EA-HR
   PA-EC-AD (Application Component) Compensation Administration
     PAOC_ECM_ADM_BL (Package) Compensation Administration - Business Logic
IMG Activity
ID HR_ECM_00_AD_E13 Business Add-In: Calculate Employee Salary Data  
Transaction Code S_ALN_01002096   (empty) 
Created on 20030331    
Customizing Attributes HR_ECM_00_AD_3_2_E   Compensation Administration - Not required - Not critical - User Exits 
Customizing Activity HR_ECM_00_AD_E13   BAdI HRECM00_SALARY 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name HRECM00_SALARY    

Implement this Business Add-In to make changes concerning the evaluation of an employee's base salary and salary-related quantities.

The Business Add-In consists of the three methods described below.

CALCULATE_SALARY

Use this method to replace the standard routine for evaluating an employee's base salary, that is, the salary not including bonus payments.

The following import parameters are provided:

  • PERNR
    Personnel number.
  • KEY_DATE
    Key date as of which the salary should be determined.
  • CURRENCY
    Reference currency of the base salary.
  • TIME_UNIT
    Reference time unit of the base salary.
  • IT0008
    Record of infotype 0008 valid on the key date (KEY_DATE). This parameter is optional . The record is provided by the calling routine if available because it has been read for another purpose. In this case, it is not necessary to read it again within your implementation for performance reasons. If you need the data of the infotype 0008 record in your coding, you only have to read infotype 0008 from the database if this parameter is not filled.
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the determination of the salary triggers any messages that should be sent to the frontend, you can add them to the message list using method ADD_MESSAGE of this interface or function module HR_ECM_ADD_MESSAGE. Reference to interface IF_HRPA_MESSAGE_HANDLER.

The following export parameters must be provided by your coding:

  • SALARY
    Employee's base salary.
  • IS_OK
    Indicator to be set to SPACE if any error has prevented the method from retrieving a result for an employee's base salary. Otherwise it should be set to 'X'.
  • PROCESS_STANDARD
    Indicator to be set to 'X' if you want the system to ignore the result of your implementation and perform the standard routine.

CALC_COMPA_RATIO

This method can be used to replace the standard routine for evaluating the compa-ratio. In the standard, the compa-ratio is evaluated as the ratio of the employee's salary and the reference salary of the range. Here you can replace this algorithm by a customer-specific code.

The following import parameters are provided:

  • PERNR
    Personnel number.
  • KEY_DATE
    Key date as of which the compa-ratio should be determined.
  • IT0001
    Record of infotype 0001 valid on the key date (KEY_DATE). This parameter is optional. The record is provided by the calling routine if available there because it has been read for another purpose. In this case, it is not necessary to read it again within your implementation for performance reasons. If you need the data of the infotype 0001 record in your coding, you only have to read infotype 0001 from the database if this parameter is not filled.
  • IT0008
    See method CALCULATE_SALARY.
  • MESSAGE_HANDLER
    See method CALCULATE_SALARY.

The following export parameters must be provided by your coding:

  • COMPA_RATIO
    Employee's compa-ratio.
  • IS_OK
    Indicator set to SPACE in case any error has been encountered which prevented the method to retrieve a result for the compa-ratio. Otherwise it should be set to 'X'.
  • PROCESS_STANDARD
    Indicator set to 'X' if you want the system to ignore the result of your implementation and perform the standard routine.

CALC_PERCENT_IN_RANGE

This method can be used to replace the standard routine for evaulating the percent-in-range. In the standard, the percent-in-range is evaluated according to the formula (actual salary - min)/(max - min) * 100, where min and max are the minimum and maximum salary as defined for the employee's salary range. Here you can replace this algorithm by customer-specific code.

The following import parameters are provided:

  • PERNR
    Personnel number.
  • KEY_DATE
    Key date on which the percent-in-range should be determined.
  • IT0001
    See method CALC_COMPA_RATIO.
  • IT0008
    See method CALCULATE_SALARY.
  • MESSAGE_HANDLER
    See method CALCULATE_SALARY.

The following export parameters must be provided by your coding:

  • PERCENT_IN_RANGE
    Employee's percent-in-range.
  • IS_OK
    Indicator to be set to SPACE if any error has prevented the method from obtaining a result for the percent-in-range. Otherwise it should be set to 'X'.
  • PROCESS_STANDARD
    Indicator to be set to 'X' if you want the system to ignore the result of your implementation and perform the standard routine.

Example

  • The employee's salary should be evaluated based on the data stored on a customer-specific infotype.
  • The compa-ratio or percent-in-range should be calculated using reference or minimum, maximum salary values stored in a customer-specific table.

Requirements

Standard settings

Recommendation

Activation and deactivation of the Business Add-In can only be done for all three methods. If for any of these methods you still want to perform the standard coding, add the line PROCESS_STANDARD = 'X'.

Activities

After calling up the IMG activity, a dialog box appears, in which you can enter a name for the implementation.

If you have already made other implementations for this BAdI, another dialog box appears, in which the existing implementations are displayed. In this case, choose Create, and proceed as follows:

1. In the dialog box, enter a name for the BAdI implementation in the Implementation field, and choose Create.

The screen for creating BAdI implementations is now displayed.

2. Enter a short text for the implementation in the Short text for implementation field.

3. From the tab index, choose Interface.

The Name of implemented class field is already filled on the tab page, as a class name was automatically assigned to the implementation when you named it.

4. Save your entries, and assign the implementation to a development class.

5. Place the cursor on the method, and double-click to enter method processing.

6. Enter the coding for the implementation between the statements method <Interface name> ~ <Name of method> and endmethod.

7. Save and implement your coding. Return to the Edit Implementation screen.

8. Save the entries on the Edit Implementation screen.

Note: You can also create an implementation, and then activate it at a later time. In such a case, end the processing stage at this point.

9. Choose Activate.

The coding you stored in the methods will be run when the application program is executed.

Further notes

For more information on using Business Add-Ins, refer to the SAP Library under Basis Components ->ABAP Workbench (BC-DWB) ->Changing the SAP Standard (BC)->Business Add-Ins.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 3   Nonrequired activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20031028 
SAP Release Created in 200