Show TOC

Working with Source Code TemplatesLocate this document in the navigation structure

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

  1. To search for all ABAP templates available...
    1. Open the preferences page Start of the navigation path ABAP Development Next navigation step Source Code Editor Next navigation step Templates End of the navigation path from the menu bar.
  2. To use a template...
    1. In the source code editor, write the beginning characters of the template.
    2. Select Ctrl + Space (code completion).

Tip Alternatively, you can use the Templates view to insert the template code through Drag & Drop.

  1. To add a new template...
    1. Open the ABAP source editor for any arbitrary development object.
    2. Switch to Templates view.
    3. In the toolbar of the Templates view, click the Create a New Template icon.
    4. Specify the Name, the Description and the Pattern for the template.
      Adding an new ABAP template
      Figure 1: Adding an new ABAP template
    5. Improve the format for the source code template manually.
    6. Save the new template with OK.