Ansicht
Dokumentation

EXIT_SAPFPBEN_008 -

EXIT_SAPFPBEN_008 -

PERFORM Short Reference   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

Customer-specific calculation of benefit costs

In the standard SAP system, an employee's benefit costs consist of employee costs, employer costs and provider costs. In the standard SAP system, these costs are calculated by the subroutine CALC_BENEFIT_COST. As an alternative to this, there is the function exit EXIT_SAPFPBEN_008 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_COST. If, for example, you have created customer-specific infotypes or database tables, you can use their contents to calculate the benefit costs.

The system explicitly defines the input parameters:

  • _PERNR personnel number
  • _BAREA benefit area
  • _BPLAN benefit plan
  • _BCOST plan cost formular
  • _DATUM cutoff date
  • _COVER coverage amount (only for insurance plans)
  • _BENGR employee benefit group
  • _BSTAT employee status

You then specify the output parameter:

  • _EECST employee costs
  • _ERCST employer costs
  • _ACCST provider costs
  • _PERIO period for calculating the costs of the plan

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

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

In the following sample coding, the benefit costs are read from a customer-specific database table ZCOST. The employee, employer and provider costs together with the relevent cost period can be stored in the table ZCOST.

The benefit costs should be read directly from table ZCOST in all clients. CALC_BENEFIT_COST should only be accessed in the standard client 000.

TABLES: ZCOST.

CASE SY-MANDT.
WHEN 0.
RAISE STANDARD_CALCULATION.
WHEN OTHERS.
SELECT * FROM ZCOST WHERE BAREA EQ _BAREA
AND BPLAN EQ _BPLAN
AND BCOST EQ _BCOST
AND ENDDA GE _DATUM
AND BEGDA LE _DATUM.
EXIT.
ENDSELECT.
IF SY-SUBRC NE 0.
RAISE CUSTOMER_ERROR.
ENDIF.
_EECST = ZCOST-EECST.
_ERCST = ZCOST-ERCST.
_ACCST = ZCOST-ACCST.
_PERIO = ZCOST-PERIO.
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.






ROGBILLS - Synchronize billing plans   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 3298 Date: 20240420 Time: 095549     sap01-206 ( 63 ms )