Ansicht
Dokumentation

EXIT_SAPFPBEN_004 -

EXIT_SAPFPBEN_004 -

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

Customer-specific assignment of cost group

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

The function exit allows you to 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 employee benefit group.

The system explicitly defines the input parameters:

  • _PERNR personnel number
  • _BEGDA start of validity period
  • _ENDDA end of validity period
  • _BAREA benefit area
  • _BPLAN benefit plan
  • _PLTYP benefit plan type
  • _BENGR employee benefit group
  • _BSTAT employee status

You then specify the output parameters:

  • _CSTV1 cost group

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

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

In the following sample coding, the benefit area and the customer infotype 9006 should be evaluated. Infotype 9006 can be a modified copy of infotype 0006 (Addresses).

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

INFOTYPES: P9006.
DATA: SW001, SW002.

CASE SY-MANDT.
WHEN 0.
RAISE EVALUATE_FEATURE.
WHEN OTHERS.
RP_READ_INFOTYPE(SAPFP50P)
USING _PERNR '9006' SPACE SPACE SPACE
_BEGDA _ENDDA '0' 'NOP' P9006.
IF SY-SUBRC NE 0.
RAISE CUSTOMER_ERROR.
ENDIF.
CASE _BAREA.
WHEN OTHERS .
IF P9006-PSTLZ EQ '30000'.
SW001 = '='.
ELSE.
IF P9006-PSTLZ GT '30000'.
SW001 = '>'.
ELSE.
SW001 = '<'.
ENDIF.
ENDIF.
CASE SW001.
WHEN '<' .
_CSTV1 = 'REG2'.
WHEN OTHERS.
IF P9006-PSTLZ EQ '60000'.
SW002 = '='.
ELSE.
IF P9006-PSTLZ GT '60000'.
SW002 = '>'.
ELSE.
SW002 = '<'.
ENDIF.
ENDIF.
CASE SW002.
WHEN '<'.
_CSTV1 = 'REG2'.
WHEN OTHERS.
_CSTV1 = 'REG2'.
ENDCASE.
ENDCASE.
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.






rdisp/max_wprun_time - Maximum work process run time   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 3512 Date: 20240328 Time: 213850     sap01-206 ( 39 ms )