Etiqueta > debug
Supported by

/HS Command

Most functionals, and even the hardcore functionals, knows that in order to start debugging an ABAP program, we use the /H command. But few programmers, even the hardcode programmers, will know the purpose of the /HS command.

Ler o resto do artigo! »

Jump The Wall

Turn down the music.
Close the door.
Look around.
Is anyone looking at you?
Are you being watched?
Are there any security cameras?
If not, we can go on.

Ler o resto do artigo! »

Oh time turn back

“Oh time turn back
Give me everything I have lost
Take pity and give me the life
The life I have already lived
Oh time turn backward
Kill off my futile hopes
Look how even the sun itself
Returns every morning” – António Mourão

Hey Tony, right away. I will show you how you can turn back time.

Ler o resto do artigo! »

Create test variants within functions from the debugger

Imagine that you are debugging a transaction, you enter into a function and find something interesting. So interesting that you have to debug it several times. The conventional way is to start the debug of the transaction again from the beginning. How tedious.

But there is a more direct route. When you are debugging a function you can create test data for this function directly from the debugger, using the values with which the function had been called at that time. For instance:

Ler o resto do artigo! »

Debugging while in modal dialogue boxes

There are times when you can’t do /H to launch debugger. The most common one is when a pop-up window is open. However there is a simple, if Heath-Robinson, way to do it:

Ler o resto do artigo! »

Partial Analyses in SE30

Obviously you already know the SE30 transaction (run time analysis) and obviously you use it often to analyse standard programs and to discover tables, functions, BADIs and similar contained within them.

But if you are like me, then you have a love-hate relationship with this transaction – on the one hand you love it because it enables you to see the guts of a program without having to debug it, yet on the other hand you hate it because normally the list of guts tends to have thousands of lines and becomes unmanageable.

But I am not myself any more because since I discovered that SE30 enables you to do partial analyses, my relationship with it has transformed into one of pure love. And from now on you’ll also be able to love it in its entirety because I’m going to teach you this little secret.

  1. Transaction SE30;
  2. In the block “Measurement Restrictions” create a variant with a name different from the DEFAULT;
  3. In the variant, activate “Specific Units”;
  4. Insert the transaction or program or function module to be analysed;
  5. Load in “Run” (normally now the analysis would start, but as we have selected “Specific Units”, it starts as deactivated and it has to be activated explicitly);
  6. Navigate inside the program that you are analysing until you arrive at the point that you wish to analyse;
  7. Activate the analysis by writing /ron in the top of the command field;
  8. Do what you have to do;
  9. Deactivate the analysis by writing /roff at the top;
  10. Exit the program and return to the SE30 screen.

You have just done a partial analysis, so instead of the typical thousands of lines, there are only tens or hundreds of lines which occur between the commands /ron and /roff. More useful. don’t you think?

Leverage the feature and explore other possibilities made available by “Measurement Restrictions” variants.

Thanks to Michael Opoczynski for this lesson.

And thanks to * Cati Kaoe * for the photo.

Greetings from Abapinho.

SAT – The new execution analysis tool

Since I was small I have been using the SE30 transaction for two different things:

  • To analyze a (normally standard) program I don’t know in order to find out what functions it uses, what BADIs it offers, etc;
  • To analyze a program of mine to search for performance problems.

The simple truth is that the SE30 transaction is a total mess. It’s extremely limited and inflexible and it’s useless for any more complex analysis.

The people at SAP seem to agree and have decided to replace it with the fantastic new tool, SAT – ABAP Runtime Analysis, which is more sophisticated all-round. As you might expect, you can access it through the SAT transaction.

If it’s not yet on your system you’ll have to wait for an upgrade. If you already have it, good luck with your research.

Here is a set of screencasts from SAP to teach you how to use the new SAT.

Greetings from Abapinho.

(Português) Depuração telepática

Sorry, this entry is only available in European Portuguese. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

Imagine o seguinte cenário: um utilizador (ou utilizadora) está sentado no escritório dele, a correr uma transacção ou não sei o quê. Tem um problema e chama um programador (ou programadora) para o (ou a) ajudar a entender o que se passa. Normalmente o programador (ou programadora) teria de se deslocar lá, à sala do senhor utilizador (ou senhora utilizadora) e das duas uma: fazer debug no computador dele (ou dela) ou aprender como recriar o problema e depois fazer debug no seu computador.

Uma alternativa muito mais comodista é a seguinte:

  • Ir à transacção SE38;
  • Menu Utilitários -> Opções;
  • Escolher separadores “Editor ABAP” -> “Depuração”;
  • No caixa “Depuração externa” introduzir o código de utilizador de quem se quer bisbilhotar;
  • Criar breakpoints de sistema (não de sessão) no programa a depurar;

Agora é só dizer ao utilizador (ou utilizadora) para desatar a correr o programa lá longe no seu computador. No momento em que, na sessão alheia, for atingido um breakpoint, aparece no ecrã do programador (ou programadora) uma janela de debugger ligada a essa sessão alheia. E já está.

O Abapinho saúda-vos.

(Português) Procurar uma BADI no palheiro

Sorry, this entry is only available in European Portuguese. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

O SAP é um enorme palheiro. E os ABAPers são pessoas que trepam por esse palheiro acima e nele vasculham e escarafuncham em busca de agulhas de todo o género. Às vezes, desesperados, deitam-se a descansar e vêm uma quantidade enorme de bicharocos que vivem no palheiro fazer-lhes comichão. Para evitar que isso aconteça, o Artur Moreira propõe-nos uma série de diferentes técnicas para procurar BADIs neste grande palheiro que é o SAP.

Ler o resto do artigo! »

About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).