List of System Fields in ABAP
These are the list of some the important System fields in ABAP and its details.
| System Fields | Type | System Field details |
| sy-abcde | c(26) | This Transaction code Contains the Latin alphabet. Can be used to access individual letters directly by specifying the offset/length, regardless of the code page. |
| sy-batch | c(1) | This Transaction code Set to “X” in an ABAP program that runs in the background, otherwise initial. |
| sy-binpt | c(1) | This Transaction code Set to “X” during processing of batch input sessions, and in ABAP programs called using CALL TRANSACTION USING. Otherwise initial. |
| sy-calld | c(1) | This Transaction code Contains a blank character in the first program in a call sequence, otherwise contains the value “X”. Is set to “X” after calls using CALL TRANSACTION, CALL DIALOG, or SUBMIT … AND RETURN. Empty if the program was started using LEAVE TO TRANSACTION or a transaction from the screen. A call using SUBMIT (without AND RETURN) assumes the value of the calling program. |
| sy-callr | c(8) | This Transaction code used When printing lists, contains a value that displays where printing was started – for example, NEW-PAGE for program-controlled printing, or RSDBRUNT for printing from the selection screen. |
| sy-colno | i | This Transaction code return Current position during creation of a list in the list buffer. Counting begins at 1. In non- Unicode systems, this position also corresponds to the column in the displayed list. In Unicode systems, this is only guaranteed for the lower and upper output limits applicable to each output, as one character may take up more columns in the list than positions in the list buffer. |
| sy-cpage | i | This Transaction code return Page number of the page displayed at the top of the list for which a list event was triggered. Counting begins at 1. |
| sy-cprog | c(40) | In procedures called externally, the name of the calling program, otherwise the name of the current program. If a procedure called externally calls another external procedure, sy-cprog contains the name of the framework program, and is not set to the name of the framework program of the subsequent calling program. |
| sy-cucol | i | This Transaction code return Horizontal cursor position in the display on a dynpro. Counting begins at column 2. |
| sy-curow | i | This Transaction code return Vertical cursor position on the screen display of a screen. Counting begins at line 1. |
| sy-datar | c(1) | At PAI, contains “X” if at least one input field of a screen has been changed by a user or by further data transfer, otherwise initial. |
| sy-datlo | d | Local date of the user – for example, “19990723″. Can be set using GET TIME. |
| sy-datum | d | This Transaction code return System date (local date of the AS ABAP). Can be set using GET TIME. |
| sy-dayst | c(1) | “X” during summertime, otherwise initial. |
| sy-dbcnt | i | SQL statements set the content of sy-dbcnt to the number of processed table lines. |
| sy-dbnam | c(20) | In executable programs, the linked logical database. |
| sy-dbsys | c(10) | Central database system – for example, “ORACLE”, “INFORMIX”. |
| sy-dyngr | c(4) | Screen group of the current screen. In the Screen Painter, several screens can be assigned to a common screen group, which can be used, for example, for making modifications to all screens in the group at once. |
| sy-dynnr | c(4) | This Transaction code return Number of the current screen. During selection screen processing, this is the current selection screen. During list processing, the number of the subscreen container. During processing of a subscreen dynpro (including in tabstrips), this screen number. |
| sy-fdayw | b | Factory calendar weekday, Monday = 1, …, Friday = 5. |
| sy-fdpos | i | Found location for certain searches in character-like and byte-like data objects. |
| sy-host | c(32) | Network name of the host on which the current application server is instantiated, for example “KSAP0001″, “HS01234″. |
| sy-index | i | This Transaction code return Loop index. In DO and WHILE loops, contains the number of the loop passes including the current pass. |
| sy-langu | c(1) | Single-character language key – for example, “D”, “E”, “F” – for the current text environment. Set according to the logon language of the user or by using the statement SET LOCALE. |
| sy-ldbpg | c(40) | In executable programs, the database program of the linked logical database. |
| sy-lilli | i | This Transaction code return List line for which a list event was triggered. Counting begins at 1 and includes the page header. |
| sy-linct | i | This Transaction code return Page length of the current list during list creation. sy-linct is 0 for a standard list of any length, and has a value that is not 0 for lists with a defined page length. |
| sy-linno | i | This Transaction code return Current list line during list creation. Counting begins at 1 and includes the page header. |
| sy-linsz | i | Line width of the current list in the list buffer during list creation. |
| sy-lisel | c(255) | Content of the list line in the list buffer, on which the cursor was positioned while a list event was triggered (restricted to the first 255 lines). |
| sy-listi | i | List level of the list for which a list event was triggered. |
| sy-loopc | i | Number of lines currently displayed in a table control. |
| sy-lsind | i | List level of the list that is currently being created (basic list: 0, details lists: greater than 0). For every interactive list event, sy-lsind is automatically increased by an increment of 1. sy-lsind can only be changed in ABAP programs for navigating between details lists. |
| sy-macol | i | When printing lists, contains the number of columns on the left edge. |
| sy-mandt | c(3) | Client identifier with which the user has logged on – for example, “401″, “800″. |
| sy-marow | i | When printing lists, contains the number of lines on the top margin. |
| sy-modno | i | Indexing of external sessions. Contains the value 0 in the first session. In new sessions that are opened using the Create Session function or by calling a transaction with /o in the command field of the standard toolbar, this value is increased by 1. |
| sy-msgid | c(20) | After the statement MESSAGE, contains the message class. |
| sy-msgno | n(3) | After the statement MESSAGE, contains the message number. |
| sy-msgty | c(1) | After the statement MESSAGE, contains the message type. |
| sy-msgv1 … sy-msgv4 | c(50) | After the statement MESSAGE, contain the contents of the fields that were used as placeholders in the message. |
| sy-opsys | c(10) | Operating system of the current application server – for example, “SOLARIS”, “HP-UX”. |
| sy-pagno | i | Current page in list creation. |
| sy-pfkey | c(20) | GUI status of the current dynpro. |
| sy-prdsn | c(6) | When printing lists, contains the name of the spool file. |
| sy-repid | c(40) | Name of the current ABAP program. For procedures called externally, name of the framework program of the procedure. If sy-repid is transferred as an actual parameter to an external procedure, the formal parameter is set to the name of the caller. |
| sy-saprl | c(4) | Release status of the AS ABAP, e.g. “46D”, “610″. |
| sy-scols | i | Number of columns of the current screen. |
| sy-slset | c(14) | Variant that was used for filling a selection screen. The associated program name is in sy-cprog. |
| sy-spono | n(10) | When printing lists, contains the name of the spool number. |
| sy-srows | i | Number of lines of the current screen. |
| sy-staco | i | Number of the first column displayed in the list for which a list event has been triggered. Counting begins at 1. |
| sy-staro | i | Number of the list line displayed at the top of the page at the top of the list, for which a list event was triggered. Counting begins at 1 and does not include the page header. |
| sy-stepl | i | Index of the current line in a table control. This is set for every loop pass. |
| sy-subrc | i | Return value that is set by many ABAP statements. In general, the value 0 means that the statement was executed with no problems. Depending on which statement was used to set sy-subrc, the cause of any errors can be derived from the corresponding value. The content of sy-subrc is not defined after statements for which the setting of sy-subrc is not documented explicitly. |
| sy-sysid | c(8) | Name of the AS ABAP, for example “S01″, “K99″.. |
| sy-tabix | i | Line number in the table index of an internal table. Contains the last line accessed with a primary or secondary table index. Is set to 0 when accessed with a hash algorithm. |
| sy-tcode | c(20) | Name of the current transaction code. Initial in background processing unless a transaction was called during background processing. |
| sy-tfill | i | In the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, sy-tfill is filled with the number of lines in the internal table that has been addressed. |
| sy-timlo | t | Local time of the user, for example “152557″. Can be set using GET TIME. |
| sy-title | c(70) | Text that appears in the title bar of the screen. |
| sy-tleng | i | In the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, sy-tleng is filled with the line size of the internal table that is being addressed. |
| sy-tvar0 … sy-tvar9 | c(20) | These system fields can be assigned values in the program. At the event TOP-OF-PAGE, the content of sy-tvar0 to sy-tvar9 replaces the placeholders “&0″ to “&9″ in the list and column headers of the text elements of the program. |
| sy-tzone | i | Time difference to the UTC reference time in seconds – for example, “3600″, “10800″. |
| sy-ucomm | c(70) | Function code that triggered the event PAI. |
| sy-uline | c(255) | Contains a horizontal line of length 255 for displaying in lists. |
| sy-uname | c(12) | User’s logon name – for example, “KELLERH”. |
| sy-uzeit | t | System time (local time of the AS ABAP). Can be set using GET TIME. |
| sy-vline | c(1) | Contains a vertical line (|) for displaying in lists. |
| sy-wtitl | c(1) | In the statements REPORT, PROGRAM, and FUNCTION-POOL, set to “N” if the addition NO STANDARD PAGE HEADING is used, otherwise initial. |
| sy-zonlo | c(6) | Time zone of the user – for example, “CET”, “PST”. |
Related SAP Training Study materials and help guides
- TOP-OF-PAGE event in ABAP Usage : TOP-OF-PAGE [DURING LINE-SELECTION]. Addition: DURING LINE-SELECTION This statement defines an event block whose event is triggered by the ABAP runtime environment during the creation of a list. This occurs when a new page is started – that is, immediately before the first line in a new page is to be output. All list [...]...
- END-OF-PAGE event in ABAP Usage: END-OF-PAGE. This statement defines an event block that is raised by the ABAP-runtime during creation of a basic list, if there is a line reservation in the addition LINE-COUNT of the initiating statement for a page footer, which was reached while writing to this page. A list output that takes place in the event [...]...
- ABAP Reporting Study material The ABAP Reporting Study Material provides an introduction on how to create report lists.This study material presents the menu-supported tool for generating report lists, introduces report programming, the fundamental topics of reading data from a database writing data to the screen explains what logical databases are and how to use them, describes the event concept [...]...
- AT LINE-SELECTION event in ABAP Usage : AT LINE-SELECTION. This statement defines an event block whose event is triggered by the ABAP runtime environment during the display of a screen list – provided the scren cursor is on a list line and you select a function using the function code PICK. Through the definition of this event block, the standard [...]...
- INITIALIZATION event in ABAP Usage: INITIALIZATION. This event keyword defines an event block whose event is triggered by the ABAP runtime environment during the flow of an executable program, directly after LOAD-OF-PROGRAM and before the selection screen processing of any existing standard selection screen. This gives you the one-time opportunity to initialize the input fields of the selection screen, [...]...
- AT PF## event in ABAP Usage : AT PF##. This statemet defines an event block whose event is triggered by the ABAP runtime environment during list display – provided the screen cursor is on a list line and a function is selected using the function code PF##. Here ## stands for a number between 01 and 24. In the= standard [...]...
- System Class for Formatting Lists in ABAP Here is the System Class for Formatting Lists in ABAP. The methods of the class CL_ABAP_LIST_UTILITIES can be used for the calculation of output lengths, the conversion of values from the list buffer, and the calculation of required output lengths on lists.The return values of these methods can be used to program the correct column [...]...
- AT SELECTION-SCREEN event in ABAP Usage : AT SELECTION-SCREEN selscreen_event. This statement defines event blocks for different events selscreen_event that are triggered by the ABAP runtime environment during selection screen processing.Selection screen events occur immediately before sending a selection screen and after certain user actions on a displayed selection screen. They assist in selection screen processing in the ABAP program.AT [...]...
- SYST – ABAP System Fields SYST – ABAP System Fields ABAP system fields are filled by the ABAP runtime environment and can be used in an ABAP program to query system states. Except for one field(sy-repid), the system fields are variables, but nevertheless they should be used only for readaccess, because otherwise important information for the subsequent program execution may [...]...
- AT USER-COMMAND event in ABAP Usage : AT USER-COMMAND. This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen....
Google: Facebook: