How to avoid timeout when running a program
Usually SAP systems have a predefined time limit for running a program interactively. If the program takes longer to run than that you’ll get a runtime execution error. A dump.
Usually SAP systems have a predefined time limit for running a program interactively. If the program takes longer to run than that you’ll get a runtime execution error. A dump.
A long time ago transaction SE17 was used to look at database tables content. They quickly felt ashamed and decided to improve it, creating SE16. When ALV was invented, SE16N was released (although until today many people still use SE16, go figure!).
Today I present you SE16H.
If you are one of those persons who still uses SE16, this article is not for you. If you keep reading, you might find yet another reason to finally start using SE16N (as if all others were not enough already).
Imagine that you want to select all materials whose name contains “PREGO” and whose type is “FERRAGENS”, and all materials whose name contains “GUARDANAPO” and whose type is “COMIDA”. In other words, “PREGO_NO_PAO” or “GUARDANAPO_PAPEL” won’t be part of the result set. What you want is this:
(MATNR = “PREGO%” AND MTART = “FERR” ) OR (MATNR = “GUARDANAPO%” AND MAKT = “COMI” )
As you know, using SE16N in a regular way (which doesn’t use what I’m about to show you) you would need to execute it twice and manually compare data, because the selection screen does not allow you to make multiple OR selections.
Or does it?
[:pt]Sabias que quando invocas uma função com a opção DESTINATION ‘NONE’ estás a iniciar uma nova LUW? Isto pode parecer apenas uma curiosidade, mas há um caso em que pode fazer toda a diferença: sabes aqueles módulos de função que ao serem chamados uma segunda vez têm um comportamento diferente da primeira vez? Isto acontece porque eles hão-de ter alterado alguma variável global ao grupo de funções. Ora se iniciares uma nova LUW quando chamares a função, o seu grupo de funções é automaticamente inicializado e assim garantes que o comportamento da função é o esperado.
There are standard functions that trigger messages where they shouldn’t. And they shouldn’t because we want to use these functions in non-interactive programs and then, instead of returning the error, an error message is triggered and ruins the whole process.
However, being aware of this problem, SAP has provided a quite elegant (but not well documented) way of solving this problem.
SAP doesn’t know how to do things right the first time. The WebDynpros are a good example of this. It doesn’t even let you do a text search. It’s sad.
Fortunately Sérgio Fraga has found a way, though it’s rather laboured:
No matter how many times things go around in ABAP, everything ends up in SE38. Even the methods of the ABAP classes are saved in includes.
Sometimes, when there is a dump, it says the problem is, for example, here: CL_MESSAGE_HELPER=============CM001.
You’ve released a transport order because you thought everything was ready. However, one more minor modification was still missing. So now you will have to create a new order and transport both of them. What a drag.
Don’t worry.
The ABAP editor has many curious functionalities. You can even write in multiple lines at the same time.
Do you know the difference between a mystery and an enigma puzzle? An enigma puzzle is known to have a solution, but with a mystery you don’t know if there is solution.
Do you agree with this? 5 * 3 / 10 = ( 5 * 3 ) / 10 = 5 * ( 3 / 10 ) = 1.5
If you don’t, you should agree because it is a mathematical fact.
Now let’s do some experiments.
A friend of a friend of a friend said that a friend of his knew a friend who explained to him in a shady club bar in the docks area of Lisbon how to steal data from a SALV.
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.
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.