Show TOC

Importing Descriptions of Class and Interface Components from the Class BuilderLocate this document in the navigation structure

Prerequisites

  • The descriptions of components for ABAP classes or ABAP interfaces are entered in the form-based Class Builder of the ABAP Workbench.
  • You are logged on in English as your ABAP project language. Note that, in accordance with SAP programming guidelines, you should write program comments in English.

Context

In ABAP Development Tools, you can import descriptions of ABAP classes or ABAP interfaces (including their attributes, methods, parameters, and so on) that are entered in the form-based Class Builder

Example

In the source code editor, the definition of the CLASS cl_demo_importing_description ABAP class is displayed as follows:

CLASS cl_demo_importing_description DEFINITION.
 PUBLIC  
 FINAL  
 CREATE PUBLIC. 
   
 PUBLIC SECTION. 
   
 PROTECTED SECTION. 
 PUBLIC SECTION. 
 PRIVATE SECTION. 
  DATA: myself TYPE REF TO cl_demo_importing_description. 
  DATA any_string1 TYPE c. 
  METHODS method_with_variable. 
ENDCLASS. 

In the form-based Class Builder of the ABAP Workbench, the following description is saved for the METHOD_WITH_VARIABLE method of the same class:

Example of a method description that can be reused as ABAP Doc in ADT
Figure 1: Example of a method description that can be reused as ABAP Doc in ADT

Procedure

  1. In the source code editor of a class or interface, open the context menu.
  2. Choose Start of the navigation path Source Next navigation step Import ABAP Doc from Descriptions End of the navigation path.

Results

The source code editor imports all descriptions of the class or interface components from the Class Builder and inserts them as ABAP Doc comments at the appropriate position in the source code editor of ADT.

Note The source code editor does not overwrite existing ABAP Doc comments for class or interface components that are already documented with ABAP Doc.

Example

In the source code of the CLASS cl_demo_importing_description ABAP class, the imported descriptions of the components are added as ABAP Doc comments:

"! Imported class description from the Class Builder 
CLASS cl_demo_importing_description DEFINITION. 
 PUBLIC  
 FINAL  
 CREATE PUBLIC. 
   
 PUBLIC SECTION. 
   
 PROTECTED SECTION. 
 PUBLIC SECTION. 
 PRIVATE SECTION. 
  "! Imported attribute description 
  DATA: myself TYPE REF TO cl_demo_importing_description. 
  "! Imported attribute description 
  DATA any_string1 TYPE c. 
  "! Imported method description from the Class Builder 
  METHODS method_with_variable. 
ENDCLASS.