Ansicht
Dokumentation

EXIT_SAPLHRBEN00GENERAL_015 -

EXIT_SAPLHRBEN00GENERAL_015 -

CL_GUI_FRONTEND_SERVICES - Frontend Services   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

Customer-specific check of minimum working hours required for an eligibility rule

In the SAP R/3 System, an employee's minimum working hours required for an eligibility rule is checked by the subroutine SAP_CHECK_ELIG_SERVICE. Alternatively, you can use the function exit EXIT_SAPLHRBEN00GENERAL_015 from the function group XPBE that is described here.

You can use the function exit instead of SAP_CHECK_ELIG_SERVICE to integrate your own logic into the SAP R/3 Sysytem. For example, if you have created your own customer-specific infotypes or modified existing ones, you can use their contents to check the minimum working hours.

You must use the following input parameters:

  • _PERNR Personnel number
  • _BAREA Benefit area
  • _BELIG Eligibility rule
  • _ELIGR Eligibility group
  • _EDATE Cutoff day

You can specify the following output parameters:

  • _HOURS_OK Indicates whether the required number of working hours has been achieved.

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

  • STANDARD_CALCULATION execute SAP_CHECK_ELIG_SERVICE
  • CUSTOMER_ERROR error occurred during check

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

The customer is asking the system 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 is used to perform this check. This report periodically evaluates the employee's time data and sets the field P0171-FLAG1 to TRUE or FALSE depending on the results of the check.

For function exit EXIT_SAPLHRBEN00GENERAL_015, you still have to determine whether the condition '1000 hours per year' exists for the eligibility rule and whether P0171-FLAG1 also contains the value TRUE.

TABLES: T5UBV.
INFOTYPES: P0171.
INCLUDE FBEN0D05. "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.
_HOURS_OK = TRUE.
ELSE.
_HOURS_OK = FALSE.
ENDIF.
ELSE.
RAISE STANDARD_CALCULATION.
ENDIF.

For additional information on how to store your own coding and data declarations in a function exit, 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: 3711 Date: 20240601 Time: 121935     sap01-206 ( 53 ms )