"
Supported by

Automatic model just using CTRL-SPACE

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.

You probably already use this feature to avoid having to write the full name of commands or variables in a programme. Here I will show you that the little thing is even smarter than it looks. Check this out.

First declare an instance of any class and write the variable’s name with a pointer to a method:

pattern1

The cursor’s now at the end of the line after the pointer, right? Now do CTRL-SPACE:

pattern2

A list of class methods appears. Cool. But not ground-breaking. Choose one and press ENTER. Then do CTRL-SPACE for the second time:

pattern3

The method you already have then appears. At first glance it seems pointless. But now try ENTER again:

pattern4

And the method’s interface appears. The work is all done for you. It’s a great help, isn’t it?

Thanks to Micael Reis for the tip.

Thanks to Ben Sutherland for the photo.

Greetings from Abapinho.

4 comentários a “Automatic model just using CTRL-SPACE”

  1. RSousa Diz:

    Bem porreiro!
    Mas qual é mesmo esse “Novo Editor” que falas?

  2. Nuno Godinho Diz:

    É o que não é o mais antigo :)

  3. Custodio Diz:

    Ola Nuno,

    Boa dica, como de costume. Voce pode agilizar o processo um pouco. Para isso, apos aparecer a primeira lista de metodos, escolha um deles e pressione SHIFT+TAB.
    Fim. :D

    Abracos,
    Custodio

  4. Nuno Godinho Diz:

    Obrigado Custódio!

Deixe um comentário


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