ABAP statements

 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.


Introductory Statements for Programs


CLASS-POOL Introduction of a class pool
FUNCTION-POOL Introduction of a function group
INTERFACE-POOL Introduction of an interface pool
PROGRAM Introduction of a module pool or subroutine pool
REPORT Introduction of an executable program
TYPE-POOL Introduction of a type pool


Modularization Statements


FORM ... ENDFORM Definition of a subroutine
FUNCTION ... ENDFUNCTION Definition of a function module
METHOD ... ENDMETHOD Definition of a method


Dialog Modules

MODULE ... ENDMODULE Definition of a dialog module


Event Blocks

AT PF## List event
AT SELECTION-SCREEN Selection screen event
END-OF-PAGE List event
END-OF-SELECTION Reporting event
GET Reporting event
INITIALIZATION Reporting event
LOAD-OF-PROGRAM Program constructor event
START-OF-SELECTION Reporting event
TOP-OF-PAGE List event


Source Code Modules

DEFINE ... END-OF-DEFINITION Definition of a macro
INCLUDE Inclusion of an include program


Declarative Statements

Data Types and Data Objects

CONSTANTS Declaration of a constante
DATA Declaration of a variable
FIELD-SYMBOLS Declaration of a field symbol
INCLUDE Inclusion of a structure
NODES Declaration of table work area
STATICS Declaration of a static variable
TABLES Declaration of a table work area
TYPE-POOLS Inclusion of a type pool
TYPES Definition of a stand-alone data type


Classes and Interfaces

ALIASES Declaration of an alias
CLASS ... ENDCLASS Definition of a class
CLASS-DATA Declaration of a static attribute
CLASS-EVENTS Declaration of a static event
CLASS-METHODS Declaration of a static method
EVENTS Declaration of an instance event
INTERFACE ... ENDINTERFACE Definition of an interface
INTERFACES Inclusion of an interface
METHODS Declaration of an instance method
PRIVATE SECTION Introduction of private visibility section
PROTECTED SECTION Introduction of protected visibility section
PUBLIC SECTION Introduction of public visibility section


Object Creation

CREATE DATA Creation of an anonymous data object
CREATE OBJECT Creation of an object


Calling and Exiting Program Units

Calling Programs

CALL TRANSACTION Calls a transaction
LEAVE TO TRANSACTION Calls a einer transaction
SUBMIT Calls an executable program


Calling Processing Blocks

CALL FUNCTION Calls a function module
CALL METHOD Calls a method
PERFORM Calls a subroutine
PUT Triggers a reporting event
RAISE EVENT Triggers an event
SET HANDLER Registers an event
SET USER-COMMAND Triggers a list event


Exiting Program Units

CHECK Exits a loop or processing block
CONTINUE Exits a loop
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


Controlling the Program Flow

Control Structures

DO ... ENDDO Loop
CASE ... WHEN ... ENDCASE Branch
IF ... ELSEIF ... ELSE ... ENDIF Branch



CATCH SYSTEM-EXCEPTIONS Catches catchable runtime errors
RAISE Raises a non-class-based exception
RAISE EXCEPTION Triggers a class-based exception
TRY ... CATCH ... CLEANUP ... ENDTRY Handles class-based exception



Value Assignments

MOVE Assignment to conversion rule
MOVE-CORRESPONDING Assignment of structure components
UNPACK Unpacks a packed number
WRITE TO Assignment in list format


Setting References

ASSIGN Sets a field symbol
UNASSIGN Initializes a field symbol
GET REFERENCE Sets a data reference



CLEAR Initializes a data object
FREE Initializes a data object
REFRESH Initializes an internal table


Processing Internal Data

Calculation Expressions

COMPUTE Calculates an arithmetic or bit expression


Calculation Statements

ADD Addition of numeric data objects
DIVIDE Division of numeric data objects
MULTIPLY Multiplication of numeric data objects
SUBTRACT Subtraction of numeric data objects


Byte and Character String Processing

CONCATENATE Concatenates byte or character strings
CONDENSE Condenses a character string
CONVERT TEXT Converts a character string
FIND Searches in a byte or character string
GET BIT Reads individual bits in a byte string
OVERLAY Replacement in a character string
REPLACE Replacement in a byte or character string
SET BIT Sets individual bits in a byte string
SHIFT Moves a byte or character string
SPLIT Splits up a byte or character string
TRANSLATE Converts a character string


Internal Tables

APPEND Appends rows onto an internal table
AT Control level processing of an internal table
COLLECT Condensed insertion of rows into an internal table
DELET Deletes rows from an internal table
FIND IN TABLE Searches in an internal table
INSERT Inserts rows into an internal table
LOOP AT Loop over an internal table
MODIFY Changing of rows in an internal table
PROVIDE Loop over several internal tables
READ TABLE Reads a row in 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



AT Control level processing of extract dataset
EXTRACT Fills the extract dataset
FIELD-GROUPS Declaration of a field group
INSERT Creates a field group
LOOP Loop over the extract dataset
SORT Sorts the extract dataset


Attributes of Data Objects


DESCRIBE Specifies the attributes of a data object


User Dialogs


CALL SCREEN Calls a screen sequence
CONTROLS Declaration of a control
EXIT FROM STEP-LOOP Exits a table control or step loop
GET CURSOR Reads the cursor position
GET PF-STATUS Determines the GUI status
LEAVE [TO] SCREEN Exits a screen
LOOP AT SCREEN Loop over 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 screen
SET TITLEBAR Sets the GUI title
SUPPRESS DIALOG Suppresses the screen


Selection Screens

PARAMETERS Definition of a parameter
SELECTION-SCREEN Definition of a selection screen or screen element
SELECT-OPTIONS Definition of a selection criterion



BACK Relative positioning of the list cursor
DESCRIBE LIST Determines the attributes 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 the 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 Positioning of 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 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 liste
SET PF-STATUS Sets the GUI status
SET LEFT SCROLL-BOUNDARY Sets the scroll boundaries of a list
SET TITLEBAR Sets the GUI-titles
SKIP Positioning of the List cursor
ULINE Displays a line on a list
WINDOW Displays a list in a dialog box.
WRITE Displays data in a list



MESSAGE Sends 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 via 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 Reads rows from a database table
UPDATE Changes rows in a database table


Native SQL

EXEC SQL ... ENDEXEC Definition of an area for Native SQL


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 Creates the directory of a data cluster


File Interface

CLOSE DATASET Closes a file
DELETE DATASET Deletes a file
GET DATASET Determines the attributes of a file
OPEN DATASET Opens a file
READ DATASET Reads a file
SET DATASET Sets the attributes of a file
TRANSFER Fills a file
TRUNCATE DATASET Changes the size of a file


Data Consistency

AUTHORITY-CHECK >Checks an authorization
COMMIT WORK Completion of a SAP LUW
ROLLBACK WORK Cancellation of 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 Determines the text environment
SET COUNTRY Sets output formats for lists
SET LANGUAGE Loads a text pool
SET LOCALE Sets the text environment


Date and Time Information

CONVERT DATE Converts date and time into a time stamp
CONVERT TIME STAMP Converts a time stamp into date and time
GET TIME Fills the system fields for date and time
GET TIME-STAMP Creates a time stamp


Processing Programs

Testing and Checking Programs

ASSERT Definition of an assertion
SET EXTENDED CHECK Controls the extended program check
BREAK-POINT Definition of a breakpoint
LOG-POINT Definition of a logpoint
GET RUN TIME Determines a measurement interval
SET RUN TIME ANALYZER Controls the runtime analysis
SET RUN TIME CLOCK Sets the measurement accuracy for measurement 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 Reads an ABAP program
READ TEXTPOOL Reads a text pool
SYNTAX-CHECK Calls the syntax check


ABAP Data and Communication Interfaces

Remote Function Call

RECEIVE Receives parameters for the Remote Function Call
WAIT UNTIL Waits for completion of the Remote Function Call



CALL TRANSFORMATION Calls an XSLT program or a Simple Transformation


OLE Interface

CALL METHOD Calls a method of the OLE Automation
CREATE OBJECT Creates an object of the OLE Automation
FREE OBJECT Releases memory in the OLE Automation
GET PROPERTY Reads an attribute in the OLE Automation
SET PROPERTY Sets an attribute of the OLE Automation



Source Coce Enhancements

ENHANCEMENT Implementation of a source code enhancement
ENHANCEMENT-POINT Definition of a source code enhancement
ENHANCEMENT-SECTION Definition of a source code enhancement


Enhancements Using BAdIs

GET BADI Creates a BAdI object
CALL BADI Calls BAdI methods


Obsolete Statements

Obsolete Declarations

FIELDS Addresses a data object
INFOTYPES Declaration of an internal table for HR info types
RANGES Declaration of a ranges table


Obsolete Program Call

CALL DIALOG Calls a dialog module


Obsolete Control Structure

ON CHANGE OF ... ENDON Obsolete branch


Obsolete Assignments

LOCAL Stores a data object temporarily
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
MAXIMUM Maximum value of outputs on a list
MINIMUM Minimum value of outputs on a list
MULTIPLY-CORRESPONDING Multiplication of structure components
SUBTRACT-CORRESPONDING Subtraction of structure components
SUMMING Summation of outputs on a list


Obsolete Character String Processing

CONVERT DATE|INVERTED-DATE Conversion of a character string into nine\'s complement
SEARCH Obsolete search in a character string


Obsolete Internal Table Processing

SEARCH itab Obsolete search in an internal table
WRITE TO itab Obsolete writing into an internal table



CONTEXTS Data type for contexts
DEMAND Queries a context
SUPPLY Fills the key fields of a context


Obsolete Statements for List Processing

DETAIL Intensity of the background color of a list
INPUT Input-ready status of a list
NEW-SECTION Controls a print list
SUMMARY Intensity of the background color of a list


Obsolete External Programming Interface

COMMUNICATION Controls the CPI-C interface


Internal Statements

Open SQL

COMMIT CONNECTION Completion of a SAP LUW on secondary database connection
ROLLBACK CONNECTION Cancellation of a SAP LUW on secondary database connection


Program Processing

DELETE DYNPRO Deletes a screen
DELETE REPORT Deletes an ABAP program
DELETE TEXTPOOL Deletes a text pool
EXPORT DYNPRO Exports a screen
EXPORT NAMETAB Exports a structure description
GENERATE DYNPRO Generates a screen
GENERATE REPORT Generates an ABAP program
LOAD REPORT Loads an ABAP program
IMPORT DYNPRO Imports a screen
IMPORT NAMETAB Imports a structure description
SCAN Splits an ABAP program into tokens
SYNTAX-CHECK FOR DYNPRO Syntax check for a screen
SYNTAX-TRACE Influences the syntax check


External Interface

CALL Calls a SE>c function of the ABAP runtime environment