Context
Code templates reduce the time spent on routine coding.
The new ABAP IDE provides a number of predefined code templates for ABAP.
In addition, you can create further templates for your own use.
Procedure
- To search for all ABAP templates available...
- Open the preferences page
from the menu bar.
- To use a template...
- In the source code editor, write the beginning characters of the
template.
- Select Ctrl + Space (code
completion).
Tip Alternatively, you can use the Templates view to insert the
template code through Drag & Drop.
- To add a new template...
- Open the ABAP source editor for any arbitrary development object.
- Switch to Templates view.
- In the toolbar of the Templates view, click the Create
a New Template icon.
- Specify the Name, the Description and the Pattern
for the template.
Figure 1:
Adding an new ABAP template
- Improve the format for the source code template manually.
- Save the new template with OK.