We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
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:
You then specify the output parameter:
In addition to this, you can define two exceptions to the standard coding:
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.
USING _PERNR '9008' SPACE SPACE SPACE
_DATUM _DATUM '0' 'NOP' P9008.
IF SY-SUBRC NE 0.
_BENSL = P9008-ANSAL.
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.