"
Etiqueta > SAPgui
Supported by

Shortcut to save list local file

SAP is full of hidden corners rarely visited. Abapinho is happy to shed some light on them.

The command %pc is equivalent to the menu option System/List/Save/Local file:

Ler o resto do artigo! »

Abracadabra reveals secret parameter

Here’s a not very orthodox wat to deal with a report’s selection screen.

Sometimes you may need to have a special parameter which you prefer to hide from normal users but still need access to. Example: a flag to activate a debug/trace mode. I’ll show you how you can do this by just typing the magic word, ABRACADABRA.

It goes like this:


DATA: unhide_parameters TYPE flag.

PARAMETERS: p_debug AS CHECKBOX.

AT SELECTION-SCREEN.
  CASE sy-ucomm.
    WHEN 'ABRACADABRA'.
      unhide_parameters = abap_true.
    WHEN 'NORMAL'.
      CLEAR unhide_parameters.
  ENDCASE.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'P_DEBUG' AND unhide_parameters IS INITIAL.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Just type ABRACADABRA when you’re at the selection screen and your secret parameter will magically show. If needed, you can then type NORMAL to make it disappear again.

O Abapinho saúda-vos.

Go into a transaction skipping its selection screen

Once again SAPGui surprises me with yet another obscure shortcut I didn’t know about.

Let’s use the customer display transaction XD03 as an example:

  1. Go into the transaction’s selection screen with /NXD03
  2. Fill in the customer number an press ENTER to display its details
  3. Do whatever it is you want to do there and get out of it
  4. Suddenly… you remember that you needed to do something else there
  5. Instead of /NXD03 type /*XD03
  6. You’re now automagically inside the transaction, already looking at the details of the last displayed customer

It’s surprising that no one ever told me about this before.

I also tried it with FB03 and it works so it probably works with most of the normal transactions. Unfortunately, it doesn’t work with the ones I use the most: SE24, SE38 e SE11. What a pity.

Now go and tell everyone about this!

Thank you Sérgio Fraga for the tip.

Photo credit: Leonard J Matthews.

Greetings from Abapinho.

Copy a Code Inspector variant to another system

In my current customer, I have three development systems. There used to be only one. And that’s where I customized and fine tuned the Code Inspector variant I use to run Abap Test Cockpit.

When the other two appeared, before manually copying the variant into them, I decided to investigate a little bit. Much to my surprise, I found in GitHun project upDOWNci which does exactly what I needed: export and import Code InspectorLars for making this small but useful tool. Actually, thank you for the dozens of useful tools you’ve already given us. They’re quite impressive.

Greetings from Abapinho.

Automatically close the doors you open

You’re in the editor. You type ( or [ or { or ‘ and SAP is dumb and doesn’t close it right away like a proper IDE would.

Well,

Click on the lower right corner icon which gives you access to the SAPGui options where you configure code templates.

In the formatting option, activate Enable Auto Brackets and voilá, SAP will now automatically close any doors you open.

I don’t see why this isn’t set by default.

Thank you, Sérgio Fraga for the tip.

Greetings from Abapinho.

Ignore indentions when comparing version

Sometimes, when comparing versions, several differences show up even when we did not make changes to the code. These differences may simply be a consequence of a Pretty Printer that altered code indentations. This makes comparing the versions confusing.

But ABAP Workbench lets you configure the diff tool to ignore indentations and even comments.

Just press F5 while there or go to the “Display Format> Settings” menu and adapt it to your needs:

diff

You’re welcome ;)

Greetings from Abapinho.

Create templates in SE80 by dragging stuff into the code

While coding, it’s always good to have ways to speed up what we’re doing. A good one is automatic generation of templates for function and method calls.

I know 3 ways to achieve this.

Ler o resto do artigo! »

Find everything at once

The ABAP editor is full of functionalities yet to be discovered.

When I do CTRL-F to search for text, the option I usually choose is “Find next”.

Ler o resto do artigo! »

Yet another way to see a method’s parameters

Let’s say you want to call a method for which you don’t know the parameters. What do you do?

You used to have to use the “pattern” button. Or open the class in a new window to look at the method’s parameters. But then the ABAP Editor evolved and we got auto-complete which made everything much more easy.

But there is yet another way.

Ler o resto do artigo! »

ABAP Code PushDown in HANA

[Guest post by Artur Moreira]

From ABAP version 7.4, SAP introduced the code pushdown concept, which means using more database for calculations (data aggregation, sums and previous calculations).

Ler o resto do artigo! »

Incremental search

When I want to search for a word in an ABAP program I usually press CTRL-F to use the normal search feature of the ABAP editor. I enter the word I want to find and then press “NEXT” to look for it.

But there is another way. And it’s not better nor worse. Just different: the incremental search.

Ler o resto do artigo! »

Export and import the ABAP Workbench settings

Sometimes a thing is right under your nose and your still don’t see it.

At my current client I daily work with a lot of different systems. When I make a change in a setting of one system, either because I’m lazy or because I forget, I end up not applying it to all the others.

But there is a simple way to copy all the ABAP Workbench settings at once from one system to the other.

Ler o resto do artigo! »

Use the Split Screen Editor in the version comparison

By default, the ABAP version comparison tool is horrible. It displays both versions in a single column and, even though the differences are highlighted, it’s awfully confusing.

But it doesn’t have to be this way.

Press the “settings” button at the top and you’ll find that there are 3 different display modes (besides some other nice options): one-column, two-columns and, surprise, the Split Screen Editor. This is probably the option you’ll want to choose since it’s the most powerful.

config_versions

Greetings from Abapinho.

Spot the differences with SE39

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.

Ler o resto do artigo! »

Source-code based class development

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. But for some reason I never felt comfortable using it.

baseado_em_texto_fonte

Today I think I know why. Because I didn’t know of any form of navigation which would allow me to directly jump to a method’s definition or implementation.

But it is there. Just press CTRL-F5 (or the equivalent toolbar button) and you’ll get this popup:

navegador_de_classe

Now we’re talking. I finally can starting to do source-code based development in ABAP.

And so that it becomes a habit, you can change the ABAP Workbench settings to make this the default mode.

Greetings from Abapinho.


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