Block indent
To indent a block of lines do the following:
To indent a block of lines do the following:
I keep learning new transaction commands. Today I learned some which solve a problem which, although rarely, has happened to me in the past.
Did this happen to you? You make a change to a text of a data element you’re using in a table to be edited through SM30. But when you go and edit that table in SM30 the old text is still there. You activate objects, close windows, open windows, no matter what you do, the new text is not shown.
Of course you already know the “Model” button in the ABAP editor that allows you to automatically add models for function modules, calls for methods and others.
The new editor has now grown a bit (it’s now only 10 years behind Eclipse instead of 20) and it allows you to automatically complete some commands through the CTRL-SPACE shortcut.
When you touch an object and add it to a transport request, it becomes locked there by default. In a transport request you can also lock objects which are not yet locked in another order. But, once locked, how to unlock them?
Sweet little trick: when in SE38 you need to surround a word or expression with () or [] or ‘’, just select it and press ( or [ or ' and it immediately becomes (it) or [it] or ‘it’. Thank you Sérgio Fraga for the tip.
You are looking at a class in SE24, a table in SE11 or a program in SE80. Now you want to see the package of this object and its content. Until recently, I would do this: first I would look in the object’s characteristics to see its package, then open a new session, go to SE80 and write the package there.
Now I’ve learned a much easier way.
The other day, a series of things crashed in our test machine. All of a sudden, no one could work on it. We found a series of transport requests improperly transported to STMS. The user who appears to be associated with each of these requests is its owner. But is it the owner’s fault? Didn’t someone else do the transport?
How can we find out?
Hi. How’ve you been? How’s life? All cool? This tip is so simple that if we don’t talk for a while it will all end too quickly. The sun is shinning. It rained in the morning but now it stopped. Moving on. Every time I see someone still using SE16 I wonder why, since SE16N is so much better and already exists for so long. But this is not the tip.
When you try to delete a package where you have created objects that have meanwhile been deleted, and the package looks empty in SE80, when you try to delete it, it won’t work because it says the package still contains objects.
For some silly reason, SE80 does not show every type of object associated with packages. In addition, when an object is deleted, its entry is often times not deleted correctly. SAP is full of shortcomings. But it’s what we have, and it’s what brings us the bacon, so let’s not say too many bad things about it.
Abapinho has the solution for you.
Simple tip to speed up entering data in (some) fields.
An easy way of programmatically accessing the texts of any program: DATA: t_textos TYPE TABLE OF textpool. READ TEXTPOOL sy-repid INTO t_textos LANGUAGE sy-langu STATE 'A’. Now, you have all of the texts available in the internal table T_TEXTOS. As if this were not enough, you can also change the texts programmatically with the following commands: INSERT TEXTPOOL sy-repid FROM t_textos LANGUAGE sy-langu. DELETE TEXTPOOL PROGRAM LANGUAGE 'E’. According to SAP, these last two commands are for internal use only.
ABAP programmers don’t explore the possibilities of SQL, probably for historical reasons. There are many who instead of using INNER JOINs still think it’s faster to do several SELECTs for internal tables and then process the data in ABAP. But the truth is that even if there are exceptions, the rule is: the lower the number of accesses to the database, the better the performance. And it makes sense because, after all, they were written explicitly for this; relational databases are much more adept at processing relational data than an ABAP program.
There are of course things that, due to their complexity, cannot be done with a simple INNER JOIN. Nevertheless, some of these things can be done in a single SELECT.
Here’s a cool mini-function to obtain some details of a remote system accessible by RFC: RFC_SYSTEM_INFO I cannot give any example here because it would reveal very important secret information about my client which would certainly be used by the baddies to perform industrial espionage. But it is easy to test in SE37. Thanks to kingofthebigmacs for the photo. Greetings from Abapinho.
There are countless standard functions to make calculations with dates. There are too many of them, they are redundant and, in many cases, they are obscure or impossible to understand. I’ve been meaning to insert an article here with a list of the most useful ones. But now it’s no longer necessary.
Here’s a simple way to start debugging a job: Go to transaction SM37; Click on the job you want to debug; type JDBG in the command line (without /) and press ENTER; and… bang! you’re now debugging the job. Thank you Ricardo Monteiro for the tip. And thank you Ingolf for the photo. Greetings from Abapinho