ABAP Keyword Documentation → ABAP Overview
ABAP Statements - Overview
This section contains a thematically organized overview of all statements that are opened with ABAP keywords. For an alphabetical list of all ABAP words, see ABAP words.
Other versions: 7.31 | 7.40 | 7.54
Introductory Statements for Programs
| CLASS-POOL | Introduces a class pool |
|---|---|
FUNCTION-POOL |
Introduces a function group |
INTERFACE-POOL |
Introduces an interface pool |
PROGRAM |
Introduces a module pool orsubroutine pool |
REPORT |
Introduces an executable program |
TYPE-POOL |
Introduces a type pool |
Modularization Statements
Procedures
| FUNCTION ... ENDFUNCTION | Defines a function module |
|---|---|
METHOD ... ENDMETHOD |
Defines a method |
Dialog Modules
| MODULE ... ENDMODULE | Defines a dialog module |
|---|---|
Event Blocks
Source Code Modules
| DEFINE ... END-OF-DEFINITION | Defines a macro |
|---|---|
INCLUDE |
Includes an include program |
Declarative Statements
Data Types and Data Objects
| CONSTANTS | Declares a constant |
|---|---|
DATA |
Declares a variable |
FIELD-SYMBOLS |
Declares a field symbol |
INCLUDE |
Includes a structure |
NODES |
Declares a table work area |
STATICS |
Declares a static variable |
TABLES |
Declares a table work area |
TYPES |
Defines a separate data type |
Classes and Interfaces
| ALIASES | Declares an alias name |
|---|---|
CLASS ... ENDCLASS |
Defines a class |
CLASS-DATA |
Declares a static attribute |
CLASS-EVENTS |
Declares a static event |
CLASS-METHODS |
Declares a static method |
EVENTS |
Declares an instance event |
INTERFACE ... ENDINTERFACE |
Defines an interface |
INTERFACES |
Includes an interface |
METHODS |
Declares an instance method |
PRIVATE SECTION |
Introduces the package visibility section |
PROTECTED SECTION |
Introduces the protected visibility section |
PUBLIC SECTION |
Introduces the public visibility section |
Object Creation
| CREATE DATA | Creates an anonymous data object |
|---|---|
CREATE OBJECT |
Creates an object. |
Calling and Exiting Program Units
Calling Programs
| CALL TRANSACTION | Calls a transaction |
|---|---|
LEAVE TO TRANSACTION |
Calls a transaction |
SUBMIT |
Calls an executable program |
Calling Processing Blocks
| CALL FUNCTION | Calls a function module |
|---|---|
CALL METHOD |
Calls a method |
PERFORM |
Calls a subroutine |
RAISE EVENT |
Triggers an event |
SET HANDLER |
Registers an event |
SET USER-COMMAND |
Triggers a list event |
Exiting Program Units
| CHECK | Exits a loop pass or processing block |
|---|---|
CONTINUE |
Exits a loop pass |
EXIT |
Exits a loop or processing block |
LEAVE PROGRAM |
Exits an ABAP program |
REJECT |
Exits a processing block |
RETURN |
Exits a processing block |
STOP |
Exits a processing block |
Program Flow Logic
Control Structures
| DO ... ENDDO | Loop |
|---|---|
CASE ... WHEN ... ENDCASE |
Branch |
IF ... ELSEIF ... ELSE ... ENDIF |
Branch |
WHILE ... ENDWHILE |
Loop |
Program Interruption
| WAIT UP TO | Program interruption for a certain amount of time |
|---|---|
Exception Handling
| RAISE | Triggers a non-class-based exception |
|---|---|
RAISE EXCEPTION |
Triggers a class-based exception |
TRY ... CATCH ... CLEANUP ... ENDTRY |
Handles class-based exceptions |
RESUME |
Resumes after a resumable exception |
Assignments
Value Assignments
| MOVE | Assignment according to conversion rule |
|---|---|
MOVE-CORRESPONDING |
Assignment according to structure components |
UNPACK |
Unpacks a packed number |
Setting References
| ASSIGN | Sets a field symbol |
|---|---|
UNASSIGN |
Initializes a field symbol |
GET REFERENCE |
Sets a data reference |
Initializations
| CLEAR | Initializes a data object |
|---|---|
FREE |
Initializes a data object |
Processing Internal Data
Calculation Expressions
| COMPUTE | Calculates a calculation expression |
|---|---|
Calculation Statements
| ADD | Adds numeric data objects |
|---|---|
DIVIDE |
Divides numeric data objects |
MULTIPLY |
Multiplies numeric data objects |
SUBTRACT |
Subtracts numeric data objects |
Character String and Byte String Processing
| CONCATENATE | Concatenates character strings orbyte chains |
|---|---|
CONDENSE |
Condenses a character string |
CONVERT TEXT |
Converts a character string |
FIND |
Searches in a character string orbyte chain |
GET BIT |
Reads individual bits in a byte chain |
OVERLAY |
Replacement in a character string |
REPLACE |
Replacement in a character string orbyte chain |
SET BIT |
Sets individual bits in a byte chain |
SHIFT |
Moves a character string or byte chain |
SPLIT |
Splits a character string orbyte chain |
TRANSLATE |
Converts a character string |
WRITE TO |
Formats values as a character string |
Internal Tables
| APPEND | Attaches rows to an internal table |
|---|---|
AT |
Control level processing of aninternal table |
COLLECT |
Condensed insertion of rows into an internal table |
DELETE |
Deletes rows from an internal table |
FIND IN TABLE |
Searches in an internal table |
INSERT |
Inserts rows into an internal table |
LOOP AT ... ENDLOOP |
Loop for an internal table |
MODIFY |
Changes rows in an internal table |
READ TABLE |
Reads a row of an internal table |
REPLACE IN TABLE |
Replacement in an internal table |
SORT |
Sorts an internal table |
SUM |
Summation of numeric fields in an internal table |
Extracts
| AT | Control level processing ofextract dataset |
|---|---|
EXTRACT |
Fills extract dataset |
FIELD-GROUPS |
Declares a field group |
INSERT |
Builds a field group |
LOOP ... ENDLOOP |
Loop for the extract dataset |
SORT |
Sorts extract dataset |
Attributes of Data Objects
| DESCRIBE | Determines the properties of a data object |
|---|---|
User Dialogs
Dynpros
| CALL SCREEN | Calls a dynpro sequence |
|---|---|
CONTROLS |
Declares a control |
EXIT FROM STEP-LOOP |
Exits a table control or step loop |
GET CURSOR |
Reads the cursor position |
GET PF-STATUS |
Sets the GUI status |
LEAVE [TO] SCREEN |
Exits a dynpro |
LOOP AT SCREEN ... ENDLOOP |
Loop for screen elements |
MODIFY SCREEN |
Modifies a screen element |
REFRESH CONTROL |
Initializes a table control |
SET CURSOR |
Sets the cursor position |
SET HOLD DATA |
Activates/deactivates standard menu entries |
SET PF-STATUS |
Sets the GUI status |
SET SCREEN |
Sets the next dynpro |
SET TITLEBAR |
Sets the GUI title |
SUPPRESS DIALOG |
Suppresses the screen |
Selection Screens
| PARAMETERS | Defines a parameter |
|---|---|
SELECTION-SCREEN |
Defines a selection screen or ascreen element |
SELECT-OPTIONS |
Defines a selection criterion |
Lists
| BACK | Relative positioning of list cursor |
|---|---|
DESCRIBE LIST |
Specifies the properties of a list in the list buffer |
FORMAT |
Formats a list |
GET CURSOR |
Reads the cursor position |
HIDE |
Saves a data object in a list level |
LEAVE TO LIST-PROCESSING |
Calls the list processing |
LEAVE LIST-PROCESSING |
Exits list processing |
MODIFY LINE |
Changes a list in the list buffer |
NEW-LINE |
Line break in a list |
NEW-PAGE |
Page break in a list |
POSITION |
Positions the list cursor |
PRINT-CONTROL |
Formats a print list |
READ LINE |
Reads a list in the list buffer |
RESERVE |
Relative page break in a list |
SCROLL LIST |
Scrolls in a list |
SET BLANK LINES |
Controls the blank characters in a list |
SET CURSOR |
Sets the cursor position |
SET MARGIN |
Sets the margin of a print list |
SET PF-STATUS |
Sets the GUI status |
SET LEFT SCROLL-BOUNDARY |
Sets the scroll boundaries of a list |
SET TITLEBAR |
Sets the GUI title |
SKIP |
Positions the list cursor |
ULINE |
Displays a line in a list |
WINDOW |
Displays a list in a dialog box |
WRITE |
Displays data in a list |
Messages
| MESSAGE | Send a message |
|---|---|
Processing External Data
Open SQL
| CLOSE CURSOR | Closes a database cursor |
|---|---|
DELETE |
Deletes rows from a database table |
FETCH NEXT CURSOR |
Reads rows using a database cursor |
INSERT |
Inserts rows into a database table |
MODIFY |
Changes or inserts rows in a database table |
OPEN CURSOR |
Opens a database cursor |
SELECT ... ENDSELECT |
Reads rows from a database table |
UPDATE |
Changes rows in a database table |
Native SQL
| EXEC SQL ... ENDEXEC | Defines an area for Native SQL |
|---|---|
Secondary Database Connections
| COMMIT CONNECTION | Completes an SAP LUW on a secondarydatabase connection |
|---|---|
ROLLBACK CONNECTION |
Cancels an SAP LUW on a secondarydatabase connection |
Data Clusters
| DELETE | Deletes data clusters |
|---|---|
EXPORT |
Exports data objects into a data cluster |
FREE MEMORY |
Deletes data clusters from the ABAP memory |
IMPORT |
Imports data objects from a data cluster |
IMPORT DIRECTORY |
Creates the interval directory of a data cluster |
File Interface
| CLOSE DATASET | Closes a file |
|---|---|
DELETE DATASET |
Deletes a file |
GET DATASET |
Specifies the properties of a file |
OPEN DATASET |
Opens a file |
READ DATASET |
Reads a file |
SET DATASET |
Sets the properties of a file |
TRANSFER |
Fills a file |
TRUNCATE DATASET |
Changes the size of a file |
Data Consistency
| AUTHORITY-CHECK | Checks an authorization |
|---|---|
COMMIT WORK |
Completes a SAP-LUW |
ROLLBACK WORK |
Cancels a SAP-LUW |
SET UPDATE TASK LOCAL |
Sets the local update |
Program Parameters
SAP Memory
| GET PARAMETER | Reads an SPA/GPA parameter |
|---|---|
SET PARAMETER |
Sets an SPA/GPA parameter |
Language Environment
| GET LOCALE | Specifies of the text environment. |
|---|---|
SET COUNTRY |
Sets the formatting settings of the language environment |
SET LANGUAGE |
Loads a text pool |
SET LOCALE |
Sets the text environment |
Date and Time Information
| CONVERT INTO TIME STAMP | Converts date and time into time stamp |
|---|---|
CONVERT TIME STAMP |
Converts a time stamp into data and time |
GET TIME |
Fills the system fields for date and time |
GET TIME STAMP |
Creates a time stamp |
Program Processing
Testing and Checking Programs
| ASSERT | Defines an assertion |
|---|---|
BREAK-POINT |
Defines a breakpoint |
LOG-POINT |
Defines a logpoint |
GET RUN TIME |
Specifies a measuring interval |
SET RUN TIME ANALYZER |
Controls the runtime analysis |
SET RUN TIME CLOCK |
Sets the measurement accuracy for measuring intervals |
Dynamic Program Development
| GENERATE SUBROUTINE POOL | Generates a subroutine pool |
|---|---|
INSERT REPORT |
Stores an ABAP program |
INSERT TEXTPOOL |
Stores a text pool |
READ REPORT |
Imports an ABAP program |
READ TEXTPOOL |
Imports a text pool |
SYNTAX-CHECK |
Calls the syntax check |
ABAP Data and Communication Interfaces
Remote Function Call
| CALL FUNCTION DESTINATION | Remote Function Call |
|---|---|
RECEIVE |
Receives parameters for the remote function call |
WAIT UNTIL |
Waits for completion of the remote function call |
ABAP and XML
| CALL TRANSFORMATION | Calls an XSLT program or asimple transformation |
|---|---|
OLE Interface
| CALL METHOD | Calls a OLE automation method |
|---|---|
CREATE OBJECT |
Create an OLE automation object |
FREE OBJECT |
Releases memory in the OLE automation |
GET PROPERTY |
Reads an attribute in the OLE Automation |
SET PROPERTY |
Sets an attribute in the OLE Automation |
Enhancements
Source Code Enhancements
| ENHANCEMENT ... ENDENHANCEMENT | Implements a source code enhancement |
|---|---|
ENHANCEMENT-POINT |
Defines a source code enhancement |
ENHANCEMENT-SECTION ... END-ENHANCEMENT-SECTION |
Defines a source code enhancement |
Enhancements Using BAdIs
| GET BADI | Creates a BAdl object |
|---|---|
CALL BADI |
Calls BAdI methods |
Statements for Experts
| INFOTYPES | Declares an internal table for HR info types |
|---|---|
PROVIDE ... ENDPROVIDE |
Loop for multiple internal tables |
Obsolete Statements
Obsolete Modularization
| FORM ... ENDFORM | Defines a subroutine |
|---|---|
LOCAL |
Temporarily stores a data object |
Obsolete Declarations
| FIELDS | Addresses a data object |
|---|---|
RANGES |
Declares a ranges table |
TYPE-POOLS |
Loads a type pool |
Obsolete Calls
| CALL CUSTOMER-FUNCTION | Calls a function module exit |
|---|---|
CALL DIALOG |
Calls a dialog module |
PUT |
Triggers a reporting event |
Obsolete Exit
| LEAVE | Context-dependent exit of an ABAP program |
|---|---|
Obsolete Control Structure
| ON CHANGE OF ... ENDON | Obsolete branch |
|---|---|
Obsolete Exception Handling
| CATCH SYSTEM-EXCEPTIONS | Catches catchable runtime error |
|---|---|
Obsolete Assignments
| MOVE - PERCENTAGE | Assigns a subobject of a data object |
|---|---|
PACK |
Packs a packed number |
Obsolete Calculation Statements
| ADD-CORRESPONDING | Addition of structure components |
|---|---|
DIVIDE-CORRESPONDING |
Division of structure components |
MULTIPLY-CORRESPONDING |
Multiplication of structure components |
SUBTRACT-CORRESPONDING |
Subtraction of structure components |
Obsolete Character String and Byte String Processing
|CONVERT DATE|INVERTED-DATE|Transforms a character string into nine's complement|
|----|----|
|REPLACE|Replacement in a character string orbyte string|
|SEARCH|Obsolete search in a character string orbyte string|
Obsolete Internal Table Processing
| REFRESH | Obsolete initialization an internal table |
|---|---|
SEARCH itab |
Obsolete search in an internal table |
WRITE TO itab |
Writes to an internal table (obsolete) |
Obsolete Database Access
| DELETE | Deletes a row in a database table (obsolete) |
|---|---|
LOOP AT |
Obsolete loop for a database table |
MODIFY |
Changes a row in a database table (obsolete) |
READ TABLE |
Reads a row in a database table (obsolete) |
REFRESH FROM |
Reads rows in a database table (obsolete) |
Obsolete cursor processing in native SQL
| EXIT FROM SQL | Exits obsolete cursor processing of Native SQL |
|---|---|
Contexts
| CONTEXTS | Data type for contexts |
|---|---|
DEMAND |
Requests a context |
SUPPLY |
Fills the key fields of a context |
Obsolete Statements in List Processing
| AT PFnn | Obsolete List Event |
|---|---|
DETAIL |
Intensity of the background color in a list |
INPUT |
Input-ready status of a list |
MAXIMUM |
Maximum value of outputs in a list |
MINIMUM |
Minimum value of outputs in a list |
NEW-SECTION |
Controls a print list |
SUMMARY |
Intensity of the background color in a list |
SUMMING |
Sum of outputs in a list |
Obsolete Editor Calls
| EDITOR-CALL FOR itab. | Calls a GUI Control (obsolete) |
|---|---|
EDITOR-CALL FOR REPORT |
Calls the ABAP Editor |
Obsolete Tests and Checks
| SET EXTENDED CHECK | Controls the enhanced program check |
|---|---|
Obsolete External Programming Interface
| COMMUNICATION | Controls the CPI-C interface |
|---|---|
Internal Statements
Program Processing
| DELETE DYNPRO | Deletes a dynpro |
|---|---|
DELETE REPORT |
Deletes an ABAP program |
DELETE TEXTPOOL |
Deletes a text pool |
EXPORT DYNPRO |
Exports a dynpro |
GENERATE DYNPRO |
Generates a dynpro |
GENERATE REPORT |
Generates an ABAP program |
LOAD REPORT |
Loads an ABAP program |
IMPORT DYNPRO |
Imports a dynpro |
SCAN |
Splits an ABAP program into tokens |
SYNTAX-CHECK FOR DYNPRO |
Syntax check for a dynpro |
SYNTAX-TRACE |
Influences the syntax check |
External Interface
| CALL | Calls a c function of the ABAP runtime environment |
|---|---|