This is section about ABAP.
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.
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 |
FORM ... ENDFORM | Definition of a subroutine |
FUNCTION ... ENDFUNCTION | Definition of a function module |
METHOD ... ENDMETHOD | Definition of a method |
MODULE ... ENDMODULE | Definition of a dialog module |
DEFINE ... END-OF-DEFINITION | Definition of a macro |
INCLUDE | Inclusion of an include program |
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 |
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 |
CREATE DATA | Creation of an anonymous data object |
CREATE OBJECT | Creation of an object |
CALL TRANSACTION | Calls a transaction |
LEAVE TO TRANSACTION | Calls a einer transaction |
SUBMIT | Calls an executable program |
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 |
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 |
DO ... ENDDO | Loop |
CASE ... WHEN ... ENDCASE | Branch |
IF ... ELSEIF ... ELSE ... ENDIF | Branch |
WHILE ... ENDWHILE | Loop |
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 |
MOVE | Assignment to conversion rule |
MOVE-CORRESPONDING | Assignment of structure components |
UNPACK | Unpacks a packed number |
WRITE TO | Assignment in list format |
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 |
COMPUTE | Calculates an arithmetic or bit expression |
ADD | Addition of numeric data objects |
DIVIDE | Division of numeric data objects |
MULTIPLY | Multiplication of numeric data objects |
SUBTRACT | Subtraction of numeric data objects |
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 |
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 |
DESCRIBE | Specifies the attributes of a data object |
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 |
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 |
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 |
EXEC SQL ... ENDEXEC | Definition of an area for Native SQL |
EXIT FROM SQL | Exits Native SQL |
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 |
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 |
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 |
GET PARAMETER | Reads an SPA/GPA parameter |
SET PARAMETER | Sets an SPA/GPA parameter |
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 |
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 |
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 |
EDITOR-CALL FOR REPORT | Calls the ABAP Editor |
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 |
CALL FUNCTION DESTINATION | 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 |
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 |
ENHANCEMENT | Implementation of a source code enhancement |
ENHANCEMENT-POINT | Definition of a source code enhancement |
ENHANCEMENT-SECTION | Definition of a source code enhancement |
GET BADI | Creates a BAdI object |
CALL BADI | Calls BAdI methods |
FIELDS | Addresses a data object |
INFOTYPES | Declaration of an internal table for HR info types |
RANGES | Declaration of a ranges table |
CALL DIALOG | Calls a dialog module |
ON CHANGE OF ... ENDON | Obsolete branch |
LOCAL | Stores a data object temporarily |
MOVE-PERCENTAGE | Assigns a subobject of a data object |
PACK | Packs a packed number |
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 |
CONVERT DATE|INVERTED-DATE | Conversion of a character string into nine\'s complement |
SEARCH | Obsolete search in a character string |
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 |
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 |
COMMUNICATION | Controls the CPI-C interface |
COMMIT CONNECTION | Completion of a SAP LUW on secondary database connection |
ROLLBACK CONNECTION | Cancellation of a SAP LUW on secondary database connection |
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 |
CALL | Calls a SE>c function of the ABAP runtime environment |
Predefined Functions - Overview
The following tables show the predefined functions by purpose. Predefined functions are generally processing functions or description functions.
Logical Functions
Function | Meaning |
boolc, boolx | Boolean functions |
contains, contains_any_of, contains_any_not_of | Predicate functions for strings |
matches | Predicate function for strings |
Numerical Functions
Function | Meaning |
abs, ceil, floor, frac, sign, trunc | General numerical functions |
nmax, nmin | Numerical extremum functions |
acos, asin, atan, cos, sin, tan, cosh, sinh, tanh, exp, log, log10, sqrt | Floating point functions |
round, rescale | Rounding functions |
String Functions
Function | Meaning |
char_off, charlen, dbmaxlen, numofchar, strlen | Length functions |
cmax, cmin | Character-like extremum value functions |
count, count_any_of, count_any_not_of | Search functions |
distance | Similarity function |
condense | Condense function |
concat_lines_of | Concatenation function |
escape | Escape symbol function |
find, find_end, find_any_of, find_any_not_of | Search functions |
insert | Insert function |
match | Substring function |
repeat | Repeat function |
replace | Replace function |
reverse | Reverse function |
Segment | Segment function |
shift_left, shift_right | Shift functions |
substring, substring_after, substring_from, substring_before, substring_to | Substring functions |
to_upper, to_lower, to_mixed, from_mixed | Case functions |
translate | Translation function |
Byte String Functions
Function | Meaning |
xstrlen | Length function |
bit_set | Bit function |
Table Functions
Function | Meaning |
lines | Row function |
This section will give tips and tricks for technical stuff.
You can use T-code = SE14 to empty the entire table.
Be careful and do NOT delete the actual table, just the data.
Suppose you want to change "<HTML><B>Sample Text</B></HTML>" to "Sample Text".
Use following function modules.
SOTR_TAGS_REMOVE_FROM_STRING
HRDSYS_CONVERT_FROM_HTML
SWA_STRING_REMOVE_SUBSTRING
Other option is to use Regular Expressions.
DATA: message TYPE string.
message = '<p style="something">Hello <strong>World</strong>!</p>'.
REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>' IN message with space.
WRITE:/ message.
Use function module = SCP_REPLACE_STRANGE_CHARS
Test to replace: Ö Ä Ü SÓNIA GONÇALVES
1) You can use report RPR_ABAP_SOURCE_SCAN.
2) Old method is to use report RSRSCAN1. Use with the Z* in the program parameter to search in custom programs only.
Otherwise, it will take a long time to search. Enter the string to-be-searched in "Find string parameter".
3) Try transaction EWK1.
If you already know program name:
Then use the function "Find in source code" in the ABAP Editor instead.
(Transaction SE38, Menu "Utilities" -> Find in Source Code) or Use program SAPLS_SEARCH
You can do "Program>Check>Extended Program Check". Check all the boxes and execute. It will tell you all those literals which are hard-coded like this with a warning saying that they may not be translated.
Alternately, you can also use transaction SLIN
The results are shown as following. You can double click on errors etc. for more details.
We can write ABAP code that will be executed for a particular variant only.
For this, we use ABAP system fields from SYST structure.
Sample code is as follows:
IF sy-slset = 'XI_SHARP_RESET'.
gs_output-removal_flag = 'Y'.
ELSE.
gs_output-removal_flag = 'N'.
ENDIF.
In the above code, removal flag is set to 'Y' only if program is run using variant name = 'XI_SHARP_RESET'.
For any other variant, it is set to 'N'.
This page will give a few technical tips.
SAPMSYST is the program that is executed when we try to log-on to SAP system.
You cannot read the code for this program.
The code for this program is protected by SAP to prevent any changes to it.
1) I have read that the only solution to view the code is to make a Transport order and, at when SAP import, it un-compress the data, at this moment you could see the code
You go in SE01, create a transport order, enter manually the key R3TR PROG SAPMSYST, save, release the OT. Then open your debug in the STMS when you ask SAP to make an import .
2) I have read on a few blogs saying that this program is protected when writing the ABAP Code with some string and this can be removed only during the transportation.
The source code is protected by a keyword : *@#@@[SAP]
3) ABAP source code is saved in table REPOSRC
Check Database View D010SINF SQLX field.
The source code is hidden when SQLX field is set to 'X'.
Links
[1] https://www.uday.net/user/login?destination=node/402%23comment-form
[2] https://www.uday.net/user/login?destination=node/531%23comment-form
[3] https://www.uday.net/taxonomy/term/47
[4] https://www.uday.net/user/login?destination=node/399%23comment-form
[5] https://www.uday.net/user/login?destination=node/416%23comment-form
[6] https://www.uday.net/user/login?destination=node/417%23comment-form
[7] https://www.uday.net/user/login?destination=node/415%23comment-form
[8] https://www.uday.net/user/login?destination=node/410%23comment-form
[9] https://www.uday.net/user/login?destination=node/537%23comment-form
[10] https://www.uday.net/user/login?destination=node/424%23comment-form
[11] https://www.uday.net/user/login?destination=node/526%23comment-form
[12] https://www.uday.net/user/login?destination=node/534%23comment-form
[13] https://www.uday.net/user/login?destination=node/536%23comment-form
[14] https://www.uday.net/user/login?destination=node/535%23comment-form
[15] https://www.uday.net/user/login?destination=node/532%23comment-form
[16] https://www.uday.net/user/login?destination=node/533%23comment-form
[17] https://www.uday.net/user/login?destination=node/527%23comment-form
[18] https://www.uday.net/user/login?destination=node/529%23comment-form
[19] https://www.uday.net/user/login?destination=node/530%23comment-form