SAP ABAP IMG Activity HR_ECM_00_AD_E12 (Business Add-In: Replace Activation Routines)
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_E12 Business Add-In: Replace Activation Routines  
Transaction Code S_ALN_01002095   (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_E12   BAdI HRECM00_ACTIVATION 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name HRECM00_ACTIVATION    

Implement this Business Add-In to change the activation process and determine the new records of secondary infotypes.

It consists of the methods described below.

ACTIVATE_PROCESS

During the activation process, the system does not only change the status of the infotype Compensation Process (0759) record in the standard coding, but also creates or updates a record of a secondary infotype. Depending on the plan category, this can be either infotype 0008, 0015, 0267 or 0761. This method enables you to replace the update or creation of the secondary infotype during the activation, for example by an update of a customer-specific infotype. The other part of the activation, that is, the modification of the status of the 0759 record to Active, remains unchanged.

The following import parameters are provided:

  • P0759
    Record of infotype 0759 that is activated. Note that the status change should not be performed by your implementation; this is done in the standard coding.
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the activation of the secondary infotype 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.

The following export parameters must be provided by your coding:

  • IS_OK
    Indicator to be set to SPACE if any error has prevented the method from updating/changing the secondary infotype. The system will then leave the status of the 0759 record unchanged. If the creation/update of the secondary infotype record was successful, the parameter 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_SAL_ADJUSTMENT

During the activation of a salary adjustment, the system has to determine the new infotype 0008 record on the basis of the compensation process data and the old 0008 record. This is also needed for simulation purposes, for example when the system checks if the new salary is within the salary limits defined by the salary group. With this method you can define an alternative algorithm for evaluating the new infotype 0008 record.

The following import parameters are provided:

  • PERNR
    Personnel number.
  • EFFDT
    Effective date of the salary adjustment.
  • PREAS
    Reason for change to be written on the new infotype 0008 record.
  • CPAMT
    Compensation amount of the salary adjustment.
  • CURRE
    Reference currency for the compensation amount.
  • WTCPN
    Component wage type (of infotype 0008) under which the salary adjusment should be recorded.
  • FREQU
    Reference frequency of the compensation amount.
  • IT0008_OLD
    Record of infotype 0008 before salary adjustment.
  • IT0001
    Current record of infotype Organizational Assignment (0001).
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the determination of the new infotype 0008 record encounters 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.

The following export parameters must be provided by your coding:

  • IT0008
    Record of infotype 0008 after salary adjustment.
  • IS_OK
    Indicator to be set to SPACE if any error has prevented the method from evaluating the infotype 0008 record after applying the salary adjustment. If the new infotype 0008 record was successfully obtained, the parameter 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

  • You want to process compensation plans that on activation should not update any of the standard secondary infotypes but a customer-specific infotype. In this case, you must implement method ACTIVATE_PROCESS.
  • You want to apply a rounding rule on updating infotype 0008 records when a salary adjustment is activated. In this case, you must implement both methods ACTIVATE_PROCESS and CALC_SAL_ADJUSTMENT.

Requirements

Standard settings

Recommendation

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

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