Ansicht
Dokumentation

EXIT_SAPFPBEN_013 -

EXIT_SAPFPBEN_013 -

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Customer-specific calculation of termination dates

In the standard SAP system, the termination date for an employee's benefits is calculated by the subroutine CALC_TERM_DATE. As an alternative to this, there is the function exit EXIT_SAPFPBEN_013 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_ELIG_TERM. If, for example, you have created customer-specific infotypes or database tables, you can use their contents to calculate the termination date.

The system explicitly defines the input parameters:

  • _PERNR personnel number
  • _BAREA benefit area
  • _BTERM termination rule
  • _TRMGR termination type
  • _TDATE cutoff date

You then specify the output parameter:

  • _TRMDT termination date

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 end of the month containing the cutoff date _TDATE should always be calculated as the termination date in all clients. CALC_TERM_DATE should only be accessed in the standard clients 000.

DATA: CDATE TYPE D.
CASE SY-MANDT.
WHEN 0.
RAISE STANDARD_CALCULATION.
WHEN OTHERS.
IF _EDATE IS INITIAL.
RAISE CUSTOMER_ERROR.
ENDIF.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
DATE = _EDATE
DAYS = 0
MONTHS = 1
YEARS = 0
SIGNUM = '+'
IMPORTING
CALC_DATE = CDATE.
CDATE+06(02) = '01'.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
DATE = CDATE
DAYS = 1
MONTHS = 0
YEARS = 0
SIGNUM = '-'
IMPORTING
CALC_DATE = CDATE.
_TRMDT = CDATE.
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.






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

Length: 2909 Date: 20240328 Time: 230454     sap01-206 ( 41 ms )