Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

EXIT_SAPFPBEN_010 -

EXIT_SAPFPBEN_010 -

Vendor Master (General Section)   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Customer-specific calculation of the benefit salary

In the standard SAP system, an employee's benefit salary is calculated by the subroutine CALC_BENEFIT_SALARY. As an alternative to this, there is the function exit EXIT_SAPFPBEN_010 contained in the function group XPBE. This function exit is described below.

The function exit allows you to integrate your own logic into the standard SAP system instead of that suggested by CALC_BENEFIT_SALARY. If, for example, you have created customer-specific infotypes or database tables, you can use their contents to calculate the benefit salary.

The system explicitly defines the input parameters:

  • _PERNR personnel number
  • _LGART wage type
  • _CURRE currency key
  • _DATUM cutoff date

You then specify the output parameter:

  • _BENSL benefit salary

In addition to this, you can define two exceptions to the standard coding:

  • STANDARD_CALCULATION if CALC_BENEFIT_SALARY is to be executed
  • CUSTOMER_ERROR if an error message is to be registered

In the following sample coding, the benefit salary should be read from customer infotypes 9008. Infotype 9008 can be a modified copy of infotype 0008 (Basic Pay).

The benefit salary should be read directly from infotype 90008 in all clients, CALC_BENEFIT_SALARY should only be accessed in the standard client.

INFOTYPES: P9008.

CASE SY-MANDT.
WHEN 0.
RAISE STANDARD_CALCULATION.
WHEN OTHERS.
RP_READ_INFOTYPE(SAPFP50P)
USING _PERNR '9008' SPACE SPACE SPACE
_DATUM _DATUM '0' 'NOP' P9008.
IF SY-SUBRC NE 0.
RAISE CUSTOMER_ERROR.
ENDIF.
_BENSL = P9008-ANSAL.
ENDCASE.

For information on how to store your own coding and data declarations in a function exit, please refer to the online documentation on the transaction Project Management of SAP Enhancements.






ABAP Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 2435 Date: 20211201 Time: 072410     sap01-206 ( 35 ms )