We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

EXIT_SAPFPBEN_001 -

EXIT_SAPFPBEN_001 -

General Data in Customer Master   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Customer-specific assignment of benefit area

In the standard SAP system, an employee's benefit area is determined by the feature BAREA. As an alternative to this, there is the function exit EXIT_SAPFPBEN_001 contained in the function group XPBE. This function exit is described below.

The function exit allows you integrate your own assignment logic into the standard SAP system. If, for example, you have created customer-specific infotypes or database tables, you can use their contents to determine the benefit area.

The system explicitly defines the input parameters:

  • _PERNR personnel number
  • _BEGDA start of validity period
  • _ENDDA end of validity period

You then specify the output parameters:

  • _BAREA benefit area

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

  • EVALUATE_FEATURE if the feature BAREA is to be evaluated
  • CUSTOMER_ERROR if an error message is to be registered

In the following sample coding, the standard table T001P (Personnel Area/Subarea) and the customer infotype 9001 should be evaluated. Infotype 9001 can be a modified copy of infotype 0001 (Organizational Assignment).

The evaluation should be carried out in all clients. The feature BAREA should only be accessed in the standard client 000.

TABLES: T001P.
INFOTYPES: P9001.

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(SAPFP5U0)
USING P9001-WERKS P9001-BTRTL 'N'.
IF SY-SUBRC <> 0.
RAISE CUSTOMER_ERROR.
ENDIF.
CASE T001P-MOLGA.
WHEN '10'.
_BAREA = '10'.
WHEN OTHERS .
_BAREA = '10'.
ENDCASE.
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.






General Material Data   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 2646 Date: 20200920 Time: 103811     sap01-206 ( 34 ms )