Tag > sapgui
Supported by
Supported by Inetum

Spot the differences with SE39

images/thumbnail.jpg - Thumbnail

Earlier today I was doing a QC review to a new program named ZSDFAKSPE with almost 1000 lines and no comment whatsoever. An obvious clone of a standard program called SDFAKSPE.

So I decided to use the Spli-screen editor, found in transaction SE39. Having entered both programs I could then compare them side-by-side.

Source-code based class development

images/thumbnail.jpg - Thumbnail

Being used to develop in Java and C++, the way transaction SE24 forces you to navigate between each of its parts and the fact that every method has its own include was very confusing to me when I first started using it. Why does SAP always have to make things so complicated? I eventually got used to it. At some point in time SE24 introduced the option source-code based which shows the class and all its methods in a single text.

Jump to your last change

images/thumbnail.jpg - Thumbnail

Imagine that you’re editing one of those ancient programs with thousands of lines (yes because today you know that it’s wrong not to modularize (it’s a sin really) your methods (yes because today you always use methods) don’t have more than 200 lines).

Disable value history for a single field

images/thumbnail.jpg - Thumbnail

SapGUI usually keeps a history of the last values entered on each field. This is usually a good thing. But you may very well not want it to happen (in case you’re entering pornographic values in a specific field for example). You could always turn it off globally in the SapGUI settings.

But what if you just want to disable it in one particular field? Abapinho tells you how to do it.

Class CL_GUI_FRONTEND_SERVICES

images/thumbnail.jpg - Thumbnail

Class CL_GUI_FRONTEND_SERVICES is commonly used to upload and download files from and to the user’s local computer. But it can do many more good things. For example:

SAP can take selfies!

images/thumbnail.jpg - Thumbnail

I just found out that SAP can take selfies. I still don’t see why one would need it. But that’s understandable because I never really understood the need for selfies anyway.

Here’s how SAP can take a selfie:

Is the GUI available?

images/thumbnail.jpg - Thumbnail

To check if a program is running in background usually one takes a peek at SY-BATCH. SY-BINPT can also be used to check if the background program is a BDC session. You usually check one of these.

There is a similar but not exactly equal question, though. How do you ask if the GUI is available? Most times both questions will have the same answer. But not always.

It’s like saying the Sun can be seen during the day while the Moon can be seen during the night. If the sky is cloudy you won’t be seeing them.

How to avoid timeout when running a program

images/thumbnail.jpg - Thumbnail

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.

Shortcuts for making small and big letters

images/thumbnail.jpg - Thumbnail

You may not even know how to program but if you’re able to type fast and know enough keyboard shortcuts everyone will think you’re an expert. In the ABAP editor write the following word: subdermatoglyphic Now try the following shortcuts: CTRL+U: SUBDERMATOGLYPHIC BIG LETTERS! UPPER CASE! CTRL+L: subdermatoglyphic small letters! lower case! CTRL+J: Subdermatoglyphic The First Letter Of Each Word In Upper case! CTRL+K: sUBDERMATOGLYPHIC tHe BiG aRe NoW sMaLl AnD tHe SmAlL ArE nOw BiG!

Multiple OR selections in SE16N

images/thumbnail.jpg - Thumbnail

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?

Write in multiple lines at the same time

images/thumbnail.jpg - Thumbnail

The ABAP editor has many curious functionalities. You can even write in multiple lines at the same time.

Block indent

images/thumbnail.jpg - Thumbnail

To indent a block of lines do the following:

Clearing the buffers of an SAP session

images/thumbnail.jpg - Thumbnail

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.

Automatic model just using CTRL-SPACE

images/thumbnail.jpg - Thumbnail

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.

Put it between parentheses

images/thumbnail.jpg - Thumbnail

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.