Working with Code Completion
In the ABAP source code editor, the content assist function proposes valid ABAP keywords and identifiers that are relevant at the current position. One of these proposals can be inserted in the source code.
Context
You can reduce the time spent on code editing and ensure that you are using the valid source code elements by using code completion.
The following code completion functions are provided:
| Content Assist | Description |
|---|---|
| Keyword Completion | The best matching ABAP keyword is automatically proposed as soon as you start typing. |
| Non-Keyword Completion | The best matching non-keyword that is available for the corresponding source code section is automatically proposed as soon as you start typing. |
| Code Completion | A list of all matching keywords, identifiers, components, and templates is displayed for the position where you have chosen the Ctrl + Space shortcut. |
Keyword Completion
In the ABAP source code editor, the best matching ABAP keyword is displayed as soon as you start typing the keyword. If you choose the tabulator tab, the keyword is inserted at the current position.
Prerequisites
Context
Procedure
Results
Non-Keyword Completion
In the ABAP source code editor, the best matching non-keyword, such as an element name or type definition, is displayed when you start typing.
Prerequisites
Context
Procedure
Results
Code Completion
In the ABAP source code editor, you can open the code completion list manually at any position or automatically after you have typed a component selector such as -, ~, ->, =>.
Context
This functionality enables you to:
- add possible keywords or identifiers such as variables, classes, interfaces, methods
- select and add the component of the related identifier, such as a field of a structure or a method of a class
to your source code.
Procedure
Results
Using Code Completion Automatically
In the ABAP source code editor of a development object, you want to open the code completion list automatically when you enter a component selector such as -, ~, ->, =>.
Prerequisites
Context
Procedure
Results
The component is added to the source code at the current position.
Inserting a Full Signature Automatically
In the ABAP source code editor of a development object, you want to insert the full signature of a method, function module, or form routine automatically.
Prerequisites
Context
Procedure
Results
Inserting or Overwriting Source Code
In the ABAP source code editor, you can insert a keyword, identifier, or template from the code completion list at the current position. Optionally, you can configure the code completion to overwrite the keyword or identifier at the current position.
Prerequisites
Context
Procedure
Results
The selected keyword, identifier, or template is inserted and replaces the keyword or identifier at the current cursor position.

