In the front end editor, the ABAP source code is loaded onto
the front end and edited locally. The advantage of this is that all editing
functions that do not require communication with the backend can be performed
very quickly. However, the communication channel between the front end and
backend can be overloaded when you use the front end editor. If you have a
large program, this can be a problem even in a LAN environment, but in a WAN,
it can become critical. You can edit the following development objects in the
front end editor:
·
ABAP programs
·
Method implementations (Class Builder)
·
Function module implementations (Function Builder)
·
Screen flow logic (Screen Painter)
·
Type groups (ABAP Dictionary)
Edit control mode has the same range of features in each
situation in which you can use it.
Edit control mode is not yet supported in the split screen
editor, the BOR editor, or the logical database editor.
Editing an ABAP program in edit control menu using the
context menu:
Features
The front end editor of the ABAP Editor contains the
following features:
·
Local scrolling (only available in this mode)
·
Cut, copy, and paste for selected text areas (only available in
this mode)
·
Drag and drop (only available in this mode)
·
Context menu (right-click) for accessing editor functions (only
available in this mode)
·
Local find and replace function
·
Navigation to a selected line (using the context menu)
·
Access to the buffer and block operations (using the context
menu)
·
Commenting out text blocks
·
Working with blocks and clipboards
·
Navigation functions (forward navigation)
·
Syntax check, displaying error messages and warnings in a
separate window
·
Colored highlighting for comment lines
·
Automatic line feed when the maximum line width is reached (only
available in this mode)
·
Insert statement function.
·
Multiple-step undo and redo functions (only available in this
mode)
·
Displays current cursor position
·
Pretty Printer for standardizing the layout
·
Import and export for local files
Table Control Mode
The backend editor allows you to use the traditional backend
editor for editing your ABAP coding. The editor is line-based and to use normal
editor functions such as cut, copy, and paste, you must first select a block of
lines. It is often useful to use the clipboards in this mode.
If you have a very long program (and especially if you are
working in a WAN environment), the backend editor can produce better
performance than the front end editor. Furthermore, backend editor allows you
to edit any development object that is based on the ABAP Editor. The split
screen editor, the BOR Editor, and the Logical Database Editor are only available
in the backend editor.
Features
The backend editor of the ABAP Editor provides the following
functions:
·
Compression logic (only available in this mode)
·
Line numbering (only available in this mode)
·
Find and replace functions
·
Colored highlighting for comment lines
·
Insert statement function
·
Include expansion (only available in this mode)
·
Single-step undo function
·
Conversion of a text block to comment lines
·
Pretty printer for standardizing program layout
·
Syntax check
·
Upload and download of local files
Changing the Editor Mode
When you start the ABAP Editor, the system displays the
source code in the editor mode saved in your user-specific settings.
To change the Editor mode from anywhere in the ABAP
Workbench:
Choose Utilities à
Settings
The User-Specific Settings dialog box appears.
Choose ABAP Editor.
Set the new editor mode.
If you are going to use Table control mode, you can choose
whether to switch the Line numbering and Compression logic on or off.
Choose to leave the dialog box.
The changed settings are saved and will be retained even
after you log off from the SAP System.
Creating a Program
The description assumes that you are creating your new ABAP
program in the Object Navigator. It is also based on the most general case and
you can use it even if there is not yet a Programs node in your object list.
You can also use the Create function from the context menu
of the object node.
Choose (Other object).
In the Object Selection dialog box, chose Program.
Enter the name of the new program.
Remember that all programs in the customer namespace must
begin with Y or Z.
Choose.
The Create Program dialog box appears.
If you want your program to be an executable program,
deselect the With TOP include option. If, on the other hand, you want to create
a module pool, select the option.
Choose to confirm your entries.
If you created a program with a TOP include, a dialog box
appears in which you have to enter the name of the include.
Choose to confirm your entries.
Another dialog box appears in which you must set other
program attributes.
For details of what each attribute means, enter the program
attributes and choose save.
The Create Object Catalog Entry dialog box appears.
Assign a development class to the program.
Choose to confirm your entries.
The program is added to the object list of the relevant
development class and displayed under the Programs object node. The system
starts the ABAP Editor and opens the program in change mode.
Editing the Source Code
The precise procedure for navigation and editing source code
varies according to the editor
Mode that you are using
Navigating in the Source Code
Editing Source Code (Front end Editor)
Editing Source Code (Backend Editor)
Using the Clipboards
Find and Replace (Front end Editor)
Find and Replace (Backend Editor)
Inserting Statement Patterns
Inserting Patterns Using Drag and Drop
Expanding Includes
Improving the Layout