Ansicht
Dokumentation

HR_ECM_00_AD_E14 - Business Add-In: Methods for Matrix Dimensions

HR_ECM_00_AD_E14 - Business Add-In: Methods for Matrix Dimensions

General Data in Customer Master   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

Implement this Business Add-In to define routines that enable you to determine the value of a matrix dimension for all customer-defined dimension methods that you have created in the previous IMG step. Since SAP delivers predefined implementations for the SAP methods, you need to define an implementation of this BAdI for each method you have created.

The Business Add-In consists of five methods, but only method CALCULATE_SEGMENT_VALUE, in which the dimension value is calculated, is relevant. You must implement this method for each customer-specific dimension method. The other methods allow you to maintain two fields in view "Define Matrix Dimensions" more swiftly. Implementing them might help you ensure consistent customizing data, but is not required.

This method is needed to provide the algorithm that enables you to retrieve the matrix dimension value for a given person. You must implement this method for each customer-defined dimension method.

The following import parameters are provided:

  • FLT_VAL
    Dimension method for which the dimension value should be obtained, used as a BAdI filter value.
  • DIMENSION_PARAMETER
    Generic dimension parameter (for example, an appraisal template) to be assigned to the dimension in view Compensation Matrix Dimension (next IMG step). The parameter can be empty if no parameter is needed for the evaluation of the dimension value.
  • DIMENSION_UNIT
    Generic dimension unit (for example, years) to be used as the reference unit of the result. You must assign it to the dimension in view Compensation Matrix Dimension (next IMG step). The parameter can be empty if the unit applies to the dimension value.
  • PERNR
    Personnel number.
  • KEY_DATE
    Key date on which the dimension value should be obtained.
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the evaluation of the dimension value 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:

  • VALUE
    Resulting matrix dimension value.
  • IS_OK
    Indicator to be set to SPACE if any error has prevented the method from retrieving a result for the dimension value. Otherwise it should be set to 'X'.

This method can be implemented if you want to perform a check on the field "Method Parameter" of view "Define Matrix Dimensions", which depends on the assigned method. By doing so, you make sure that method CALCULATE_SEGMENT_VALUE is always called with parameter DIMENSION_PARAMETER and that a consistent value for the dimension method is obtained. The implementation of this method is optional. If not implemented, any value can be entered in the field "Method Parameter".

The following import parameters are provided:

  • FLT_VAL
    Dimension method for which the method parameter should be checked, used as a BAdI filter value.
  • DIMENSION_PARAMETER
    Generic dimension parameter, for which the implementation should check if it is consistent with regard to the filter value.
  • DIMENSION_UNIT
    Generic dimension unit (optional); can be used for checking purposes.
  • DIMENSION_BEGDA
    Begin of validity of the view entry to define the dimension.
  • DIMENSION_ENDDA
    End of validity of the view entry to define the dimension.
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the check is not successful and the proposed DIMENSION_PARAMETER should be rejected, you can add a corresponding error message 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 set to SPACE in case the check was not successful and the dimension parameter should be rejected. Otherwise it should be set to 'X'.

This method can be implemented to program an F4-help for the field "Method Parameter" of view "Define Matrix Dimensions" and make maintenance easier. The implementation of the method is optional. If not implemented, no F4 help is available.

The following import parameters are provided:

  • FLT_VAL
    Dimension method for which the method parameter should be obtained, used as a BAdI filter value.
  • DIMENSION_UNIT
    Generic dimension unit (optional); can be used for programming the F4 help.
  • DIMENSION_BEGDA
    Begin of validity of the view entry to define the dimension.
  • DIMENSION_ENDDA
    End of validity of the view entry to define the dimension.
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the evaluation of the F4 help is not successful, you can add a corresponding error message 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:

  • DIMENSION_PARAMETER
    Result selected by the user in the F4 help.
  • IS_OK
    Indicator set to SPACE in case the F4 help was not successful and no dimension parameter could be determined. Otherwise it should be set to 'X'.

This method can be implemented if you want to check the field "Unit of Method Result" of view "Define Matrix Dimensions", which depends on the assigned method. By doing so, method CALCULATE_SEGMENT_VALUE is always called with parameter DIMENSION_UNIT with a consistent value for the dimension method. The implementation of this method is optional. If not implemented, any value can be entered in the field "Unit of method result".

The following import parameters are provided:

  • FLT_VAL
    Dimension method for which the method unit should be checked, used as a BAdI filter value.
  • DIMENSION_UNIT
    Generic dimension unit for which the implementation should check if it is consistent with regard to the filter value.
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the check is not successful and the proposed DIMENSION_UNIT should be rejected, you can add a corresponding error message 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 set to SPACE in case the check was not successful and the dimension unit should be rejected. Otherwise it should be set to 'X'.

This method can be implemented to program an F4-help for the field "Unit of method result" of view "Define Matrix Dimensions" and make maintenance easier. The implementation of the method is optional. If not implemented, no F4 help is available.

The following import parameters are provided:

  • FLT_VAL
    Dimension method for which the method unit should be obtained, used as a BAdI filter value.
  • MESSAGE_HANDLER
    Reference to interface IF_HRPA_MESSAGE_HANDLER. If the evaluation of the F4 help is not successful, you can add a corresponding error message 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:

  • DIMENSION_UNIT
    Result selected by the user in the F4 help.
  • IS_OK
    Indicator set to SPACE in case the F4 help was not successful and no dimension unit could be determined. Otherwise it should be set to 'X'.

If you have stored the employee's appraisal result on a customer-specific infotype, and you want to use it as a criterion for the evaluation of a guideline matrix, you have to define a dimension method and implement CALCULATE_SEGMENT_VALUE, in which you read the customer infotype.

It is not recommended that you modify the implementation of an SAP method. To do so, copy the SAP method and the BAdI implementation to a customer method and change the copied implementation.

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   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 10922 Date: 20240523 Time: 220339     sap01-206 ( 188 ms )