ADT Keyboard Shortcuts: Productive ABAP Development in Eclipse

Category
DevOps
Published
Author
Johannes

ABAP Development Tools (ADT) in Eclipse offer extensive keyboard shortcuts that significantly increase your development speed. Those who know the most important key combinations navigate faster through code, find errors more efficiently, and save valuable time every day.

Overview: The Most Important Shortcut Categories

CategoryDescriptionMost Important Shortcut
NavigationOpen objects, jumpCtrl+Shift+A
EditingWrite code, formatCtrl+1
DebuggingBreakpoints, step-throughF5, F6, F7, F8
RefactoringRename, extractAlt+Shift+R
SearchFind text and objectsCtrl+H

Navigation is the key to productivity. With these shortcuts, you’ll quickly find any code:

Open and Find Objects

ShortcutActionDescription
Ctrl+Shift+AOpen ABAP Development ObjectOpens any ABAP object
Ctrl+Shift+TOpen TypeOpens class or interface
Ctrl+Shift+ROpen ResourceOpens any file
Ctrl+EShow Open EditorsList of all open editors
Ctrl+F6Next EditorSwitch between editors
Ctrl+Shift+F6Previous EditorPrevious editor
Tip: Ctrl+Shift+A with wildcards
Input: ZCL_*HANDLER
Finds: ZCL_MY_HANDLER, ZCL_EVENT_HANDLER, etc.
Input: *BOOKING*
Finds: All objects with "BOOKING" in the name
ShortcutActionDescription
F3Open DeclarationJump to definition
Ctrl+ClickNavigate to DeclarationLike F3, but with mouse
Alt+LeftBackBack to previous position
Alt+RightForwardForward to next position
Ctrl+QLast Edit LocationTo last edit
Ctrl+LGo to LineJump to specific line
Ctrl+Shift+PMatching BracketTo matching bracket
" Example: Navigation with F3
CLASS zcl_order_processor DEFINITION.
PUBLIC SECTION.
METHODS process_order
IMPORTING
io_order TYPE REF TO zif_order. " F3 on zif_order -> opens interface
ENDCLASS.
CLASS zcl_order_processor IMPLEMENTATION.
METHOD process_order.
DATA(lv_status) = io_order->get_status( ). " F3 on get_status -> jumps to method
IF lv_status = zif_order=>co_status_new. " F3 on co_status_new -> to constant
io_order->validate( ).
ENDIF.
ENDMETHOD.
ENDCLASS.

Outline and Structure

ShortcutActionDescription
Ctrl+OQuick OutlineQuick overview of methods
Ctrl+F3Open StructureStructured view
Ctrl+Shift+DownNext MemberNext method/attribute
Ctrl+Shift+UpPrevious MemberPrevious method/attribute
Ctrl+O Workflow:
1. Press Ctrl+O -> Outline opens
2. Type method name -> Filter active
3. Enter -> Jump directly to method
Especially useful for large classes with many methods!

Editing Shortcuts

These shortcuts speed up writing and editing code:

Code Completion and Quick Fixes

ShortcutActionDescription
Ctrl+SpaceContent AssistCode completion
Ctrl+1Quick FixQuick error fix
Ctrl+Shift+SpaceParameter HintsShow parameter info
Alt+/Word CompletionComplete word from buffer
" Ctrl+Space examples:
" 1. Complete method names
DATA(lo_processor) = NEW zcl_order_processor( ).
lo_processor->pr " Ctrl+Space -> process_order, prepare_data, etc.
" 2. Variables and fields
DATA: lv_customer TYPE kunnr.
lv_cu " Ctrl+Space -> lv_customer
" 3. SQL fields
SELECT car " Ctrl+Space -> carrier_id, carrier_name from table
FROM /dmo/flight
INTO TABLE @DATA(lt_flights).
" Ctrl+1 Quick Fix examples:
" - Implement missing method
" - Declare variable
" - Add import parameter
" - Correct type

Edit Text

ShortcutActionDescription
Ctrl+DDelete LineDelete line
Ctrl+Shift+EnterInsert Line AboveNew line above
Ctrl+EnterInsert Line BelowNew line below
Alt+UpMove Line UpMove line up
Alt+DownMove Line DownMove line down
Ctrl+Alt+UpDuplicate Line UpCopy line up
Ctrl+Alt+DownDuplicate Line DownCopy line down
Ctrl+Shift+YTo UppercaseConvert to uppercase
Ctrl+Shift+XTo LowercaseConvert to lowercase
Move lines with Alt+Up/Down:
BEFORE:
lv_result = lv_a + lv_b.
lv_a = 10.
lv_b = 20.
Cursor on "lv_a = 10." -> Alt+Up twice
AFTER:
lv_a = 10.
lv_b = 20.
lv_result = lv_a + lv_b.

Selection and Formatting

ShortcutActionDescription
Ctrl+ASelect AllSelect all
Ctrl+Shift+EndSelect to EndSelect to end
Ctrl+Shift+HomeSelect to BeginningSelect to beginning
Alt+Shift+AToggle Block SelectionBlock selection
Shift+F1Pretty PrintFormat ABAP code
Ctrl+Shift+FFormat SourceFormat source
Ctrl+/Toggle CommentComment on/off
Ctrl+Shift+/Add Block CommentBlock comment
" Block selection (Alt+Shift+A) for multi-cursor editing:
" BEFORE:
DATA lv_field1 TYPE string.
DATA lv_field2 TYPE string.
DATA lv_field3 TYPE string.
" Alt+Shift+A -> Block mode
" Place cursor before 'string', extend down
" Replace all 'string' with 'i' simultaneously:
" AFTER:
DATA lv_field1 TYPE i.
DATA lv_field2 TYPE i.
DATA lv_field3 TYPE i.

Save and Activate

ShortcutActionDescription
Ctrl+SSaveSave
Ctrl+F3ActivateActivate object
Ctrl+Shift+F3Activate AllActivate all inactive
Ctrl+F2Check (Syntax Check)Check syntax

Search and Replace

ShortcutActionDescription
Ctrl+FFindSearch in editor
Ctrl+KFind NextNext occurrence
Ctrl+Shift+KFind PreviousPrevious occurrence
Ctrl+HSearch DialogAdvanced search
Ctrl+Shift+GFind ReferencesFind usages
Ctrl+GFind DeclarationsFind declarations
Ctrl+H search options:
1. ABAP Search
- Object Name Search
- Where-Used List
- Full-Text Search in Sources
2. File Search
- Search in files in workspace
3. Select scope:
- Workspace
- Project
- Selected Package

Debugging Shortcuts

Efficient debugging is possible with these shortcuts:

Manage Breakpoints

ShortcutActionDescription
Ctrl+Shift+BToggle BreakpointSet/remove breakpoint
Ctrl+Alt+BSkip All BreakpointsDisable breakpoints
Ctrl+Shift+F8Debug ConfigurationsDebug configuration
" Breakpoint types in ADT:
" 1. Line Breakpoint (Ctrl+Shift+B)
" Stops at this line
" 2. Conditional Breakpoint (Right-click -> Breakpoint Properties)
METHOD process_items.
LOOP AT it_items ASSIGNING FIELD-SYMBOL(<item>).
" Breakpoint with condition: <item>-amount > 1000
process_single_item( <item> ).
ENDLOOP.
ENDMETHOD.
" 3. Watchpoint
" Stops when variable changes

Control Debug Session

ShortcutActionDescription
F5Step IntoStep into method
F6Step OverStep over method
F7Step ReturnStep out of method
F8ResumeUntil next breakpoint
Ctrl+F2TerminateEnd debug session
F11DebugStart debug
Ctrl+RRun to LineRun to cursor position
Debug workflow example:
1. Set breakpoint (Ctrl+Shift+B)
2. Start test or run app
3. Debugger stops at breakpoint
4. Inspect variables (Variables View)
5. F6 -> Next line
6. F5 -> Into method
7. F7 -> Back out of method
8. F8 -> Continue to next breakpoint

Variables and Expressions

ShortcutActionDescription
Ctrl+Shift+DDisplay VariableDisplay variable
Ctrl+Shift+IInspectInspect variable
Ctrl+Alt+IAdd to WatchesAdd to watches

Refactoring Shortcuts

ShortcutActionDescription
Alt+Shift+RRenameRename (refactor-safe)
Alt+Shift+MExtract MethodExtract method
Alt+Shift+LExtract Local VariableExtract variable
Alt+Shift+IInlineInline variable/method
" Rename Refactoring (Alt+Shift+R):
" BEFORE:
CLASS zcl_calc IMPLEMENTATION.
METHOD calculate.
DATA lv_tmp TYPE i. " Cursor here
lv_tmp = iv_a + iv_b.
rv_result = lv_tmp * 2.
ENDMETHOD.
ENDCLASS.
" Alt+Shift+R -> Enter "lv_sum" -> Enter
" AFTER (automatically renamed all occurrences):
CLASS zcl_calc IMPLEMENTATION.
METHOD calculate.
DATA lv_sum TYPE i.
lv_sum = iv_a + iv_b.
rv_result = lv_sum * 2.
ENDMETHOD.
ENDCLASS.
" Extract Method (Alt+Shift+M):
" BEFORE:
METHOD process_order.
" Select these lines:
DATA(lv_discount) = 0.
IF iv_order-amount > 1000.
lv_discount = iv_order-amount * '0.1'.
ELSEIF iv_order-amount > 500.
lv_discount = iv_order-amount * '0.05'.
ENDIF.
rv_total = iv_order-amount - lv_discount.
ENDMETHOD.
" Alt+Shift+M -> Method name "calculate_discount" -> Enter
" AFTER:
METHOD process_order.
DATA(lv_discount) = calculate_discount( iv_order-amount ).
rv_total = iv_order-amount - lv_discount.
ENDMETHOD.
METHOD calculate_discount.
IF iv_amount > 1000.
rv_discount = iv_amount * '0.1'.
ELSEIF iv_amount > 500.
rv_discount = iv_amount * '0.05'.
ELSE.
rv_discount = 0.
ENDIF.
ENDMETHOD.

View and Perspectives

ShortcutActionDescription
Ctrl+MMaximize/Restore ViewMaximize editor
Ctrl+F7Next ViewNext view
Ctrl+F8Next PerspectiveNext perspective
F12Activate EditorActivate editor
Ctrl+3Quick AccessQuick access to everything
Ctrl+3 Quick Access:
The most powerful shortcut in Eclipse!
1. Press Ctrl+3
2. Input: "show where"
3. Result: "Where-Used List" command is offered
4. Enter -> Execute
Works for:
- Commands
- Views
- Preferences
- Wizards
- Perspectives

ABAP-Specific Shortcuts

ShortcutActionDescription
Ctrl+Shift+F2Run Unit TestsExecute unit tests
Ctrl+Shift+F11Run ATC CheckStart ATC check
Ctrl+F9Execute as Console AppRun as console
F9ExecuteExecute
Ctrl+Shift+F10Run As MenuExecution options
" Unit Test Workflow:
CLASS ltc_calculator DEFINITION
FOR TESTING
RISK LEVEL HARMLESS
DURATION SHORT.
PRIVATE SECTION.
DATA: mo_cut TYPE REF TO zcl_calculator.
METHODS: setup.
METHODS: test_addition FOR TESTING.
ENDCLASS.
" Cursor in class -> Ctrl+Shift+F2 -> Tests are executed
" Result appears in ABAP Unit View

Setting Up Custom Shortcuts

You can define your own shortcuts and customize existing ones:

Customize Shortcuts

Open Shortcut Editor:
1. Window -> Preferences (Ctrl+,)
2. General -> Keys
3. Search for shortcut or create new
ActionStandardRecommendation
ActivateCtrl+F3Ctrl+Shift+S (save+activate)
Format SourceShift+F1Ctrl+Shift+F (like in other IDEs)
Run Unit TestsCtrl+Shift+F2Ctrl+T
Where-UsedCtrl+Shift+GCtrl+U

Create Binding

Create new shortcut:
1. Window -> Preferences -> General -> Keys
2. Enter "Where-Used" in filter
3. Select command
4. Enter desired key combination in "Binding"
5. Set "When" to "ABAP Editing"
6. Apply and Close

Export Scheme

Save and share shortcuts:
1. Preferences -> General -> Keys
2. Click "Export CSV"
3. Save file
Restore:
1. Click "Import CSV"
2. Select file

Shortcuts Cheat Sheet

The 20 Most Important ADT Shortcuts

#ShortcutAction
1Ctrl+Shift+AOpen ABAP object
2F3Jump to definition
3Alt+LeftNavigate back
4Ctrl+OQuick Outline
5Ctrl+SpaceCode Completion
6Ctrl+1Quick Fix
7Ctrl+SSave
8Ctrl+F3Activate
9Shift+F1Pretty Print
10Ctrl+/Comment Toggle
11Ctrl+DDelete line
12Alt+Up/DownMove line
13Ctrl+HSearch
14Ctrl+Shift+GFind usages
15Ctrl+Shift+BBreakpoint Toggle
16F5Step Into
17F6Step Over
18F8Resume
19Alt+Shift+RRename Refactoring
20Ctrl+3Quick Access

Printable Quick Reference

+-------------------------------------------------------------+
| ADT KEYBOARD SHORTCUTS |
+-------------------------------------------------------------+
| NAVIGATION | EDITING |
| Ctrl+Shift+A Open Object | Ctrl+Space Completion |
| F3 Go to Def | Ctrl+1 Quick Fix |
| Alt+Left Back | Ctrl+S Save |
| Ctrl+O Outline | Ctrl+F3 Activate |
| Ctrl+L Go to Line | Shift+F1 Format |
+-------------------------------------------------------------+
| DEBUGGING | SEARCH |
| Ctrl+Shift+B Breakpoint | Ctrl+H Search |
| F5 Step Into | Ctrl+Shift+G Where-Used |
| F6 Step Over | Ctrl+F Find |
| F7 Step Return | Ctrl+K Find Next |
| F8 Resume | Ctrl+3 Quick Access |
+-------------------------------------------------------------+
| REFACTORING | EDITING |
| Alt+Shift+R Rename | Ctrl+D Delete Line |
| Alt+Shift+M Extract Meth | Alt+Up Move Line Up |
| Alt+Shift+L Extract Var | Ctrl+/ Comment |
+-------------------------------------------------------------+

Tips for Maximum Productivity

1. Learn Gradually

Week 1: Navigation
- Use Ctrl+Shift+A, F3, Alt+Left daily
Week 2: Editing
- Internalize Ctrl+Space, Ctrl+1, Ctrl+S, Ctrl+F3
Week 3: Debugging
- Train breakpoints and step commands
Week 4: Refactoring
- Apply Alt+Shift+R and Alt+Shift+M

2. Hands on Keyboard

The mouse is the enemy of productivity.
Every mouse movement costs time.
Rule: When you reach for the mouse, ask yourself:
"Is there a shortcut for this?"
Usually: Yes! -> Ctrl+3 helps find it

3. Print Shortcuts

Print the cheat sheet and stick it next to your monitor.
After 2 weeks, you'll know the most important shortcuts by heart.

Conclusion

ADT Keyboard Shortcuts are the key to productive ABAP development:

  • Navigation with Ctrl+Shift+A and F3 saves enormous time
  • Editing with Ctrl+Space and Ctrl+1 speeds up coding
  • Debugging with F5-F8 makes error finding efficient
  • Refactoring with Alt+Shift+R keeps code clean

Invest time in learning shortcuts - it pays off every day.

Further Reading