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.
If no modularization units that SAP delivered are altered, then your modifications can be automatically adopted at upgrade.
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.
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.
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.
Modifications are numbered (at far right) so as to aid their internal administration.
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.
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.
You can delete whole lines by either placing your cursor on a single line or by selecting an entire passage and then choosing Delete.
All modifications from the corresponding include are displayed on an overview screen.
In order to undo a modification you have made, place your cursor on a line within that modification and choose Undo modification.
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