In this post, you will learn about shortcuts that can be used while using SAPGUI code editor.
The most used shortcuts after copy-paste i.e.
Ctrl + C –
Ctrl + V are probably below 3.
- Pretty Printer
Shift + F1
- Check Syntax
Ctrl + F2
- Activate Object
Ctrl + F3
This is based on my experience and you may find some more useful and some not so much, but here is the list.
Ctrl + Mouse left click (Select any text)
Press and hold
Ctrl, then click on any word, it will get selected.
For selecting the texts, there are few more options.
|Select from the cursor in any direction, one character at a time|
|Select from the cursor in any direction one word at a time|
|Selects from cursor position to the mouse click position. This one is the fastest of all.|
|This is a block selection. Such a cool feature that it is covered in another post.|
trl + D (Duplicate any line)
Put the cursor anywhere on the line to be copied and go for
Ctrl + D and you will get below.
It is helpful while defining types and also in scenarios where you want to call a method multiple times with different parameters, say calling a method to set ALV column texts.
Change Case of the words
Ctrl + L (Selected text to lower case ) and
Ctrl + U (Selected text to upper case)
Suppose your usual coding guidelines say that the key words should be upper case and non-key words should be lowercase. Here, you can go for Pretty Printer using
Shift + F1 but that will not work if you are modifying an existing code and don’t want to change anything other than the code you added. Select LV_SOME_VAR, use
Ctrl + L then select type and use
Ctrl + U
Ctrl + Shift + L OR
Ctrl + Shift + X Delete a line
No more pressing backspace or delete button repetitively get get rid of a line. Put cursor on the line and use the keys.
Then we have few which don’t need any explanation and you are probably already using these.
|Open a search dialog box|
|Open a replace dialog box|
|Save the code|
|Comment the line (to be precise it adds a * at the begin of the line)|
|Un-comment the line (to be precise it removes a * at the begin of the line)|
Comment and un-comment are very useful when working with group of lines. Below is an uncomment example.
Ctrl + Space shows field names or a structure, methods/attributes of a class and so on. Select the one that you want using mouse or arrow keys and press
Tab is also used when a key word is suggested and you want to use it, so this is no different.
Contrary to other posts in this series, this post does not have details on Eclipse shortcuts. Those are covered in a separate post – Working With Eclipse  : Keyboard Shortcuts for ABAP Development in Eclipse.
To know more about such cool features visit ABAP editor page.
If you like the content, please subscribe…