Copyright 2024 - BV TallVision IT

The Abap editor (SE38) is where our creations are developed. Here's an overview of handy shortcuts that you really should know about. From toggle between upper and lower cased to statement option suggestions to bookmarks. 

Below you'll find quite common shortcuts that you will find on any system. There's an article on adding your own shortcuts in the editor as well, shortcuts that can make an abapper life easier and an overview of all shortcuts

Navigation

+ / Jump to command box
+ O Go to line
+ [ Go to previous paragraph
+ ] Go to next paragraph

Navigation: bookmarks

The editor also has bookmarks, which can be set or navigated to with numbered shortcuts and an unmarked shortcut. Very handy, but your bookmarks live only as long as your editor session. Nevertheless, bookmarks !

+ M Go to the next bookmark
+ + M Go to the previous bookmark
+ 2 Go to bookmark 2, applies to 0 to 9
+ + 2 Toggle bookmark 2, applies to 0 to 9

Bookmarks can be a great help, but they also have limitations they shouldn't have, so SAP: listen up. If your coding is cut up in different includes, the bookmarks you set in an include are lost the moment you step out. Thus bookmarks are only helpful in a single source. As long as you don't step out. Limited. In practice:not very useful.

Editing

+ SPACE Statement options: suggest available options for the selected statement
+ ENTER Code hints
+ D Duplicate line
+ + T Swap current line with above line
+ + L Delete line
+ U Upper case selection
+ J Camel Case Selection
+ K Toggle UPPER and lower selection
+ L Lower case selection
+ > or
+ \
Comment line or selection
+ < or
+ + \
UNcomment line or selection
 +  + num 8 Move the lines up in the editor window while the cursor stays in the same place
 +  + num 2 Move the lines down in the editor window while the cursor stays in the same place

Outlining

+ num * Toggle Outlining
+ + num - Collapse All
+ + num + Open all

Miscellaneous

+ + O Show the settings dialog (also: bottom right on the editor screen)
+ Z Undo last action
+ Y Redo last action
+ + S Save code on PC (.abap download)
+ + P Show a print preview (of your Abap coding)

Segment-selection

The key combination + Selection allows you to select a segment from the coding in the editor. Simply place your cursor somewhere on a line and drag it to another position, creating a selection square. This would typically look like this:

SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pa_save AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 4(20) box_00 FOR FIELD pa_save.
PARAMETERS: pa_filen TYPE c LENGTH 100 LOWER CASE.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 4.
PARAMETERS: pa_add AS CHECKBOX DEFAULT space.
SELECTION-SCREEN COMMENT 8(26) box_00_1 FOR FIELD pa_add.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 4.
PARAMETERS: pa_xls AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 8(26) box_00_2 FOR FIELD pa_xls.
SELECTION-SCREEN END OF LINE.

When the selection is copied ( + C), this will be placed on the clipboard:

ION-SCREEN COMMENT 4(20 
TERS: pa_filen TYPE c L 
ION-SCREEN END OF LINE. 
ION-SCREEN BEGIN OF LIN 
ION-SCREEN POSITION 4. 
TERS: pa_add AS CHECKBO 
ION-SCREEN COMMENT 8(26 
ION-SCREEN END OF LINE. 

Now this may seem strange - but it demonstrates how the segment selection works. It is a very handy feature when setting up data definitions, where field names of your type definition are derived from the field names on tables. Keep it in mind, this is handy stuff.

Also note the behavior when pasting ( + V) segment-selection data. It won't overwrite what is already there. Play around with it and see for yourselves, a much better approach than me trying to explain it to you.