Wir wachsen stetig und suchen neue Kollegen (m/w/d)! Schauen Sie sich unsere offenen Position an, um eine passende Herausforderung zu finden!
In the standard SAP system, an employee's credit amount is calculated by the subroutine CALC_BENEFIT_CREDIT. As an alternative to this, there is the function exit EXIT_SAPFPBEN_009 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_CREDIT. If, for example, you have created customer-specific infotypes and database tables, you can use their contents to calculate the credit amount.
The system explicitly defines the input parameters:
You then specify the output parameters:
In addition to this, you can define two exceptions to the standard coding:
In the following sample coding, the credit amount should be read from a customer-specific database table ZCRDT. The credit amount and the relevant credit period can be stored in the table ZCRDT.
The credit amount should be read directly from ZCRDT in all clients. Only in the standard client 000 should CALC_BENEFIT_CREDIT be accessed.
SELECT * FROM ZCRDT WHERE BAREA EQ _BAREA
AND BPLAN EQ _BPLAN
AND BFLEX EQ _BFLEX
AND ENDDA GE _DATUM
AND BEGDA LE _DATUM.
IF SY-SUBRC NE 0.
_CRAMT = ZCRDT-CRAMT.
_PERIO = ZCRDT-PERIO.
For information on how to store your own coding and data declarations in a function exit, please refer to the online documetation on the transaction Project Management of SAP Enhancements.