2007 Jul 30 7:22 AM
hi,
Name a few system global variables you can use in ABAP programs?
Is it <b>sy-subrc</b>.
Regards
Ashok
2007 Jul 30 7:29 AM
Hi,
Goto se11 and find the table SYST.
You will find in this table the list of system variables used.
Few examples
SY-LANGU (logon language)
SY-UZEIT (current time)
SY-DATUM (current date)
SY-UNAME (user name)
2007 Jul 30 7:24 AM
U can see all system variables in Table SYST.
Reward if useful
2007 Jul 30 7:26 AM
2007 Jul 30 7:28 AM
2007 Jul 30 7:29 AM
Hi,
SY-DBSYS
Central database system (such as INFORMIX or ORACLE)
SY-HOST
Application server (such as HS0333, PAWDF087 )
SY-OPSYS
Operating system of the application server (such as HP-UX, SINIX)
SY-SAPRL
R/3 Release in use (such as 30D, 46A, )
SY-SYSID
R/3 System name (such as B20, I47, ...)
Information About the Current Terminal Session
SY-LANGU
One-character language key with the users logon language (such as D, E, F )
SY-MANDT
Client in which the user is logged on (such as 000, 400 )
When you use Open SQL to access the database, SY-MANDT is used as the first key field in the WHERE clause.
SY-MODNO
Index of the external sessions. The first session has the index zero. The value is increased by one each time you choose System ® Create session or start a transaction by entering /o. If you have deleted sessions, the system fills free numbers before increasing the count further. Sessions started using CALL TRANSACTION STARTING NEW TASK begin again at 0.
SY-UNAME
Username of the current user, such as KELLERH, BC400-01
Information About Current Date and Time
The following system fields are always set automatically. The GET TIME statement synchronizes the time on the application server with the time on the database server and writes it to the field SY-UZEIT. SY-DATUM and the system fields for the local timezone (SY-TIMLO, SY-DATLO, and SY-ZONLO) are also reset.
SY-DATLO
Users local date, for example 19981129, 19990628,
SY-DATUM
Current application server date, for example 19981130, 19990627,
SY-DAYST
X during summertime, otherwise space.
SY-FDAYW
Factory calendar day of the week: Monday = 1 Friday = 5.
SY-TIMLO
Users local time, for example 154353, 225312,
SY-TZONE
Time difference in seconds between local time and Greenwich Mean Time (UTC), for example, 360, 10800.
SY-UZEIT
Current application server time. for example 164353, 215312,
SY-ZONLO
Users time zone, for example, EST, UTC,
Information About the Current ABAP Program
SY-CALLD
X if the program was started using CALL TRANSACTION, CALL DIALOG, or SUBMIT . Space if the program was started using LEAVE TO TRANSACTION or using a transaction code from a screen. SY-CALLD is always space when a batch input session is being processed.
SY-CPROG
The name of the calling program in an external routine, otherwise the name of the current program.
SY-DBNAM
The name of the logical database linked to an executable program.
SY-DYNGR
Screen group to which the current screen belongs. You can assign several screens to one screen group, for example, to allow you to modify them all identically.
SY-DYNNR
Number of the current screen. During selection screen processing, SY-DYNNR contains the screen number of the current selection screen. During list processing, it contains the number of the container screen. During subscreen processing, SY-DYNNR contains the number of the subscreen. This also applies to tabstrip controls.
SY-LDBPG
In executable programs, the database program of the associated logical database.
SY-REPID
Name of the current ABAP program. For externally-called procedures, it is the name of the main program of the procedure. If you pass SY-REPID as an actual parameter to an external procedure, the formal parameter does not contain the name of the caller, but that of the main program of the procedure. To avoid this, assign SY-REPID to an auxiliary variable and use that in the call, or use the system field SY-CPROG.
SY-TCODE
The current transaction code.
Background Processing
SY-BATCH
X if the ABAP program is running in the background, otherwise space
Batch Input
SY-BINPT
X while a batch input session is running and when an ABAP program is called using CALL TRANSACTION USING, otherwise space.
OPTIONS FROM in the CALL TRANSACTION USING statement can set SY-BINPT to space either for the entire duration of the program, or at the end of the BDC data.
SY-BINPT is always space during a CATT procedure.
Reward if helpful.
Regards,
Karthick.
2007 Jul 30 7:29 AM
Hi,
Goto se11 and find the table SYST.
You will find in this table the list of system variables used.
Few examples
SY-LANGU (logon language)
SY-UZEIT (current time)
SY-DATUM (current date)
SY-UNAME (user name)