Ansicht
Dokumentation

EXIT_SAPFPBEN_011 -

EXIT_SAPFPBEN_011 -

ABAP Short Reference   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Customer-specific calculation of insurance coverage amount

In the standard SAP system, an employee's insurance coverage amount is calculataed by the subroutine CALC_COVERAGE_AMOUNT. As an alternative to this, there is the function exit EXIT_SAPFPBEN_011 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_COVERAGE_AMOUNT. If, for example, you have created customer-specific infotypes or database tables, you can use their contents to calculate the insurance coverage amount.

The system explicitly defines the input parameters:

  • _PERNR personnel number
  • _BAREA benefit area
  • _BPLAN benefit plan
  • _BCOVR insurance coverage
  • _BENSL benefit salary
  • _ADDNO units for additional insurance coverage
  • _DATUM cutoff date

You then specify the output parameters:

  • _COVER employee's insurance coverage amount

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

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

In the following sample coding, the data needed to calculate the insurance coverage amount should be read from the customer- specific database table ZCOVR. The base amount of the coverage amount and the rate for additional coverage can be stored in table ZCOVR.

The coverage amount should be calculated using ZCOVR in all clients. CALC_COVERAGE_AMOUNT should only be accessed in the standard client 000.

TABLES: ZCOVR.
DATA: BSCOV LIKE Q0168-COVAM, "Basic coverage
ADCOV LIKE Q0168-COVAM. "Additional coverage

CASE SY-MANDT.
WHEN 0.
RAISE STANDARD_CALCULATION.
WHEN OTHERS.
SELECT * FROM ZCOVR WHERE BAREA EQ _BAREA
AND BPLAN EQ _BPLAN
AND BCOVR EQ _BCOVR
AND ENDDA GE _DATUM
AND BEGDA LE _DATUM.
EXIT.
ENDSELECT.
IF SY-SUBRC NE 0.
RAISE CUSTOMER_ERROR.
ENDIF.
BSCOV = ZCOVR-COVAM.
ADCOV = ZCOVR-ADDUN * _ADDNO.
_COVER = BSCOV + ADCOV.
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.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 3134 Date: 20240424 Time: 035524     sap01-206 ( 42 ms )