Category > Tips & tricks
Supported by
Supported by Inetum

Menu search

images/thumbnail.jpg - Thumbnail

Did you know that is possible to search in SAP menus? Probably yes. Well, I didn’t. I’ve spent years looking through menu S000 searching for the most random stuff imaginable. I’m sure that if I had done menu search I would have found most of them in seconds. Sometimes you just don´t think of the obvious. Thank you Sérgio Fraga for the tip. Greetings from Abapinho.

Dot and comma or comma and dot?

images/thumbnail.jpg - Thumbnail

Some numbers have dots, some numbers have commas and some numbers have dots and commas. The problem is that there are also numbers that have commas and dots. The thing is, there are commas that are dots and dots that are commas, depending on where you are from, in other words, depending on user’s configurations. When importing a file with decimal numbers, these numbers’ alpha-numeric fields must be converted into numeric fields.

More RANGEs, less SELECTs

images/thumbnail.jpg - Thumbnail

The dictionary has the following entry for “style”: “set of formal aspects and expressive resources that characterise a text.”

It is preferable to read a text with style than one without. If ABAP were a language, a program in ABAP would be a text. When it comes to style, there are programs that seem to have been written by the feet, while there are others that one would swear the quill that wrote them was guided by the pure hand of an eighteenth century lady plagued by the troubles of love. Fortunately, I think it’s not possible to write programs in ABAP as tacky as the last sentence.

The “style” label is used here in Abapinho to identify articles that talk about just that: style. These articles try to find ways to improve the style of ABAP programs. This is one of Abapinho’s favourite labels, as you can see here. And what you are reading is another of those articles.

Moving on.

Slash O

images/thumbnail.jpg - Thumbnail

Throughout all my “SAP life” I’ve used the command /olalala to initiate the lalala transaction in a new GUI window. Until now I had never tried just writing /o. I did today. The result was interesting. Meaning, it’s the same as going to SM04 and then choosing our user. But much easier. Greetings from Abapinho

Gregarious constants

images/thumbnail.jpg - Thumbnail

If you are one of those who insert the values directly in code instead of using constants, then read no more and go and stand over there in the corner on punishment for 1 hour to learn not to be lazy. If you’ve come back from punishment or you usually use constants, then please continue reading.

Your password has expired. Change it 5 times.

images/thumbnail.jpg - Thumbnail

It is not uncommon for us to be emotionally attached to our passwords. Therefore, it is always rather painful to receive those despicable threatening notices that say “your password is going to expire”. Soon followed by the blow we receive to our heart on the appearance of the inevitable vile invective that “your password has expired.” At such times, the hurt is so great that all the muses leave us, we have imagination cramp and remain stuck there, staring and drained, emptied of any idea to help us choose our next password.

Client or Customer?

images/thumbnail.jpg - Thumbnail

Wherever you use the data element KUNNR, its descriptions is “Client”. And what if we wanted to change this field description from “Client” to “Customer”? “Customer" is so much nicer! Or let’s suppose that the company you work for is trafficking in drugs and tells you that they want “Dealer” rather than “Supplier” to appear in the LIFNR field. Obviously we can label it as we wish on screens and Z reports but what about standard transactions?

Adding buttons to the selection screen

images/thumbnail.jpg - Thumbnail

Normally, when buttons must be generated for users to click, Screen Painter is used to create a screen which is then invoked by the report using CALL SCREEN. But, unless the screen being designed is already quite complex it is pointless creating a screen which will have no further use. Screens have always annoyed me.

I will demonstrate an example of using buttons on a completely normal selection screen resorting to a button called PUSHBUTTON and a very clever trick called ONLI.

Fill up the selection screen with cartoons

images/thumbnail.jpg - Thumbnail

Was SAP born miserable or are SAP-users simply unable to cheer it up?

The truth is that SAP GUI is no rainbow and neither does looking at it bring happiness. Even so, it puts at our disposal a bunch of cartoons that we may use to make it just a little more uplifting.

And take a look at just how easy it is.

Oh time turn back

images/thumbnail.jpg - Thumbnail

“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.

F1 + F9 = Technical Information

images/thumbnail.jpg - Thumbnail

In a functional screen I often feel the need to see technical information about a particular field. I place the cursor on the field I want, then I click on F1 and a dialog screen will appear with help for that field. Then I click on the button that says “technical information”.But there is a quick way to do the same thing using only the keyboard. There are two possible ways for F1 to display the help for one specific field:

When an internal table is not structured

images/thumbnail.jpg - Thumbnail

When you want to select some lines in an internal table you normally do something like this: DATA: BEGIN OF itbl, campo1 TYPE c, campo2 TYPE c, END OF itbl. READ TABLE itbl WITH KEY campo1 = 'X' campo2 = 'Y'. LOOP AT itbl WHERE campo1 = 'X' and campo2 = 'Y'. COISO. ENDLOOP. But what if the table is not structured and you want to search on the line as a whole?

Create test variants within functions from the debugger

images/thumbnail.jpg - Thumbnail

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:

The SAPGui history does not work even when active?

images/thumbnail.jpg - Thumbnail

Has it ever happened to you that SAPGui does not store a history of values that you input to various fields even though the History option is actived in the settings?

SE80 has favourites

images/thumbnail.jpg - Thumbnail

The SE80 transaction contains everything. It seems like those village grocery stores crammed with junk where you can buy toothpaste, bread, shoes, perfume and rice in bulk. I like these grocery stores. But to go there you need to know where you are going, otherwise you’ll walk from pillar to post. But this is what it’s like in these grocery stores but in SE80…. there are favourites. Yes indeed there are.