0% found this document useful (0 votes)
22 views4 pages

How New Debugger Saved My Day !!!

The author describes a situation where they needed to retrieve values from internal tables not directly available in a VOFM routine during a custom implementation. By using the debugger's call stack and the 'Replace Tool', they successfully accessed global variables and internal tables, which impressed their functional counterpart. The author also discovered helpful resources online about the debugger's features after the interaction.

Uploaded by

Gaphur shaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

How New Debugger Saved My Day !!!

The author describes a situation where they needed to retrieve values from internal tables not directly available in a VOFM routine during a custom implementation. By using the debugger's call stack and the 'Replace Tool', they successfully accessed global variables and internal tables, which impressed their functional counterpart. The author also discovered helpful resources online about the debugger's features after the interaction.

Uploaded by

Gaphur shaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

How New Debugger Saved my Day !!!

22102,902

Note: The ASSIGN technique which I have used in this blog is NOT Recommended by
SAP. Please go through the comments section of ASSIGN – Life made easy. before
reading this.

Recently I was working on a custom VOFM routine implementation. My functional


counterpart was sitting with me and we had configured the routine by entering the key.

Now it is my job to implement the code. I was able to get the values available in the
structure KOMKBV2 inside the routine. But he needed the values from other structures
(say LIKP) to implement the custom validation.

The functional consultant sitting next to me was very keen now. He wanted to know
how to retrieve the internal table / structure values which are not directly available from
the userexit / BADI / Customer Exit interface parameters.

I need to explain him now

So I set a breakpoint in the VOFM routine. We executed the transaction and program
stopped at the breakpoint in the routine which I had set earlier.

From the debugger, I started to loop back to previous program from the call stack. I showed
him how to check the values of the internal tables & structures of the previous program
which called the VOFM routine.
I told him that we have an option to use

ASSIGN ((<program name>)<internal table[]>) to <field symbol of that


type>.

CONSTANTS : lc_likp TYPE char17 VALUE ‘(SAPMV50A)xlikp[]’.

FIELD-SYMBOLS:<fs_likp> TYPE STANDARD TABLE.

ASSIGN (lc_likp) to <fs_likp>.

Phew!!! I was able to read the value which he was interested. But now he started
to fire questions at me.

“How to find all the internal tables which I can use by this way. How to find that???”

I managed to tell him that if a program a loaded and available in context, we can access
the global variables of that program by the above method. But it is not advisable to
read the data by this way, as SAP has the right to change logic of the program or name
of the internal table in the future release. But he was reluctant to accept that.

“Okay!! Then give me the list of all programs which are loaded and available in context
now. I need to know”

Oh God!! Please save me from him. I honestly don’t know, how to get the details of all
program which were loaded right now.

I. Idea..!!! I can activate a trace and execute the transaction. Collect all the
programs names displaying in the trace log and give it to him. That’s a good
idea…!!! But… how do I get the list of internal table names & its value. I cannot
directly get those from the trace.

Without a hope, I was going through the options available in the debugger. I noticed an
icon with name “Replace Tool”. I hardly used that. I click on that and I got a pop up. It
has many options coupled as a tree. I expanded the tree “Special Tools”. I was able to
find “Loaded Programs (Global Data)”

I doubled click that and the tool was giving me everything I wanted. “Thank God… You
saved me ..!!!“

It has two tabs Loaded Programs & Global data. From the global data tab, I was able to
get the global variables, internal table, work area value. And the best thing was, I was
able to search by CTRL + F based on the variable names. What else do I need..!!!
After he left, I did a quick search on this feature in google. I was amazed to find the
below two URLs.

https://help.sap.com/saphelp_nw73ehp1/helpdata/en/
49/1ec3f1f3ee6492e10000000a42189b/content.htm

http://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2011/07/14/news-
in-abap-debugger-breakpoints-and-watchpoints-statement-debugging

Everything was explained in detail and I had never read / bookmarked it First thing I
did after that was to click on “Follow” and started following the updates on that space.

You might also like