Learn how to create a change log in a planning application using SAP NetWeaver BW Integrated Planning (IP). This process helps track the changes made in an IP application, creating data that you can use for audit purposes and performance assessment. Sample code in included.
Key Concept
If you use SAP NetWeaver BW Integrated Planning (IP) as your planning tool, a final version of the plan data is normally visible, but you can’t see the changes made by different users to the plan data due to technical restrictions. However, you can use characteristic derivation techniques in your planning application to trace the changes made by different users. These techniques derive and populate different values to the plan InfoCube in the background while a user saves the plan data.
If you have the SAP NetWeaver BW Integrated Planning (IP) application, multiple users can be responsible for the same plan data. For example, a sales plan for the year can be developed by multiple sales managers responsible for individual sales areas. Senior sales team members can review and change the plan. In a scenario like this in which plan data can change, and you can only see the final version of the plan data, it is difficult to trace the changes made by different users, creating an obstacle to proper auditing.
However, a solution exists to help you record changes to planning data by multiple users. This method involves using a few additional fields in the planning InfoCube and implementing characteristic derivation techniques to populate them. The result records the time of changes and the users making the changes. I give a step-by-step guide to implementing the solution in your environment. You can use this guide in an SAP NetWeaver BW 7.x IP environment, or alternatively in an SAP NetWeaver BW 3.x Business Planning and Simulation (BPS) environment. Authorization aspects of standard users are not affected by this implementation.
To understand the benefits of the proposed solution, I first demonstrate a typical planning solution in a planning environment. I then explain how to implement the proposed solution. The configuration involved requires knowledge of SAP NetWeaver BW 7.x, IP, and object-oriented ABAP.
Possible Settings Without the Proposed Solution
Described below is a basic sales planning scenario, in which planning is performed for each month at the sales organization level with multiple divisions:
Step 1. Create a Real-Time InfoCube
In the Data Warehousing Workbench (transaction RSA1), create a real-time InfoCube ZGCB_001 with the following characteristics and key figures as shown in Figure 1:
- Characteristics: Sales Organization, Division, Calendar year/month, and Unit
- Key figure: Quantity, in this case volume

Figure 1
Real-time InfoCube with the required characteristics and key figures
Step 2. Create an Aggregation Level
In the planning modeler (transaction RSPLAN), create aggregation level ZGAL_001 on the real-time InfoCube ZGCB_001 with the following characteristics and key figures as shown in Figure 2:
- Characteristics: Sales Organization, Division, Calendar year/month, and Unit
- Key figure: Volume
Activate the aggregation level by clicking the Activate button.

Figure 2
Create an aggregation level with the required characteristics and key figures
Step 3. Create a Planning Query
Go to the Query Designer to create a new planning query ZGAL_001_Q0001 on aggregation level ZGAL_001. Drag the characteristics from the available list on the far left and drop them into the characteristics, rows and columns sections as shown in the partials screen capture in Figure 3. Under the Properties section on the right of the screen (not shown), make sure to set Quantity - Jan 2011 to Input-Ready (Relevant for Locking) for the Change Data heading.

Figure 3
Define the planning query
Restrict the characteristics Calendar Year/Month to January 2012, Division and Sales Organization to fixed values available in your system, and Volume Unit to Kilogram as shown in the middle of the window in Figure 4. Under the Properties section on the right, select Start Query in Change Mode. The output of this query is referred to as a sales template.

Figure 4
Planning query characteristic restrictions
Step 4. User 1 Inputs Data into Planning Template
Using transaction RSRT (or in BEx Analyzer), let a first user (hereafter referred to as User 1) execute planning query ZGAL_001_Q0001 to input data (e.g., 125 kg) as shown in the Figure 5.

Figure 5
User 1 inputs 125 kg into the planning template
Step 5. Check Data Entered by User 1 in the InfoCube
Return to the Data Warehousing Workbench (transaction RSA1) to check that the data displayed in the planning InfoCube is the same as the data entered in the previous step. In Figure 6, the volume displayed (125 kg) matches the volume entered.

Figure 6
Data entered by User 1 matches what is displayed in the InfoCube
Step 6. User 2 Changes Data in the Planning Template
Now let a second user (hereafter User 2) change the entered data to 150 kg in the sales template (transaction RSRT) as shown in Figure 7.

Figure 7
User 2 changes data in the planning template from 125 to 150 kg
Step 7. Recheck Data in the InfoCube
Use transaction RSA1 to check the changed data (i.e., 150 kg) in the planning InfoCube (Figure 8). You see an additional 25 kg listed. But it’s not possible to identify who changed the data from 125 kg to 150 kg and when it changed.

Figure 8
Revised data appears in the InfoCube (changed from 125 to 150 kg)
Settings to Track Changes in IP
Now I explain the additional technical settings required to record the logs of changes in IP so that you can trace the time of a change and the user responsible for changing plan data.
Step 1. Change the Real-Time InfoCube
Go back to transaction RSA1 and go to the change mode of the InfoCube ZGCB_001. Add the characteristics 0TCTLSTCHNG and 0USERNAME to a new dimension (Change Log) in the real-time InfoCube ZGCB_001 (Figure 9). Then, without any changes to the aggregation level ZGAL_001, activate it in the planning modeler as previously shown in Figure 2.

Figure 9
Change the real-time InfoCube
Step 2. Create a Characteristic Derivation Exit Class
Now create a characteristic derivation exit class, which requires basic knowledge of object-oriented ABAP.
Enter transaction SE24. Enter the name of the class in the Object type field and click the Create button (Figure 10). Here I have named the class ZG_CL_CHRREL_PROTOTYPE.

Figure 10
Name the new class via transaction SE24
In the screen that appears, select the Class radio button (Figure 11). Click the check mark icon.

Figure 11
Select the Class radio button
In the next screen, enter a description for the class (this does not affect how the class functions), and choose Public from the Instantiation drop-down menu (Figure 12). In the Class Type block, select the Usual ABAP Class radio button. Check the Final box at the bottom of the screen, and click the Save button.

Figure 12
Select class attributes
In the screen that appears, click the Properties tab and click the Superclass button to inherit the superclass. A superclass is a parent object from which you can inherit basic properties and enhance them to suit your requirements. Enter CL_RSPLS_CR_EXIT_BASE in the Superclass field, and click the save icon (Figure 13).

Figure 13
Inherit Superclass CL_RSPLS_CR_EXIT_BASE
Now click the Methods tab. Select method IF_RSPLS_CR_METHODS~DERIVE, which SAP recommends to implement characteristic derivation, and click the redefine icon (Figure 14).

Figure 14
Redefine Method IF_RSPLS_CR_METHODS~DERIVE
In the ABAP editor that now appears, delete all the default code. Copy and paste the code in Figure 15 into the ABAP editor. You can download the code by clicking here. The code manipulates the method interface parameter C_S_CHAS to populate the values for user ID and time of data entry into real-time InfoCube ZGCB_001. Click the save icon at the top of the screen.

Figure 15
New code for method IF_RSPLS_CR_METHODS_DERIVE
Check that the syntax of the method is correct by clicking the Syntax Check button on the screen and then click the save icon. Then activate class ZG_CL_CHRREL_PROTOTYPE by clicking the check mark icon in the next screen as shown in Figure 16.

Figure 16
Save the methods for class ZG_CL_CHRREL_PROTOTYPE
Step 3. Create Planning Modeler Characteristic Derivation Settings
Next, create the characteristic derivation settings in the planning modeler to link exit class ZG_CL_CHRREL_PROTOTYPE and real-time InfoCube ZGCB_001. In the planning modeler (transaction RSPLAN), click the InfoProvider tab. Enter ZGCB_001 in the Find field and click the Start button (Figure 17).

Figure 17
Select an InfoProvider
In the next screen, click the Characteristic Relationships tab and the Create button (Figure 18). Now select the following settings:
- In the Characteristic relationship 1 block, select the With derivation radio button, because you derive the values using an exit class.
- Select Exit Class from the Characteristic Combinations Based On drop-down menu.
- Select the class ZG_CL_CHRREL_PROTOTYPE (which you created in Step 2) from the Exit Class drop-down menu.
- Select your source and target characteristics from the list in the center of the screen. Although you don’t need any source values to derive the change log and user in this case, you have to select one for syntax purposes. Check the Source characteristic check box next to any characteristic — it does not matter which one you check.
- Check the Target characteristic check box for Time Stamp of Last Change and User Name. These are the two values that need to be derived.

Figure 18
Planning modeler characteristic derivation settings
Step 4. User 1 Re-enters Data in the Planning Template
Delete all data from real-time InfoCube ZGCB_001 using transaction RSA1. Now in transaction RSRT (or in BEx Analyzer), let User 1 execute planning query ZGAL_001_Q0001 and input 125 kg (Figure 19). Click the Save button.

Figure 19
User 1 enters 125 kg in planning query ZGAL_001_Q0001
Step 5. Check Data Entered in the Real-Time InfoCube by User 1
Now you can see the value 125 kg in real-time InfoCube ZGCB_001. User 1 (shown as user name 98902484 in Figure 20) has entered 125 kg at a specific date and time. The timestamp is displayed in the format YYYYMMDDHHMMSS.

Figure 20
Check data entered in the real-time InfoCube by User 1
Step 6. User 2 Changes Data in the Planning Template
Now in transaction RSRT (or in BEX Analyzer) have User 2 execute planning query ZGAL_001_Q0001 to change the value 125 kg to 150 kg (Figure 21). Click the Save button.

Figure 21
User 2 changes the value to 150 kg
Step 7. Check the Changed Data Using the Change Log
In Figure 22, you can see a total value of 150 kg in the real-time InfoCube ZGCB_001 with a timestamp (format YYYYMMDDHHMMSS) for each data record. User 1 (user name 98902484) entered 125 kg on November 30, 2011, at 13:55:34, and later, User 2 (user name PARHI.P) added an additional 25 kg on the same date at 14:04:56. You now have the means to track which users have modified the record, when they made the modification, and by how much the value was modified. This data can be used for the purpose of auditing or tracking performance.

Figure 22
Check the changed data in the real-time InfoCube using the change log

Pranab Parhi
Pranab Parhi is a senior SAP NetWeaver BW and planning consultant who has been involved with multiple full-life cycle SAP NetWeaver BW reporting and planning implementations. He has 10 years of SAP consulting experience in various industries, including pharmaceutical, oil, public sector, aviation, consumer packaged goods, services, and retail in multinational environments. He is currently working as a senior associate for Bluefin Solutions. Pranab is an SAP-certified SAP NetWeaver BW 7.0 and SAP NetWeaver BW 3.5 consultant with six years of BI experience. In addition, he is an SAP-certified ABAP consultant with more than four years of ABAP experience. He also holds a bachelor’s degree in engineering (computer science).
If you have comments about this article or BI Expert, or would like to submit an article idea, please contact the BI Expert editor.
You may contact the author at pranab.parhi@yahoo.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.