Ansicht
Dokumentation

HR_ECM_UI_22 - BAdI: Calculation for Dependent Compensation Plans

HR_ECM_UI_22 - BAdI: Calculation for Dependent Compensation Plans

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

This Business Add-In (BAdI) is used in the Enterprise Compensation Management (PA-EC) component. You can use this BAdI to calculate dependent compensation plans. This BAdI is useful if you want to calculate compensation data for one or more compensation plans once the user has made his or her entries.

The BAdI uses interface IF_EX_HRECM00_DEPENDENT_PLANS.

This interface contains the method CALCULATE_DEPENDENT_PLANS. When the BAdI is implemented, this method is called by the user interface for Compensation Planning. This method is executed by the system individually for each employee for whom the user makes an entry.

The method has the following input parameters:

IT_COMPDATA_CHANGED

This table contains an entry for every compensation plan whose values were changed by the user. This entry contains the personnel number of the employee, the compensation plan that was changed, and information about which values were changed.

The method has the following return parameters:

  • ET_EMPLOYEE_RELATED_MESSAGES
With this parameter, the BAdI can transfer a message for each of the employee's compensation plans. These messages are not displayed in the upper portion of the user interface. Instead, they are shown in a dialog box that can be displayed via the Check column.
You use these messages to deliver the user a confirmation for each employee and compensation plan that was changed by the BAdI. This confirmation is available by request; it is not directly visible.
  • ES_GENERIC_MESSAGE_PER_EE
With this parameter, the BAdI can transfer a message for each employee that is immediately visible on the user interface for Compensation Planning in the upper portion of the user interface.
You use these messages to deliver the user an immediately visible confirmation for each employee for which the BAdI was executed.
  • ES_GENERIC_MESSAGE_REPORT_ONCE
With this parameter, the BAdI can transfer a one-time message (instead of one for every employee) that is immediately visible on the user interface for Compensation Planning in the upper portion of the user interface.
For example, you can use this message to give the user a directly visible confirmation that the BAdI has been executed.

The method has the following change parameters:

  • CT_EMPLOYEE_COMPENSATION_DATA
This table contains an entry for each compensation plan for the employee that is currently being processed.
The BAdI can change the values in this table in whatever way necessary and select the changed entries via the IS_MODIFIED component.
For all entries selected in this way, the system transfers the changed values as if they are entries from the user. This means that these changed values may be rounded as necessary to keep the data consistent.
This also means that the BAdI must change, for example, only one amount and the corresponding percentage is calculated by the system.

You must first activate the BAdI for the required compensation review so that the BAdI can be executed for the user interface for Compensation Planning. You make this setting in the Customizing activity Define General Settings for Compensation Planning.

The BAdI is not filter-dependent.

For more information about the default settings, see the Enhancement Spot Element Definitions tab page in the BAdI Builder (transaction SE18).

You can create a customer-specific implementation for this BAdI to, for example, make calculations for compensation plans for pay raises and bonuses.

In the BAdI, use input parameter IT_COMPDATA_CHANGED to check if the compensation plan was changed for the pay raise. If so, make the calculations.

You can use the change parameter CT_EMPLOYEE_COMPENSATION_DATA to generate the current values for the pay raise.

Limit the pay raise to the value required, such as the upper limit of the salary range, and enter the difference into the compensation plan for bonuses. If you have not made these changes there directly, save the changed values in table CT_EMPLOYEE_COMPENSATION_DATA. Mark the data for both compensation plans as changed by setting the IS_MODIFIED component to the value X.

Generate messages for the user, if necessary.

For information about the implementation of BAdIs in the context of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.






Fill RESBD Structure from EBP Component Structure   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 5853 Date: 20240523 Time: 190745     sap01-206 ( 146 ms )