Entering content frameProcedure documentation Modifications in Programs Locate the document in its SAP Library structure

You can make modifications to programs from the ABAP Editor using the Insert, Replace, and Delete pushbuttons. To facilitate such changes, programs are organized into modularization units called modules, subroutines, and events. Those lines of program code not contained within these units, such as comment inserted after a form routine or the code found at the beginning of a program, are also classified as modularization units (unnamed or external modularization units). Each modification you make is assigned to its corresponding unit and logged for both the modification overview and upgrade.

This graphic is explained in the accompanying text

If no modularization units that SAP delivered are altered, then your modifications can be automatically adopted at upgrade.

Note

Implementations of methods make up a modularization unit.

In addition to Insert, Replace, and Delete, the functions Modification overview and Undo modification are also available for modifying programs in the Editor.

This graphic is explained in the accompanying text

Insert

To insert ABAP code into a program, place your cursor on the appropriate line in the Editor and choose Insert. A new line is inserted at the point where your cursor was positioned. This line is ready for input. Start your modification here. Whenever you choose Enter at the end of a line, the system inserts an additional line that is ready for input. All standard ABAP Editor editing functions are available for use in these lines.

Note

In command mode, you place your cursor on the line after which you want to insert additional code. If you enter a command such as I(nsert), more ready for input lines are added.

Any code you insert is framed (set off from the other code) by comment lines describing what kind of modification is being made (Insert, Replace, or Delete). The repair number assigned to your modification is also displayed.

Note

Modifications are numbered (at far right) so as to aid their internal administration.

Replace

To replace a line in the Editor, place your cursor on the appropriate line and choose Replace. The line you are replacing is changed to a comment line and then copied into a line that is ready for input where you can then alter it any way you want to. Additional ready for input lines can also be inserted here, allowing you to make as many new entries as necessary.

If you want to replace multiple lines all at once, select these lines before using Replace.

Note

If you want to add a subroutine, use the Insert pushbutton to add the FORM/ENDFORM statements, for example. Do not replace the ENDFORM statement with another FORM/ENDFORM statement.

Delete

You can delete whole lines by either placing your cursor on a single line or by selecting an entire passage and then choosing Delete.

Modification overview

All modifications from the corresponding include are displayed on an overview screen.

Undo modification

In order to undo a modification you have made, place your cursor on a line within that modification and choose Undo modification.

Note

Whenever you add a new modularization unit to an SAP program, you should assign the unit to a customer include. You should also move all sections of code that are inserted in the program to the subroutines of a customer include. This reduces upgrade time and is helpful when trying to fix any conflicts that arise. For further information, please refer to the section on Adjusting Program Parts.

Leaving content frame