Show TOC

Code CompletionLocate this document in the navigation structure

Use

Code completion suggests valid keywords and identifiers that may be inserted at a given position in the source code. To invoke code completion, press and hold down the CONTROL key while pressing the SPACE key.

Features

Completion results include the following source code entities (each of them has a unique icon):

  • Variables, including structures and components

  • Types (local and dictionary types)

  • Interfaces and classes (local and global), exception classes

  • Components of classes, interfaces, implemented interfaces, structures, BAdIs

  • Function modules

  • Methods, attributes, constants

  • Forms

  • Functions

  • Formal parameters of methods, functions, and forms

  • Keywords

  • Non-keywords used already in the editor.

The items displayed in boldface represent entities matching the requirements for source code entities at the current cursor position. All other items represent entities containing additional entities that may also match the requirements.

The suggestions can be filtered according to:

  • Category (field, type, method)

  • Specific role within a category

  • Read and write access for fields

  • Visibility (including friends)

  • Static and instance components

In the example above, the interface IF_SERIALIZABLE_OBJECT may contain additional class methods that can be accessed by inserting the interface name at the current cursor position.

Note

To disable code hints and/or code completion, deselect the appropriate checkboxes in the settings dialog. For more information, see Code Completion Settings.

Activities
  • When the list of code completion suggestions appears, you can continue typing to filter the list of suggestions by prefix.

  • For some completion suggestions, pressing Ctrl + Enter will not only insert the identifier but also generate a partially pre-filled pattern.