Show TOC

Selecting a Main Program for Multiple-Use ABAP IncludesLocate this document in the navigation structure

To enable certain functions (for example, ABAP syntax check, navigation, and so on) in the ABAP source code editor, you need to select a main program for the include.

Prerequisites

This functionality is provided in SAP NetWeaver 7.4 SP08 and higher as well as in 7.31 SP14 and higher.

Context

Typically, an ABAP include is used by exactly one main program. This main program is then automatically selected by ABAP Development Tools (ADT).

If an include is used in several main programs, you need to select a specific main program in order for the functionality to be executed.

Procedure

  1. Open an include that is used in several main programs by double-clicking, for example, from the Project Exploreror a search result list, or by pressing Cltr + Shift + A.

    A dialog is opened for selecting a main program. If possible, ADT already preselects the most relevant main program.

    Dialog for selecting a main program
    Figure 1: Dialog for selecting a main program
  2. From the selection list, choose the main program you want to use.
  3. Confirm the selection with OK.

Results

Depending on your selection, you may have the following results:
  1. If you have selected a main program, all the functions that are now executed in the ABAP source code editor will take the selected main program into consideration.
  2. If you have not selected any main program and you are executing an operation such as syntax checking, activating, and so on, an error message will be displayed in the status bar. You can then select a main program from the Properties view, as described below, and repeat your operation. Otherwise, you can only continue working with functionalities that are independent of the main program.

The selection is valid until you close the include editor. Alternatively, without closing the include editor, you can select another main program by opening the Properties view. In the Specific tab, your previous selection is displayed. Here, you can also select a main program from the dropdown list.

Specific tab in the Properties view for selecting a main program
Figure 2: Specific tab in the Properties view for selecting a main program