You can navigate to the ABAP Editor through the Menu. You can also create favorites for certain transactions and put it into your custom menu. You can type SE38 from anywhere in the SAP environment to redirect you to the ABAP editor (must come out to an Area Menu or prefix transaction code with /n). Tools such as the Function Builder, Data Dictionary, Screen Painter and Menu Painter are integrated to the ABAP editor and you can navigate to the Editor and load the corresponding program by double-clicking on a program name on a Program field. The ABAP Editor can be used to create Programs of different types (Module Pool, Report, Include, Subroutine Pool, etc.)
Steps to create a Program in SAP ABAP
Creating Program Step 1
- As indicated before, the ABAP Editor can be used to create Module Pool (Dialog Programs), Report Programs (which output lists or reports by accessing the database), Includes (non executable programs which can be included into a main program), Subroutine Pool (a collection of subroutines which can be reused) and several other types of programs.
- On the ABAP Editor: Initial Screen, a program name should be given and “Create” push button needs to be pressed.
- A Developer Key may be required for the specific user to create/edit programs. This is supplied by SAP.
- All custom programs should begin with “Z” or “Y” if they are report programs.
- There are other specific conventions that need to be used for the creation of custom Module Pools (SAPMZxxxxx), custom Subroutine Pools (SAPFZxxxxx), etc. which are covered in later topics.
Creating Program Step 2
- Enter the Title (a description), Type (such as Executable Program, Module Pool, etc. Right now enter Executable Program)
- Choose an Application and a Status for the Program (these are all informational attributes)
- The checkbox for “Fixed Point Arithmetic” is mostly checked. This is to indicate that Fixed point arithmetic will be used to perform all calculations. If it is not checked, packed numbers (Decimals in ABAP) will be treated as integers when used in assignments and calculations.
- By checking the “Editor Lock” checkbox, one could prevent other users from making changes to the program.
Once all the attributes have been filled, press the “Save” Button.
Creating Program Step 3
- Enter the development class in this dialog box. Development class groups together a set of related ABAP workbench objects. Programs, Tables, Structures, Menus, Screens, Messages, and even data can be assigned a development class.
- A Development class is particularly useful when transporting Objects from one SAP “Instance” (R/3 system) to another.
- You could create a new development class from the Object Navigator (also called the Repository Browser).
An object can be created as a Local Object which would be specific to the user. A development class $TMP is assigned to such local objects.
- Local Objects cannot be transported to other SAP Instances.
Creating Program Step 4
- If a valid development class had been assigned in the previous step (NOT applicable for “Local Objects”), then the system asks for a transport request.
- A transport request is used to track the changes and can be used to:
- Group related changes to a request number
- Pull back changes made against a certain request number
- Transport objects to another SAP Instance
- Transports are managed in a Correction and Transportation System (CTS) which can be accessed by the transactions SE01, SE09, and SE10.
Creating Program Step 5
- The program now appears in the editor. ABAP code can be incorporated into the program after the “REPORT” statement.
- If a check syntax is run on the program, any syntax errors are thrown on the same window on the bottom portion. Clicking on a syntax error takes you to the appropriate line.
- Correct the errors (if any).
- Activate the program (Ctrl+F3 can be used as a shortcut) before executing it.
- All programs need to be activated before executing.