Ansicht
Dokumentation

EXIT_SAPFPBEN_015 -

EXIT_SAPFPBEN_015 -

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

Customer-specific check of minimum working time required for an eligibilty rule

In the standard system, the minimum working time that is defined for an benefits eligibility rule is checked by the subroutine SAP_CHECK_ELIG_DATE. As an alternative to this, there is the function exit EXIT_SAPFPBEN_015 contained in the function group XPBE.

The function exit allows you to integrate your own logic into the standard system instead of that suggested by SAP_CHECK_ELIG_SERVICE. If, for example, you have created customer-specific infotypes or modified existing infotypes, you can use their contents to check the minimum working time.

The system defines the input parameters:

  • _PERNR personnel number
  • _BAREA benefit area
  • _BELIG eligibility rule
  • _ELIGR eligibility group
  • _EDATE cutoff date

You then specify the output parameter:

  • _SUBRC return code

In the standard coding, the return code _SUBRC = 0 means that the employee meets the minimum working time requirement. The return code _SUBRC = 1 means that the employee has not fulfilled the criteria.

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

  • STANDARD_CALCULATION execute SAP_CHECK_ELIG_SERVICE
  • CUSTOMER_ERROR error occured during check

In the following sample coding, an employee's minimum working time is indirectly evaluated. The customer has modified infotype 0171 'Gen. Benefits Data' and has added an additional field, FLAG1 (type character, length 1 byte) to this structure.

The customers' requirements are: to use the actual hours worked to check to see whether the employee has ever worked 1000 hours per calendar year during his/her employment. A customer-specific report performs this check. This report periodically evaluates the employee's time data and sets the value in the field P0171-FLAG1 to either TRUE or FALSE.

The function exit EXIT_SAPFPBEN_015 only needs to determine whether the condition '1000 hours per year' is defined for the eligibility rule and whether the field P0171-FLAG1 contains the value TRUE.

TABLES: T5UBV.
INFOTYPES: P0171.
RP-DEF-BOOLEAN. "Defines constants TRUE and FALSE

SELECT * FROM T5UBV WHERE BAREA EQ _BAREA
AND BELIG EQ _BELIG
AND ELIGR EQ _ELIGR
AND ENDDA GE _EDATE
AND BEGDA LE _EDATE
ORDER BY PRIMARY KEY.
EXIT.
ENDSELECT.
IF SY-SUBRC NE 0.
RAISE CUSTOMER_ERROR.
ENDIF.

IF ( T5UBV-SRVNO EQ '1000' ) AND ( T5UBV-SRVPD EQ '013' ).
RP-READ-INFOTYPE _PERNR 0171 P0171 _EDATE _EDATE.
READ TABLE P0171 INDEX 1.
IF SY-SUBRC NE 0.
RAISE CUSTOMER_ERROR.
ELSE.
IF P0171-FLAG1 EQ TRUE.
_SUBRC = 0.
ELSE.
_SUBRC = 1.
ENDIF.
ELSE.
RAISE STANDARD_CALCULATION.
ENDIF.

For information on how to store your own coding and data declarations in a function exit, please refer to the online docuemntation on the transaction Project Management of SAP Enhancements.






BAL Application Log Documentation   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 3780 Date: 20240416 Time: 232413     sap01-206 ( 72 ms )