Sapass

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



Index

KKDR0002

User Exits for Drilldown Reporting
Expansion of drilldown reporting: Virtual characteristics, key figures and elimination key figures (elimination of internal business volume).

With this expansion it is possible to define and evaluate virtual characteristics or basic key figures which are user defined.

The Components

The components of the expansion are the function modules EXIT_SAPMKCBF_001, EXIT_SAPMKCBF_002, EXIT_SAPMKCBF_003 and. As Drill- EXIT_SAPMKCBF_004. As drilldown reporting is used by various different applications, the function module must be selected independent of the application.

EXIT_SAPMKCBF_001 in EC-EIS

EXIT_SAPMKCBF_002 in CO_PA

EXIT_SAPMKCBF_003 remaining users of drilldown

EXIT_SAPMKCBF_004 Elimination key figure (only supported in EC-EIS)

Use of the expansion 001 bis 003:

First of all, you must define all the characteristics or key figures within the application.

The customer-specific coding is put in Include programs. The Include programs ZXYEXU04 and ZXYEXF04 are intended for the function module EXIT_SAPMKCBF_001, programs ZXYEXU05 and ZXYEXF05 are intended for EXIT_SAPMKCBF_002, and programs ZXYEXU06 and ZXYEXF06 are intended for EXIT_SAPMKCBF_003.

You list the fields to be edited (characteristics or key figures) in the Include program ZXYEXU04 (and ZXYEXU05, ZXYEXU06).

You must create a form USER_CFnnn or USER_CE0nnnn for each structure (i.e. aspect, operating concern) in Include ZXYEXF04 (and ZXYEXF05, ZXYEXF06). The specific coding for the virtual characteristic or the virtual key figure is to be stored in this form. For these programs to be recognized by the SAPLXYEX program, you must create Include ZXYEXZZZ and incorporate ZXYEXF04 (and ZXYEXF05, ZXYEXF06) into it.

Those characteristics entered in the Include are not passed on to the Select-Statement at the start of the drilldown report. It is, therefore, possible to change this after the reading of the data record. Finally, the selection criteria of the form are checked.

Note that the transferred data records can be of different aggregation levels depending on the reading process used (totals records or delta read process).

After activating the expansion, those reports for which the expansion is to be used, have to be regenerated.

Example

Example coding can be found set in comment characters in the source text of the function modules. The coding must be either aspect or operating concern-specific.

If, for example, you want to sort by report name, you can use field RKB1D-REPID for this.

Use of the enhancement EXIT_SAPMKCBF_004.

With this Exit, you activate the drilldown reporting elimination function in EIS.

In internal business volume elimination, a basic key figure, for examples sales split into external and internal sales, is to be displayed. Here it depends on the drilldown, or more exactly on the characteristics established for the row, whether a data record is to be seen as external. Besides this, discussions with pilot users have shown that no unique solution is possible.

Maintenance of the Include 'ZXYEXU07' allows us to cover all the known requirements. The individual settings options are being tested by pilot users and will then be channeled into a standard Customizing in a later Release.

In 'ZXYEXU07' one or (as an exception) several 'eliminination groups' are defined (APPEND to BUG_TAB).

An 'eliminination group' consists of one or more subgroups. A subgroup consists in turn of one or more characteristic pairs (S,R), to which one or more of the elimination conditions (1) to (4) are assigned. Both characteristics are interpreted as Sender (S) or Receiver (R). They must have the same domain, the same check table and the same hierarchies.

All conditions within a subgroup are linked by a logical 'OR'. The various subgroups are then linked by a logical 'AND' .

Then these 'eliminination groups' are assigned to the key figures (APPEND to BUK_TAB). Only one group may be assigned to any particular key figure. If necessary however, several elimination key figures may be created for the same basic key figure.

The elimination key figures should be defined by equalization in the key figure transaction (for example EXUMSATZ: '=UMSATZ'), where only basic key figures or sums and differences of these may be included on the right hand side.

All these prerequisites are verified automatically by the system and are shown via error messages. Also in each case verifications are carried out using the field catalog, and only those Sender and Receiver characteristics and eliminination key figures that appear in the aspect are considered.

The system checks now for each list, or more exactly for each (selection) cell in which the eliminination key figure appears, and for each data record that is to be added to the cell, whether the specified elimination conditions are fulfilled. If this is the case, the figure is set to zero.

In the form the internal sales can now be deducted by working out the difference. In the form you can also define a column (cell) with key figure = 'SALES' and Receiver = '#'. The external sales will be displayed in this column independently of the drilldown.

The elimination conditions in detail:

  1. DB-S = DB-E : this means that in the data record the characteristic value of the Sender (DB-S) equals the characteristic value of the Receiver (DB-E).
  2. Z-S = 'X' and Z-S = DB-E = 'X' : this means that for the cell the Sender (Z-S) has a characteristic value 'X', and the Receiver characteristic value (DB-E) matches this value.
  3. Z-S = '*' : this means that in this cell the Sender characteristic (Z-S) is not fixed, it is summed over S. This condition is only logical with several subordinate groups.
  4. Z-S = 'N' and N is parent of DB-E : this means that in this cell the Sender characteristic (Z-S) is fixed by a hierarchy node (N), and the Receiver characteristic value (DB-E) belongs to this node. This is the elimination along a hierarchy.
Example

As a rule you will create an elimination group with a subgroup
(= '00') and characteristic pair Sender company (SGESEL) and Receiver company (EGESEL) and conditions (2) and (4). The key figure 'external sales' is then created with the key figure transaction using the formula '=SALES'. All further calculations, for example 'internal business volume' = 'SALES' - 'external sales', should be defined in the form.

If you want to eliminate by several dimensions, you might want to use subgroups. Each subgroup should consist of an elimination pair and the conditions (2), (3) and (4).

Condition (3) ensures that the relevant subgroup conditions are taken as fulfilled if you summarize over the specific dimension.

Condition (4) is only logical if the hierarchical summarizations are stored as characteristics themselves in the aspect. Using this condition, you can determine external sales independent of the current drilldown.

If no external hierarchies are used, the hierarchy levels are usually stored as characteristics in the database. In this case all hierarchy level pairs, except at the highest and lowest level, are used as characteristic pairs . Then only condition (2) is to be used. Conditions (1) and (3) should only be necessary in exceptional cases.

You can find further examples in the online documentation on EC- Executive Information System.

LXYEXU07:

* elimination conditions:
*
* (1) DB-S = DB-E => K = 0
* (2) Z-S = 'X' und Z-S = DB-E => K = 0
* (3) Z-S = '*' => K = 0
* (4) Z-S = 'N' und N is parent of DB-E => K = 0

DATA: U07_BUG_WA TYPE RKD6_S_BUG,
U07_BUK_WA TYPE RKD6_S_BUK.

* Definition of the elimination groups
CLEAR U07_BUG_WA.
U07_BUG_WA-GRUPPE = '1'.
U07_BUG_WA-SFIENM = 'SGESEL'.
U07_BUG_WA-EFIENM = 'EGESEL'.
* U07_BUG_WA-BU_BED = '1'.
* APPEND U07_BUG_WA TO E_BUG_TAB.
U07_BUG_WA-BU_BED = '2'.
APPEND U07_BUG_WA TO E_BUG_TAB.
* U07_BUG_WA-BU_BED = '3'.
* APPEND U07_BUG_WA TO E_BUG_TAB.
U07_BUG_WA-BU_BED = '4'.
APPEND U07_BUG_WA TO E_BUG_TAB.

* assignment of ratios to elimination groups
CLEAR U07_BUK_WA.
U07_BUK_WA-KFIENM = 'EXTUMSATZ'.
U07_BUK_WA-GRUPPE = '1'.
APPEND U07_BUK_WA TO E_BUK_TAB.

KCK0:

Key figure EXTUMSATZ
Short word Ex-Umsatz
Description external sales


Function/Program:

  • EXIT_SAPMKCBF_001: EC-EIS: Virtual Characteristics and Key Figures
  • EXIT_SAPMKCBF_002: CO-PA: Virtual Characteristics and Key Figures
  • EXIT_SAPMKCBF_003: Drilldown Users except CO-PA and EIS: Virtual Characteristics and Key Figs
  • EXIT_SAPMKCBF_004: Drilldown Users EIS: Elimination of internal business volume

02-Oct-2005