Abap System Fields
Abap System Fields
SY-DBSYS
SY-HOST
Application server .
SY-OPSYS
SY-SYSID
SY-LANGU
SY-MANDT
SY-MODNO
SY-UNAME
SY-DATUM
SY-FDAYW
SY-TIMLO
SY-UZEIT
SY-CALLD
If the program is started using CALL TRANSACTION / DIALOG, or SUBMIT [AND RETURN] its value is 'X'. If the program is started using LEAVE TO TRANSACTION or using a transaction code from a screen or when a batch input session is in progress its value is ' ' .
SY-CPROG
The name of the current program and name of the calling program within a procedure.
SY-DBNAM
SY-DYNGR
SY-DYNNR
SY-LDBPG
SY-REPID
SY-TCODE
SY-BINPT
X while a batch input session is running and when an ABAP program is called using CALL TRANSACTION USING, otherwise space.
SY-ABCDE
It is a constant and contains alphabets(AB..Z). What ever the code page its value remains same.
SY-ULINE
SY-VLINE
Loops
SY-INDEX
WithIn a loop it contains the number of loop passes including the current pass and is set by ABAP commands DO,WHILE.
Strings
SY-FDPOS
It contains the location of a hit in string operations. used with CO,CN, CA, NA, CS, NS, CP, and NP, offset values are assigned to SY-FDPOS depending on the search result.
Internal Tables
SY-TABIX
Current line of an internal table. It is set only for index tables. The field is either not set or is set to 0 for hashed tables. It is set by ABAP commands APPEND, COLLECT, LOOP AT, READ TABLE, SAERCH itab FOR .
SY-TFILL
After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.
Database Access
SY-DBCNT
It contains the number of table entries processed. In an loop it is not set until after the ENDSELECT or ENDEXEC statement. It is set by ABAP commands DELETE,FETCH,INSERT,MODIFY and UPDATE.
SY-SUBRC
Return code set by the last ABAP statement. if it is 0 it means the statement was a success.
A group of system fields is set in the PAI event of each screen. Exceptf SY-DATAR, SY-LOOPC, and SY-STEPL, these can be used in list processing.
SY-CUCOL
SY-CUROW
SY-DATAR
This field contains 'X' if at least one input field on the screen was changed by the user , otherwise it is space.It can be used to determine if user has made any
SY-LOOPC
Number of lines currently displayed in a table control. Can be used to determine the step loop blocks in the screen and for scrolling functionality.
SY-PFKEY
GUI status of the current screen. This can be set in the PBO event using the SET PFSTATUS statu OF PROGRAM rep statement.
SY-SCOLS
SY-SROWS
SY-STEPL
Index of the current line in a table control. This is set in each loop pass. SY-STEPL does not have a meaningful value outside the loop (for example, during the POV event for a table line).
SY-TITLE
It contains the text that appears in the title bar of the screen. For selection screens and lists it is the program name,it can be set using the SET TITLEBAR statement.
SY-UCOMM
It contains the function code that triggered the PAI event.ENTER triggers the PAI but this field will remain blank if no function code is attached to ENTER key.
Selection Screens
SY-SLSET
SY-COLNO
It contains the current column during list creation starting at 1. The field is set by the output statements WRITE,ULINE,SKIP,POSITION,NEW-LINE,NEW-PAGE and BACK (sets it to 1).
SY-LINCT
It contains length of the page in the list.Its value is 0 if the length of page is infinite.
SY-LINNO
It contains the current line during list creation begining from 1, and includes the page header. SY-LINNO is set by the ABAP output statements which are same as SYCOLNO.
SY-LINSZ
It contains the line width in the list. The default value is the default window width. You can change the line width of the list using the LINE-SIZE addition in the REPORT or NEW-PAGE statement. The default value is 84 .
SY-PAGNO
You can assign values to these variables in your programs. Their contents replace the placeholders in the list and column headers of the program in the TOP-OF-PAGE event.
SY-MSGID
SY-MSGNO
SY-MSGTY
SY-MSGV1,,SY-MSGV4