Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

How to test end routine in sap bw?

4 Answer(s) Available
Answer # 1 #

Technically a place that where the ABAP code of the End Routine is embedded into overall code of the HAAP process is a generated ABAP class. As an example if HAAP name (variable I_HAAPNM) is TR_ZQPTTP4YE36NYCQEVA6P_A then the ABAP class name is /BIC/ZQPTTP4YE36NYCQEVA6P_A (variable R_CLASS_NAME). In that ABAP class there is a method called GLOBAL_END where it code is located.

There are two environments where such an End Routine can be debugged.

1. in SAP HANA Studio – First open the transformation and display the End Routine code. Do a right click on some executable ABAP statement and set the breakpoint via choosing "Toggle Breakpoint" context menu item.

While being in BW Modeling perspective open respective DTP and via button on DTP’s toolbar called "Start execution of data transfer process" select "Simulate in Dialog" item. This action open an RSDTP t-code embedded in SAP HANA Studio. Here hit a Simulate button and continue as you would do the debugging in SAP GUI as described below.

2. in SAP GUI – The debugging is still possible in SAP GUI if one prefer to do so. While being in RSDTP t-code set a "Processing Mode" to "Serially in the Dialog Process (for Debugging)" position, check out "Expert Mode" checkbox and hit Simulate button.

Next, a following pop-up called "Debug Request" is shown. Here enable "Before Transformation" checkbox. After that run it.

After a while, an ABAP debugger screen of SAP GUI is presented. Follow to Break./Watchpoints tab of the ABAP Debugger. Create a new breakpoint here pointing to ABAP objects:

Class name       CL_RSDHAR_TGT

Run the debugger until the new breakpoint is reached. There may be few more stops caused by hardcoded BREAK-POINT ABAP statements until it is reached to. If the ABAP debugger finally stops at IF_RSDHAR_TGT~EXTRACT (CL_RSDHAR_TGT) breakpoint just scroll a little bit down to a place where a call of method o_execute_abap_endrout is located and place a another breakpoint there.

Once that new breakpoint at the call of method o_execute_abap_endrout is reached, you came into the point where the ABAP code of custom End Routine is executed.

[4]
Edit
Query
Report
Rajan agdsdkp
PAY STATION ATTENDANT
Answer # 2 #

When building a data warehouse with SAP Business Warehouse (SAP BW), data often needs to be manipulated, transformed or enriched. Sometimes this can be implemented using standard master data lookups or formulas (although this is often suboptimal from a performance point to view), but when the logic of business rules become complex and standard out-of-the-box or drag and drop BW functionalities cannot meet the requirements, ABAP routines are usually the solution.

ABAP routines can be included in many places in your data warehouse. Start or end routines, expert routines, InfoObject rules, Data Transfer Process (DTP) filter routines. These objects can all contain custom coding. Poorly written ABAP routines are quite often bottlenecks in the data loading procedure, bad reporting performance in the SAP Business Explorer (SAP BEx) could be linked directly to coding that is executed by customer exit variables.

Using the wrong type of internal table can also lead to process time deterioration. If a record can be accessed directly using a unique key for example, hashed tables have far better performance than any other type of internal table.

A lot of ‘select’ statements can be improved dramatically, for example by selecting only a subset of fields or only a subset of record lines (with a ‘where-clause’) of the source table(s) or by using aggregate functions in the select statement.

Nesting select statements is another typical example of code that consumes a lot of time and effort. This should be avoided and could be replaced by using joins in the select statement or creating a database view, or by reading the necessary data in two times before combining them in-memory.

Identifying and resolving this kind of performance killers is key to optimize your ABAP routines. In this insight you will learn some useful procedures for measuring the performance of your ABAP coding.

Any type of routine can become large quite easily. An exceeding number of code lines make it harder to pinpoint the part of the code that is killing the performance. The load monitor shows a lot of information about all the steps of the data load. The duration can also be examined. However, it does not contain enough information to analyze a specific step in detail.

[1]
Edit
Query
Report
Kaashvie Subaya
KELP CUTTER
Answer # 3 #

Hi Experts,

I have few transformations which has start & end routines with several logics written in it. It is running long time in the every DTP run. I would like to know the where are the program is taking long time and to take performance improvement measures.

Can anybody please suggest how I can test transformation routines using SE30 or any other possible ways to analyse the performance of transformation routines.

appreciate your help!

[0]
Edit
Query
Report
Devki Manmauji
Radio Mechanics
Answer # 4 #
  • You are in the BW modeling tools, editing your transformation on the General tab. Choose End Routine Create ABAP.
  • You enter the following lines of code: Sample Code.
  • Save the class and go back to the transformation editor.
  • Activate the transformation.
[0]
Edit
Query
Report
Micha Pop
Locomotive Engineer