Supported by
Supported by Inetum

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.

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.