SAP ABAP Program Types
Each ABAP program has a type, which is defined in the program attributes. What is the purpose of all the different program types? The program type determines which processing blocks a program can contain, how the program is handled and executed by the runtime environment, and whether it can work with its own screens. The following ABAP program types are available.
Executable programs (Type 1)
Executable programs are introduced with the REPORT statement. They can contain their own screens and are executed via the SUBMIT statement or transaction codes. Executable programs can contain all the various processing blocks in ABAP, except for function modules, and any number of local classes. They can be created directly with the ABAP Editor tool. While they are running, all the runtime environment events can occur.
Module pools (Type M)
Module pools are introduced with the PROGRAM statement. They can contain their own screens and can only be executed through transaction codes. Module pools can contain all the various processing blocks in ABAP, except for reporting event blocks and function modules, and any number of local classes. While they are running, all the runtime environment events can occur, except for reporting events. They can be created directly with the ABAP Editor tool.
Function groups (Type F)
Function groups or pools are introduced with the FUNCTION – POOL statement. They can contain their own screens. Normally, function groups are not executed directly. They are loaded by calling their function modules. They can contain all the various processing blocks in ABAP, except for reporting event blocks, and any number of local classes. They are the only programs that can contain function modules and are created with the Function Builder tool.
Class pools (Type K)
Class pools are introduced with the CLASS-POOL statement. They cannot contain their own screens and no other processing blocks than methods. Class pools can contain a single global class and any number of local classes. They cannot be executed directly. They are loaded by using their global classes.3 They are created with the Class Builder tool.
Interface pools (Type J)
Interface pools are introduced with the INTERFACE-POOL statement. They cannot contain their own screens or processing blocks. They contain a single definition of a global interface, which can be implemented in any global or local class. They are created with the Class Builder tool.
Subroutine pools (Type S)
Subroutine pools are introduced with the PROGRAM statement. They cannot contain their own screens and apart from the LOAD-OF-PROGRAM event block can have only subroutines or methods of local classes as processing blocks. Subroutine pools are not executed directly. They are loaded by calling their procedures externally. They are created with the ABAP Editor.
Type groups
Type groups or pools are introduced with the TYPE-POOL statement. They cannot contain their own screens or processing blocks. They contain the definitions of global data types, which can be made visible in any ABAP program by the TYPE-POOLS statement. They are created with the ABAP Dictionary tool.
Include programs (Type I)
Include programs have no introductory program statement and, unlike all other program types, they do not represent independent compilation units with their own memory space. Include programs provide a library function for ABAP source code and can be embedded at any location in other ABAP programs using the INCLUDE statement. Include programs have no technical relationship to processing blocks. However, it is preferable to separate logical program units, such as the declaration part for global data, and similar or individual processing blocks into independent include programs. The ABAP Workbench supports the automatic division of module pools, function groups, and class pools into include programs. You can create your own include programs directly with the ABAP Editor.
If you like this post, you may as well like these too:
- ABAP Program: Sample program for OLE Automation REPORT ZSOURCE2801. * Including OLE types INCLUDE OLE2INCL. * Tables and variables for later use TABLES: CUSTOMERS. DATA: APPLICATION TYPE OLE2_OBJECT, WORKBOOK TYPE OLE2_OBJECT, SHEET TYPE OLE2_OBJECT, CELLS TYPE OLE2_OBJECT....
- Create a Program in SAP ABAP 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...
- Different types of ABAP Programs There are nine types of ABAP Programs in SAP: 1 Executable Programs (ABAP Reports) I INCLUDE Program M Module Pool/Dialogue programs S Sub-Routine Pool J Interface Pool K Class Pool...
- ABAP Program to Send External Mail from SAP Here is a ABAP program which would allow you to send mail to any external system from SAP. Ensure that you have all the required configurations done by the basis...
- ABAP Source Code: Character types REPORT ZSOURCE0403. * Type c is the default type when no type is specified.* Initial value is space, if it is not specified explicitly.DATA: NAME(25) TYPE C, CITY(25), FLAG, SINGLE_CHARACTER...
- ABAP Source Code: Types, data, constants REPORT ZSOURCE0402.* Type flag defines an abstract typeTYPES FLAG TYPE C. * Field address_flag will allocate space in main memory at runtimeDATA ADDRESS_FLAG TYPE FLAG VALUE ‘X’.* Constants are defined...
- ABAP Programs: Form parameters with generic types REPORT ZSOURCE1009.* Variable for later useDATA: SHORT_STRING(3) VALUE ‘AB’, SHORT_NUMBER(3) TYPE N VALUE ’0′, ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100.* Calling forms with different actual parameters* Correct call (actual paramter is...
- ABAP Programs: Complex Non-Elementary Types and Data Objects REPORT ZSOURCE0408. * Nested recordsTYPES: BEGIN OF ADDRESS, CITY(25), STREET(30), END OF ADDRESS, BEGIN OF PERSON, NAME(25), ADDRESS TYPE ADDRESS, END OF PERSON.DATA RECEIVER TYPE PERSON.RECEIVER-NAME = ‘Smith’.RECEIVER-ADDRESS-CITY = ‘Big...
- Call an ABAP program from a BSP Call an ABAP program from a BSP is somehow impossible due to memory context handling for a web transaction like a BSP. If you try, it would lead to an...
- Generate Temporary ABAP Program Ever had a need to create a temporary program during the run time. Here is a simple program which will allow you to learn that. REPORT ZSOURCE2501. * Internal table...
- ABAP Program:Reading data from a file REPORT ZSOURCE2602. * Data declarations for later use TABLES CUSTOMERS. PARAMETERS FILENAME(128) DEFAULT '/usr/tmp/testfile.dat' LOWER CASE. DATA: MSG_TEXT(50), ALL_CUSTOMER_NAMES LIKE CUSTOMERS-NAME OCCURS 100 WITH HEADER LINE. * Opening the File...
- ABAP Program : Working with Temporary Programs Ever had a need to create a temporary program during the run time. Here is a simple program which will allow you to learn that. REPORT ZSOURCE2501. * Internal table...
- ABAP Program to Send Mail with Attachment This ABAP program use the function module ‘SO_NEW_DOCUMENT_ATT_SEND_API1′ to send the email with attachment. There are five steps involved in sending the email with attachment. Add Recipients Put in the...
- ABAP Programs:Sample dialog program (flight reservation) * This program source contains all modules and subroutines of the * flight reservation program, but screen and GUI status definitions * are not included. *&———————————————————————* *&———————————————————————* *& Include MSABBTOP...
- ABAP Program:Transferring data to a file (presentation server) REPORT ZSOURCE2603. * Data declarations for later use PARAMETERS FILENAME(128) DEFAULT 'c:usersdefaulttestfile.dat' LOWER CASE. TABLES CUSTOMERS. DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE. * Get data for file...



















Leave a Reply