Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> UserExit>COPA0006



CO-PA: User Exits
This enhancement lets you implement additional planning functions in Profitability Analysis (CO-PA).

The enhancement comprises the following function modules:

  • EXIT_SAPLKEP5_001 (for functions that do not use reference data)
  • EXIT_SAPLKEP5_002 (for functions that use reference data)

These components can be used both in manual planning and in automatic planning.

Function module EXIT_SAPLKEP5_001 is called once for each profitability segment in planning and receives the data for that segment for all the relevant periods in an internal table. The profitability segment here is the combination of characteristic values used in the planning level. Planning characteristics are the characteristics of the profitability segment and the fields "Record type", "Version", and "Currency type" (if the company code currency is active in costing-based CO-PA). The function module can be used to change the values in the value fields for this segment.

Function module EXIT_SAPLKEP5_002 also receives information on the reference data for the profitability segment (either actual data, another plan version, or data from a previous year).

Both of these function modules contain the field "Exit number" in the interface. This field makes it possible to distinguish different planning functions in the enhancement. In Customizing, you can define a number of different exit numbers and enter texts for these under "Planning -> Planning Aids -> Create Exit Number for Customer Enhancement". You can assign each of these exit numbers the type "Function with reference data" or "Function without reference data". This determines which of the two function modules is called.

In manual planning, you access the function modules from the planning screen by choosing "Edit -> Planning methods -> Exits". In the dialog box, you can then specify the exit number of the desired planning function. If the function has the type "Function with reference data", the system displays another dialog box in which you can enter the timeframe, version, record type (in costing-based CO-PA), and plan/actual indicator for the reference data.

In the automatic planning method Customer enhancement, you call up an enhancement by entering an exit number and specifying whether the enhancement has reference data or not.

This enhancement lets you realizes, among others, the following functions:

  1. EXIT_SAPLKEP5_001 (Without reference data):
  • Distribution of year values to periods using a distribution key that depends on a certain characteristic
  • Revaluation using a characteristic-dependent or time-dependent revaluation factor
  • Event planning: valuation using percentage or additive events
  1. EXIT_SAPLKEP5_002 (With reference data):
  • "Roll-forward" planning: ongoing update of periods by distributing plan/actual variances of the previous periods to future periods so that the annual values remain the same.

For information about the interfaces for these function modules, see the function module documentation.

The two includes LXKKEF09 and LXKKEF10 contain sample source code for

  • EXIT_SAPLKEP5_001: Customer-Specific CO-PA Planning Functions without Reference Data
  • EXIT_SAPLKEP5_002: Customer-Specific CO-PA Planning Functions with Reference Data