Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug report in the production server

manish_malakar0316
Active Participant
0 Kudos

Hi all,

Recently I am coming across a few reports in my project where the issue/bug is in the production server. Now I know that in order to debug a report in production, I do need authorization. So, after I get the required authorization for the report/tcode, I realized that I can only do a '/H' debugging.

I have seen some threads similar to my issue, but I need to know that if I do a '/H' debugging, then the debugger starts from the SAP standard . As a result, I end up wasting a lot of time going through every single PERFORM of the standard code till the breakpoint reaches the report.

So is there any way I can get the breakpoint to come directly to the report instead of going through the standard part of the code line by line ? Any tips ? Please advise.

Regards,

Manish

1 ACCEPTED SOLUTION

manish_malakar0316
Active Participant
0 Kudos

I got the reference from the link https://blogs.sap.com/2014/01/02/layer-aware-debugging/

17 REPLIES 17

hubert_heitzer
Contributor
0 Kudos

Hi,

after your debugger started select in the menu of your debug window:

  1. [Breakpoints] -> [Create breakpoint]
  2. select tab [Srce Code]
  3. specify location of your BP

Example:

0 Kudos

Hi Hubert,

Thanks for the reply. I'll try it.

But just 1 thing. If I just give the name of the report in the "Program" field, then I believe the breakpoint will start from the first line of the code right ? In most cases I'll be debugging someone else's code so I wont be able to know in which line the issue is happening so I guess the "Row" field will be empty.

Regards,

Manish

HI Manish Malakar,

I think Row field cannot be empty as we have to set breakpoint at some line , fill row line with 3 or 4 from where the report will start so that you can scroll and put breakpoint at the exact line where you want.

thank you,

Jagadeesh varma.

0 Kudos

Hi hubert.heitzer ,

Can you please let me know why I am getting the below error ?

Regards,

Manish.

srikanthnalluri
Active Participant
0 Kudos

It is not good practice to debug in the production system, that data (causing issue data) has to be created in either Quality or in Development system.

manish_malakar0316
Active Participant
0 Kudos

Hi jagadeesh800 ,

I tried to follow Hubert's method in the development server. On giving the '/H' command, the breakpoint goes to the standard program and include as shown in the below snapshot. However, when I am giving the report name and its screen and line numbers, I am getting the error as shown. When I am giving the line number on the right, the "Row" parameter automatically takes in the same number for the row.

Line 322 doesn't have any commented code. There is a loop starting from that line.

Can you tell me where I am going wrong ?

Regards,

Manish

tan_michael
Active Participant

Hi,

I would like to inquire if you can access the souce code in report program in se38 even in display mode?

0 Kudos

Hi,

No, basically we have been told to use the user's credentials to debug in production. The user doesnt have authorization to open se38 in production.

DoanManhQuynh
Active Contributor
0 Kudos

Do you have authorization to run function module? if you do, i sugggest you to use fm like:

ABAP4_CALL_TRANSACTION

ALINK_CALL_TRANSACTION

which allow you to call your transaction and also you can debug from function module button.

Btw, im little confused because if i run a transaction code, /H will bring me direct to the program of that transaction after F8 without going through any standard code, i dont understand how to reproduct your case.

0 Kudos

No, I dont have authorization for those 2 tcodes.

You say on pressing F8, the debugger bypasses your standard code ? How is that possible ? When F8 is pressed, the debugger goes out of the debugging mode and the program gets executed.

Tomas_Buryanek
Active Contributor

There is Layer-Aware Debugging for this.

There you can specify where debugger should stop. For example stop when entering source code in Z* package... It is very handy to skip standard code and stop for example in Z* user exits, or other custom implementations.

-- Tomas --

0 Kudos

I just checked this link https://blogs.sap.com/2010/07/27/layer-aware-debugging-in-nw-70-ehp2. But it's a long process where I have to go to transaction SLAD to create a profile and then debug. I am sure that I wont have authorization for that transaction in production.

manish.malakar0316 No, you do not need any profile. You can use it directly in debugger without a profile.

Direct definition of layer - Packages - Stop at entry. And you are done 🙂

-- Tomas --

0 Kudos

tomas.buryanek Can you tell me the steps if possible ? Can you show me with a snapshot ?

I got the reference from the link https://blogs.sap.com/2014/01/02/layer-aware-debugging/

Well explained with snapshots

matt
Active Contributor

Nonetheless, if the problem can't be reproduced in test or dev, it's often very necessary.

manish_malakar0316
Active Participant
0 Kudos

I got the reference from the link https://blogs.sap.com/2014/01/02/layer-aware-debugging/