This document lists many ABAP system variables, which are variables that provide information about the current state of the ABAP runtime environment. Some examples included are SY-CPROG for the current program name, SY-DATUM for the system date, and SY-UNAME for the session user. These system variables can be used in ABAP programs to obtain runtime context and pass information between different parts of a program.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
701 views
ABAP System Variables
This document lists many ABAP system variables, which are variables that provide information about the current state of the ABAP runtime environment. Some examples included are SY-CPROG for the current program name, SY-DATUM for the system date, and SY-UNAME for the session user. These system variables can be used in ABAP programs to obtain runtime context and pass information between different parts of a program.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4
List of ABAP system variables.
SY-CPAGE Holds Current Page Number
SY-CPROG Contains Program Name SY-CUCOL Cursor Position ( Column) SY-CUROW Cursor Position (Line) SY-DATLO Local Date for User SY-DATUM System Date SY-DATUD Global Date Related To UTC ( GMT ) SY-DBCNT Number of entries read by DB Operation SY-DBNAM Logical DB for ABAP/4 Program SY-DBSYS System DB System SY-DYNNR Number of Current Screen SY-INDEX Number Of Loop passes SY-LANGU SAP Log on Language Key SY-LILLI Number Of Current List Line SY-LINCT Number Of List Lines SY-LINNO Current Line for List Creation SY-LINSZ Line Size of List SY-LISEL Selected Line For Interactive List SY-LSIND Number Of Secondary List SY-MANDT Client Number For SAP Log On SY-MSGID Message ID SY-MSGTY Message Type SY-MSGNO Message Number SY-MSGV1 Message Variable 1 SY-MSGV2 Message Variable 2 SY-MSGV3 Message Variable 3 SY-MSGV4 Message Variable 4 SY-OPSYS Operating System SY-PAART Print Format SY-PAGCT Page Size of List in Report Program SY-PAGNO Current Page in the List SY-PDEST Print Output Device SY-PFKEY Run time Current F key Status SY-REPID Report Name in ABAP SY-SAPRL SAP Release SY-SUBRC Return Value after specific ABAP Statement SY-SYSID SAP system ID SY-TABIX Current line of Internal Table SY-TCODE Current Transaction Code SY-TIMLO Local Time Of User SY-TITLE Title of ABAP Program SY-TMAXL Maximum entries in a Internal Table SY-TNAME Name Of Internal Table after first Access SY-UCOMM Interact : Command field Function entry / Function code SY-ULINE Underline SY-UNAME Session : SAP user from Log On SY-UZEIT System Time SY-VLINE Vertical Bar List of ABAP system variables.
SY-ABCDE Contains the Latin alphabet. Can be used to
access individual letters directly by specifying the offset/length, regardless of the code page. SY-BATCH "X" in an ABAP program running in the background; otherwise initial. SY-BINPT "X" when processing batch input sessions and in ABAP programs called by CALL TRANSACTION USING; otherwise initial. These defaults can be overridden using the addition OPTIONS FROM of the statement CALL TRANSACTION ... USING. SY-CALLD A blank in the first program of a call sequence; otherwise "X". 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 by a transaction code entered on the screen. A call using SUBMIT (without AND RETURN) takes the value of the calling program. SY-CALLR When spooling lists, contains a value that indicates where spooling was started, for example NEW-PAGE for program-driven spooling or RSDBRUNT for spooling from the selection screen. SY-COLNO Current position when a list is created in the list buffer; set whenever an output statement is used. Counting begins at 1. This position corresponding to the column in the displayed list is only guaranteed for the lower and upper output limits, since a single character may occupy more columns in the list than positions in the list buffer. See also Lists - System Fields. SY-DATAR Contains "X" for PAI, if at least one input field of a screen was changed by a user or some other data being passed. SY-DAYST "X" in summer time in the system time zone; otherwise initial. See System Fields for Date and Time. SY-DYNGR Screen group of the current dynpro. In Screen Painter, multiple dynpros can be assigned to the same screen group, which can be used, for example, to make modifications to all screens in the group at once. SY-FDAYW Factory calendar weekday in the system time zone; Monday = 1, ..., Friday = 5. See System Fields for Date and Time. SY-FDPOS Occurrence after certain operations on character-like or byte-like data objects (for example FIND or comparisons). SY-HOST Network name of the computer on which the current application server is instantiated, for example "KSAP0001" or "HS01234". List of ABAP system variables.
SY-LDBPG In executable programs, the database program
of the associated logical database. SY-LISTI List level of the list in which a list event was raised. SY-LOOPC Number of currently displayed rows in a table control. Set after the event PAI. SY-MACOL Number of columns on the left margin when spooling lists. Set by the statement SET MARGIN. SY-MAROW Number of rows on the top margin when spooling lists. Set by the statement SET MARGIN. SY-MODNO Indexing of the ABAP 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. If previous sessions were deleted, only the free numbers are allocated again. Sessions opened with CALL FUNCTION ... STARTING NEW TASK start at 0 again. SY-SCOLS Number of columns in the current screen layout. Set after the event PAI. SY-SLSET Variant used to fill a selection screen. The associated program name can be seen in sy- cprog. SY-SPONO Contains the name of the spool number when spooling lists. SY-SROWS Number of rows in the current screen layout. Set after the event PAI. SY-STACO Number of the first displayed column of the list in which a list event was raised. Counting begins at 1. See also Lists - System Fields. SY-STARO Number of the top displayed list line of the top displayed page of the list where a list event was raised. Counting begins at 1 and does not include the page header. See also Lists - System Fields. SY-STEPL Index of the current row in a table control. This is set for every loop pass. Outside of a loop, for example after the event POV or POH for a table row, the content of sy-stepl is undefined. SY-TFILL In the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, sy-tfill is given the number of rows of the accessed internal table. SY-TLENG In the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, sy-tleng is given the row size of the accessed internal table. List of ABAP system variables.
SY-TVAR0 Values can be assigned to these system fields in
SY-TVAR1 the program. In the event TOP-OF-PAGE, the SY-TVAR2 content of sy-tvar0 through sy-tvar9 replaces the SY-TVAR3 placeholders "&0" through "&9" in the list SY-TVAR4 headers and column headers of the text SY-TVAR5 elements of the program. SY-TVAR6 SY-TVAR7 SY-TVAR8 SY-TVAR9 SY-TZONE Time difference of the system time to the UTC reference time in seconds, for example "3600" or "10800". See System Fields for Date and Time. SY-WTITL Set to "N" in the statements REPORT, PROGRAM, and FUNCTION-POOL, if the addition NO STANDARD PAGE HEADING is used; otherwise initial. The statement NEW-PAGE does not set sy-wtitl. SY-ZONLO User time zone, for example "CET" or "PST". See System Fields for Date and Time.