Ansicht
Dokumentation

HR_ECM_00_AD_E11 - Business Add-In: Define Additional Check Criteria

HR_ECM_00_AD_E11 - Business Add-In: Define Additional Check Criteria

BAL Application Log Documentation   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Implement this Business Add-In to define additional customer-specific consistency checks. Whenever the manager performs an action in the Manager Self-Service Compensation Scenario, consistency checks are performed on the changed or selected data. The standard routine already inlcudes several checks, for example guideline and budget checks, before you can save the data.

This Business Add-In consists of the method described below, to which you can add customer-specific checks. These checks can be used to reject data records and generate error messages. To allow checks involving more than one person or plan, the method is not called for each record separately, but only once per dialog step receiving the complete set of records in internal tables.

The following import parameters are provided:

  • PROC_PLANNED_TAB
    Table of compensation process data. Each record is described by a personnel number (PERNR) and a compensation plan (CPLAN). The table contains the main planning data, such as the compensation amount, the percentage and the effective date, as entered by the manager before performing the action that triggers the check.
  • BUDGET_LINK_TAB
    This table can be used to retrieve the budget relevant for the person and the compensation plan. The budget is identified by the budget unit (BUDID).
  • BUDGET_ADMIN_TAB
    Table of budget data. For each budget unit (BUDID), the budgeted and spent values are stored. The spent values correspond to the data as entered by the manager before performing the action.
  • GUIDELINE_TAB
    Table of guideline data by person and compensation plan.
  • PLAN_TAB
    Plan data (independent of the person).
  • XAPRV
    Indicator that enables you to determine whether the scenario is an approval (value 'X') or planning (value SPACE) scenario.
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the consistency check 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 parameter must be provided by your coding:

  • IS_OK
    Indicator set to SPACE if any serious error has prevented the check from running successfully. The system will then not allow any further processing of all persons and records. Therefore, the indicator should normally be set to 'X'. If the check detects any inconsistencies in single records, a field of the changing parameter PROC_ADMIN_TAB (see there) instead of IS_OK.

The following change parameter can be modified within your coding:

  • PROC_ADMIN_TAB
    Used to indicate if the check was successful or not at the person and plan levels. The table contains one record for each combination of person (PERNR) and compensation plan (CPLAN) to be processed in the current scenario. If the additional consistency checks fail, this has to be indicated by setting the field XCONS of the relevant records to SPACE. On input, the field is filled according to the results of the standard consistency checks that have been performed prior to the BAdI. Depending on the outcome of the customer-specific check, you can change its value in your implementation. It is strongly recommended that you do not change other fields of this table.

You want to ensure that the effective date for a particular compensation plan is within the months in which the employee's anniversary falls. If the manager enters a date outside this period, the system should generate an error message.

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 ~ 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.

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.






CL_GUI_FRONTEND_SERVICES - Frontend Services   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 5842 Date: 20240523 Time: 203012     sap01-206 ( 108 ms )