0% found this document useful (0 votes)
18 views

Exercise Performance Analysis

The document provides instructions for performing performance analysis exercises on an ABAP program. It involves: 1) Creating an ABAP program to select data from tables MARD and MAKT using nested and joined SELECT statements. 2) Executing the program using transaction SE30 to analyze and compare the results. 3) Modifying the program to use a JOIN statement instead of nested SELECTs and analyzing the performance impact. 4) Enabling an SQL trace using transaction ST05 to view and analyze trace logs of SELECT statements executed by a short-running ABAP program. This allows comparing performance of different SQL techniques.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Exercise Performance Analysis

The document provides instructions for performing performance analysis exercises on an ABAP program. It involves: 1) Creating an ABAP program to select data from tables MARD and MAKT using nested and joined SELECT statements. 2) Executing the program using transaction SE30 to analyze and compare the results. 3) Modifying the program to use a JOIN statement instead of nested SELECTs and analyzing the performance impact. 4) Enabling an SQL trace using transaction ST05 to view and analyze trace logs of SELECT statements executed by a short-running ABAP program. This allows comparing performance of different SQL techniques.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Performance Analysis Exercise

1) Program Name YPAxx01 where (xx is the last two digits of your Employee id). A. Runtime Analysis 2) Select 10 records only of MATNR, WERKS & LGORT from MARD table for LABST greater than or equal to 100. Within SELECTENDSELECT of MARD, for every MATNR, select Material description (MAKTX) from MAKT table. Store the selected fields from MARD & MAKT in internal table. Write all the record values from this internal table. This program will look like nested select. 3) Execute SE30 for the program created above. Understand the results & store the same so as to compare the results after the program is modified. 4) Select 10 records only of MATNR, WERKS & LGORT from MARD table for LABST greater than or equal to 100. Store this in internal table. Loop this internal table and for every MATNR in internal table, select Material description (MAKTX) from MAKT table. Modify the internal table including the value of MAKTX. Write all the record values from this internal table. (Hint: Use SELECT * UP TO 10 ROWS INTO CORRESPONDING FIELDS OF ITAB FROM MARD. Syntax during first selection from MARD). 5) Repeat step 3 and study the analysis results and compare the same with the previous results. 6) A join statement can modify the program created above. (Hint: Use select statement as follows by commenting the previously written select statements.
SELECT MARD~MATNR MAKT~MAKTX MARD~WERKS MARD~LGORT UP TO 10 ROWS INTO CORRESPONDING FIELDS OF TABLE ITAB FROM ( MARD INNER JOIN MAKT ON MAKT~MANDT = MARD~MANDT AND MAKT~MATNR = MARD~MATNR ) CLIENT SPECIFIED WHERE MARD~MANDT = SY-MANDT AND MARD~LABST GE 100. )

7) Repeat step 3 and study the analysis results and compare the same with the previous results. B. SQL Trace 8) Execute T.code ST05. Check SQL Trace check box & press the button Trace On. Only one person can conduct a trace at any time on a server. Ensure the user is not doing other activities in another session or in the background while the trace is being executed. 9) In another session, run a program that runs for a shorter period say, less than 10 seconds. (Trace results will be large, if the trace is on for more time). 10) Deactivate the trace by clicking on the Trace Off pushbutton.

Page 1 of 2

11) Click the List Trace pushbutton and study the Trace log. 12) Branch to other screens and look for Details, DDIC info, Explain SQL, ABAP display & More info.

Page 2 of 2

You might also like