This blog has only been translated into English, the original blog can be found here: http://eKessler.de
For examination and manipulation of exit variables previously only available extension RSR00001 (Customer Exit Global Variables in Reporting), transaction SMOD, available. Can use the function module EXIT_SAPLRRS0_001 here at run time (execution time of a report) using ABAP programming accessed the variable values, and these are adjusted if necessary. The function block EXIT_SAPLRRS0_001 calls the include ZXRSRU01 which is in the customer namespace.
As part of the processing must be made next to the name of the variable (I_VNAM) nor the execution time (I_STEP). This double nesting quickly leads to confusing and unstructured code. Typical approaches are here:
■ · Using two Nested CASE (I_VNAM and I_STEP) instruction
■ · Combination of CASE (I_VNAM) and IF ELSEIF (I_STEP) instructions
■ · Outsourcing of source code through the use of includes, function modules, dynamic, dynamic method calls in ABAP OO classes
■ · ...
With BW 7.3, SAP delivers the BAdI RSROA_VARIABLES_EXIT_BADI (BADI to fill variables). The BAdI is the Customer upstream exit, that is, the calls the BAdI customer exit on. Figure 1.1 shows the call sequence and using the BAdI's in combination with Customer Exits and BAdI implementations by the customer.
Figure 1.1 BAdI RSROA_VARIABLES_EXIT_BADI call and use
The standard SAP processing process variables determined by the GET BADI command all active BAdI implementations.
In the BAdI RSROA_VARIABLES_EXIT_BADI is a filter-based BAdI. When object filter the BAdI uses the info object to which the variable is based that is currently processed.
Note: In I_STEP 3, we have no clear variable and thus no clear info object name. The BAdI is called in the I_STEPs 0, 1 and 2 for each variable. A variable is always based on a feature. In I_STEP 3 all variables in the current report are available in the form of a table parameter. If the BAdI implementation is to be used for processing in I_STEP 3 of the filter by the value IOBJNM must be expanded =''.
The BAdI class that returns all active implementations, first determines all active implementations of the BAdI and additionally ensures that the filter values for the BAdI implementation consistent with the currently processed values.
Then an instance of each active implementation generates and invoked with the command CALL BADI method IF_RSROA_VARIABLES_EXIT_BADI ~ PROCESS of individual implementations.
SAP delivers BAdI definition directly with the default implementation SMOD_EXIT_CALL. This implementation is active and has a filter combination IOBJNM ='' OR IOBJNM <>''. The filter combination is selected such that the BAdI I_STEP implementation for all (0, 1, 2 and 3) is considered to be active. The default BAdI implementation has the task of the customer exit (function block) EXIT_SAPLRRS0_001 RSR00001 call the extension, see Figure 1.1. Of the customer exit is only called when the component in the extension is active.
It is recommend not to mix the use of and BAdI customer exit.
The interface of the BAdI method PROCESS interface is identical to the interface of the function module EXIT_SAPLRRS0_001 the customer exit. This means that the source code of the customer exit can be fully adopted, this will reduce the migration effort.
Note: Migration is not needed! The customer exit persists. The BAdI, SAP an additional concurrent object-oriented way for the processing of exit variables. Advantage of the BAdI variant against the customer exit is better structuring and management of the implementations.
In the BAdI RSROA_VARIABLES_EXIT_BADI is a new BAdI BAdI technology, ie, the BAdI is organized in an enhancement spot.
In the following, I will briefly point out the steps that are necessary to create an implementation for a variable. For example, I have a variable (ZTKE_FISCPER) is applied based on the characteristic 0FISCPER. The variable is of type customer exit and has as a selection option selection option.
To create a BAdI BAdI implementation of the new technology, there are several ways.
1.about the BAdI definition (transaction SE18)
2.Use the BAdI implementation (transaction SE19)
3.Über the ABAP Workbench (transaction SE80)
For 3 We need as entry the name of the development package which we have not first. For 1) and 2) we only need the name of the BAdI definition. Since we have only the first name of the BAdI definition (RSROA_VARIABLES_EXIT_BADI) we recommend the route via the SE18, see Figure 1.2.
Figure 1.2 Creating a new BAdI implementation step 1
To display the BAdI definition of the view automatically switches to the SE18 and SE80 there opens the enhancement spot RSROA_VARIABLES_EXIT. By clicking on (see marking in Figure 1.2.), A new BAdI implementation can be created.
A BAdI implementation can not be created directly within a BAdI definition. This, first you have to create an enhancement implementation. Figure 1.3 shows in (1) the dialog for selecting an enhancement implementation. After selecting the extension implementation can be created within this BAdI implementation, see (2).
Figure 1.3 Creating a new BAdI implementation - Step 2
(3) shows the definition of the filter values in the newly created BAdI implementation.
Then, the implementation of the method can be PROCESS, see (1) in Figure 1.4.
Figure 1.4 Creating a new BAdI implementation - Step 3
After deployment is completed needs to be ensured that all of the objects concerned are active. The following objects must be activated:
■ ABAP OO class
■ BAdI implementation
■ Enhancement Implementation
When activating the ABAP OO classes must be taken to ensure that the entire class is active. Active only when a method declaration and the definition of the method but not the ABAP class activates itself. So I recommend when activating the class level to change (Goto è class definition).
After everything is set, the behavior of variables with a BEx query be tested.
Additional information on the topic can be SAP ABAP Programming Course for SAP NetWeaver BW. The course shows the most important locations on where to get (or woman) in the context of an SAP NetWeaver BW system in contact. This also includes the upstream SAP source system with a.
The course is held by me in the form of a work shop that is here is the participants not only my knowledge and experience available but also that of other participants.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
22 | |
16 | |
12 | |
9 | |
9 | |
8 | |
8 | |
8 | |
8 |