Ansicht
Dokumentation

EXIT_SAPLHRBEN00FEATURE_001 -

EXIT_SAPLHRBEN00FEATURE_001 -

BAL Application Log Documentation   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Customer-specific assignment of benefit areas

In the SAP R/3 System, an employee's benefit area is determined by the feature BAREA. Alternatively, you can use the function exit EXIT_SAPLHRBEN00FEATURE_001 from the function group XPBE that is described here.

You can use the function exit to integrate your own assigment logic in the SAP R/3 System. For example, if you have created customer- specific infotypes or database tables, you can use their contents to determine the benefit area.

You must use the following as input parameters:

  • _PERNR Personnel number
  • _BEGDA Start of validity period
  • _ENDDA End of validity period

You can specify the following as output parameters:

  • _BAREA Benefit area

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

  • EVALUATE_FEATURE if the feature BAREA should still be evaluated
  • CUSTOMER_ERROR if an error message should be registered

In the following sample coding, both the standard table T001P (personnel area/subarea) and the customer infotype 9001 should be evaluated. Infotype 9001 could be a modified copy of infotype 0001 (Organizational Assignment).

This evaluation should be carried out in all clients, but the feature BAREA should only be accessed in client 000.

TABLES: T001P.
INFOTYPES: P9001.
DATA: ERROR_TABLE LIKE RPBENERR OCCURS 5 WITH HEADER LINE,
H001P LIKE T001P,
SUBRC LIKE SY-SUBRC.
CASE SY-MANDT.
WHEN 0.
RAISE EVALUATE_FEATURE.
WHEN OTHERS.
RP_READ_INFOTYPE(SAPFP50P)
USING _PERNR '9001' SPACE SPACE SPACE
_BEGDA _ENDDA '0' 'NOP' P9001.
IF SY-SUBRC NE 0.
RAISE CUSTOMER_ERROR.
ENDIF.
PERFORM RE001P(SAPFBEN0)
TABLES ERROR_TABLE
USING P9001-WERKS P9001-BTRTL 'N'
CHANGING H001P SUBRC.
IF SY-SUBRC <> 0.
RAISE CUSTOMER_ERROR.
ENDIF.
CASE T001P-MOLGA.
WHEN '10'.
_BAREA = '10'.
WHEN OTHERS .
_BAREA = '10'.
ENDCASE.
ENDCASE.

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






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 2834 Date: 20240613 Time: 223507     sap01-206 ( 38 ms )