Systems variables

what are systems variables ?
Regards,
Jagan

ABAP system fields are always available in ABAP programs. The runtime system fills them according to context. They can then be used in programs to query the system status. System fields are variables but you should always treat them as though they were constants, and only read them. If you change their values, important information for the flow of the program may be lost. In exceptional circumstances, system fields may be overwritten in an ABAP program to control the system – for example, SY-LSIND (for navigating to a detail list).
With one exception the names and data types of the system fields are stored in the ABAP Dictionary in the SYST structure and realized as components of the predefined structure SY in ABAP programs.
The system field SY-REPID is not part of SYST or SY. Instead, every program contains the predefined constants SY-REPID and SYST-REPID, which both contain the name of the corresponding program. Furthermore, there are two predefined types of the same name, SY-REPID and SYST-REPID.
All system fields are addressed using SY field name and their types using SYST field name.
here is a list of some important system variables
INDEX
SYINDEX
INT4
10
0
Loops, number of current pass
PAGNO
SYPAGNO
INT4
10
0
List creation, current page
TABIX
SYTABIX
INT4
10
0
Internal table, current line index
TFILL
SYTFILL
INT4
10
0
Internal tables, current number of lines
DBCNT
SYDBCNT
INT4
10
0
DB operations, number of table lines processed
FDPOS
SYFDPOS
INT4
10
0
Character strings, offset in character string
COLNO
SYCOLNO
INT4
10
0
List creation, current column of list
LINCT
SYLINCT
INT4
10
0
List processing, page length of list
LINNO
SYLINNO
INT4
10
0
List creation, current line
LINSZ
SYLINSZ
INT4
10
0
List creation, width of list
SUBRC
SYSUBRC
INT4
10
0
Return value, return value after ABAP statements
LILLI
SYLILLI
INT4
10
0
List processing, current list line
LSIND
SYLSIND
INT4
10
0
List processing, details list index
STEPL
SYSTEPL
INT4
10
0
Screens, current table line index
LOOPC
SYLOOPC
INT4
10
0
Screens, number of lines visible in table
LANGU
SYLANGU
LANG
1
0
R/3 System, current language
MANDT
SYMANDT
CLNT
3
0
R/3 System, client number from logon
DBSYS
SYDBSYS
CHAR
10
0
R/3 System, name of central database system
SYSID
SYSYSID
CHAR
8
0
R/3 System, name of R/3 System
SAPRL
SYSAPRL
CHAR
4
0
R/3 System, system release
TCODE
SYTCODE
CHAR
20
0
ABAP program, current transaction code
DATUM
SYDATUM
DATS
8
0
Date and time, current (application server) date
UCOMM
SYUCOMM
CHAR
70
0
Screens, function code triggered by PAI
UZEIT
SYUZEIT
TIMS
6
0
Dat and time, current application server time
UNAME
SYUNAME
CHAR
12
0
R/3 System, user logon name
MSGLI
SYMSGLI
CHAR
60
0
Messages, message line
TITLE
SYTITLE
CHAR
70
0
Screens, title text
LISEL
SYLISEL
CHAR
255
0
List processing, contents of selected line
ULINE
SYULINE
CHAR
255
0
Constants, horizontal line with length 255
MSGID
SYMSGID
CHAR
20
0
Messages, message class
MSGID
SYMSGID
CHAR
20
0
Messages, message class
MSGTY
SYMSGTY
CHAR
1
0
Messages, message type
MSGNO
SYMSGNO
NUMC
3
0
Messages, message number
MSGV1
SYMSGV
CHAR
50
0
Messages, message variables
MSGV2
SYMSGV
CHAR
50
0
Messages, message variables
MSGV3
SYMSGV
CHAR
50
0
Messages, message variables
MSGV4
SYMSGV
CHAR
50
0
Messages, message variables
VLINE
SYVLINE
CHAR
1
0
Constants, vertical bar
HOST
SYHOST
CHAR
32
0
R/3 System, Name of application server
the link is
http://abaplovers.blogspot.com/2008/02/list-of-important-system-variables.html
do reward if helpful

Similar Messages

  • Error in using System Variable

    Dear all,
             I want to use System Variable 225 ( VAT percent (per VAT code) ) which is used in one of document i.e. "VAT Only Invoice".
    When I used it in my Invoice document the following error occurs:
    Printing Error : Invalid Variable number (RPT -6300)(Field:F_XXX) Variable 'XXX'
    Please help me to use this System Variable in my Invoice.
    Note: I have already read "How To Use the PLD Variables File in Release 2007 A" .pdf file.
    can any one tell the meaning of folowing which is in the sheet "vars utilisation" of PLD_Vars_march2007 xls file
    " it means that this variable can be used only under certain repetitive area exclusive numbers (109, 126, 132, 135, 139, 148, 149, 309, 316, 427, 502, 509, 686)
    Regards,
    Ghazanfar
    Edited by: Ghazanfar Ahmed on Jun 18, 2009 12:16 PM

    Hi,
    It is a special variable available for the VAT summary part, not to be used in the rows but in a separate repetitive area.
    To display the respective VAT rates in each row, create a database field instead: Tax Definition - Rate%. It will populate the VAT percentage for you.
    Regards,
    Nat

  • Details of System Variables?

    I need to know the details about system variables like
    sy_index,sy_lilli etc..

    SYST is a structure , you should use transaction SE11 to view the same.
    check out the link
    http://help.sap.com/saphelp_46c/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm
    Regards
    Raja
    can you go to your original question click on the pencil button and mark it as a question and reward the answers which were helpful to you.

  • Which system variable is reset at the exit of a loop of an internal table

    which system variable is reset at the exit of a loop of an internal table
    a)sy-loop b)sy-index c)sy-dbcnt d)sy-tabix

    You might want to revist your threads from Friday, and award points and mark as "Answered" or "Solved".
    Regards,
    Rich Heilman

  • System variables in R/3 when badi is triggered from portal

    Hi,
       How can we know the action from the portal,i mean from the create expense report i want to throw an error message if the user press "Review" button based on my validation. i have written in the badi,but when the user press "Previous step" button also this badi is getting triggered and as per the validation it is throwing an error message, i cannot go back. Are there any system variables that we can capture which button he pressed from the portal so that i can control to throw an error message only when the user press "Review" button.
    Thanks & Regards,
    Anil kumar

    Resolved

  • System variables in R/3 for the action from the portal

    Hi,
    How can we know the action from the portal,i mean from the create expense report i want to throw an error message if the user press "Review" button based on my validation. i have written in the badi,but when the user press "Previous step" button also this badi is getting triggered and as per the validation it is throwing an error message, i cannot go back. Are there any system variables that we can capture which button he pressed from the portal so that i can control to throw an error message only when the user press "Review" button.
    Thanks & Regards,
    Anil kumar

    Resolved

  • What are the systems variables in oracle

    Hai All
    In oracle what is called system variable and types of system variables
    Good answer hepls me
    Thanks & Regards
    Srikkanth.M

    SET System Variable Summary
    Source:http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm
    Oracle environment variables
    The following environment variables are valid for Oracle::
    ORACLE_HOME
    ORACLE_BASE (optional)
    ORA_NLS (optional)
    NLS_LANG (optional)
    TNS_ADMIN (optional)
    Source:http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.websphere.ii.foundation.conn.fw.orc.doc/configuring/iiylsorcenvvars.html
    ORACLE_SID is the name of the database instance that you are using.
    T2KDEV is set to the type of terminal you are using; sun if you are using openwindows; xsun if you are using X windows.
    TERM is set to the type of terminal you are using. Note: If you are using openwindows, you may have to redefine the variable TERM to sun (instead of cmd-sun) and you should execute ORACLE from a shelltool.
    TWO_TASK is set to the location where ORACLE server can be found and will normally be the name of the database instance. This variable helps simplify the command line for starting ORACLE tools.
    Source:http://ugweb.cs.ualberta.ca/~c391/manual/chapt3.html
    HTH
    Girish Sharma
    Edited by: Girish Sharma on Mar 3, 2010 9:16 AM
    Link and Text added.

  • Using System Variables in a SQL Query

    Hi!
    I´m new to Oracle and SQL so i don´t know very much about it.
    There is miy Problem:
    Is there a way to Use the System Variable %USERNAME% in an SQL Query?
    I tried .... where table.shorttag = '%USERNAME%' ;
    but this doesnt work.
    Is Oracle able to handle Systemvariables? Or is there another way to use the current Windows User in an SQL Query.
    It is very Important to use the current Windows user and not the Oracle user.
    Thank you,
    Mfg

    Are you looking for something like this ?
    SQL> SELECT sys_context('USERENV', 'OS_USER') FROM dual;
    SYS_CONTEXT('USERENV','OS_USER
    SAUBBANE\IBM
    SQL> SELECT sys_context('USERENV', 'TERMINAL') FROM dual;
    SYS_CONTEXT('USERENV','TERMINA
    SAUBBANEAlso you can look at the dbms_application_info package.

  • System variable in a query

    Hi,
    I would like to use a system variable in a query in the where clause. How can i use it?
    Thanks in advance:
    Bianca

    Hi,
    840275 wrote:
    Several scripts need to use the same value so i have created a system variable for it.
    (some of these scripts are in oracle, some in Talend)
    select...
    from myTable
    where myColumn = mySystemVariable:
    Tha question is how can i reference a system variable from a query?
    Depending on exactly what you mean, the code you posted will work; just fill in the columns you want in place of "...".
    If I don't know where you're starting from, and I don't know where you want to go, then I can't give you very precise directions.
    Explain what you're trying to do.  Remember, the people who want to help you don't know what environment you're working in (e.g., SQL*Plus, PL/SQL, Apex, ...), they don't know anything about your application, and they don't exactly what you want.  The more you help them, the more they can help you.
    Why not post a question that really explains what you need to do?  For example: "I have a table like scott.emp, that has multiple departments.  Users will always be interested in only 1 departement at a time.  I would like them to run standard, fixed queries, such as ... but have the results only apply to the department they are interested in, as if they had executed ...  Several users may be on the system at the same time, and they won't necessarily be interested in the same department.  I'm doing this in SQL*Plus now, but I may want to do something similar in Apex.  My Orace version is ...".

  • Unable to see system variable no in sap b1 due to watch

    Dear Sir,
    In SAP B1
    I am generating report Customer Aging Report.
    In PLD   Customer Code is displaying buy i am unable to display customer name in PLD because when i am unable to see
    system variable number.
    The watch cover that variable no. how can i find system variable no.
    is there any other method to see system variable no.

    Hi,
    what you are seeing in system-> status is not the installation number that is the status of your system's SAP License
    when you have not installed the license properly after the installation, it shows the status as initial
    go to SM51
    there you can find the instance number along with the Hostname_SID_InstNumber of your server
    thanks and regards
    Abdul Hadi

  • System variables not showing correctly in body pages

    Can anyone help with a problem I'm having with system variables please?
    I have created a template and multiple documents which all use a system variable for placing the chapter number and page number in the footer: <$chapnum>-<$curpagenum>
    I have just created a new document and want to use the same variable on the main pages of the document but I want to use a different page number variable on the TOC. For some reason now, when I create a new variable of <$curpagenum> it doesn't show correctly on the document; it's showing as: <$curpagenum
    I've also tried using the format of <$chapnum>-<$curpagenum> that has worked on other documents but now this shows in the document footer as: <$chapnum<$curpagenum
    Has anyone seen this problem before?
    Thanks

    Hi Art, thanks for the reply.
    In my original documents I'd edited the Current Page system variable from <$curpagenum> to <$chapnum>-<$curpagenum>. This worked correctly.
    In the new document I tried both the picking-and-clicking method and typing the string to get the same footer but neither worked.
    I've now changed it as you suggested, selecting the two seperate system variables of <$chapnum> and then <$curpagenum> and this seems to have solved the problem.
    I'll know to keep things simple in future!
    Thanks.

  • Environment or system variables in PI Communication channel parameters

    Is it possible to use any of the system/environment variables in the PI Communication channel parameters ? Please point me to the documentation. I know I had seen it on SDN sometime but can't seem to be able to find the link.
    I am not interested in ASMA or variable substitution.
    Thank you,
    Sridhar

    I don't know anything other than Asma, DynamicConf, VariableSubs, etc...
    There're some system variables like "%f" or "%F" usable in FileAdapter channel (OS command box)

  • Print system variable 71 in page header section

    Hi all,
    I have captured system variable 71 in order to print customer's CST and VAT numberin PLD of A/R Invoice. But it is printing I instead of vat number.
    I have confirmed the number by View - system information in Tax screen of accounting tab of business partner master screen.
    Help needed.
    Thanking you
    Pradnya

    Hi Gordon,
    In A/r Invoice I printed total before discount 85
    tax 116
    total 91
    and it is printing.
    How would i find system variable to be used for printing CST and vat of customer.
    I also tried relating customer code from ocrd with taxid column of crd7 and giving validation on addresstype field but no success.
    Thanking you
    Pradnya

  • System variable for Warehouse name in Pick list PLD

    Hi Experts,
    My customer would like to show the Warehouse name on the Pick List print layout.
    What is the System Variable to display the Warehouse name on the Pick List?. Iu2019m working with Sap Business One 2007A.. Where can I find the system variables for Chile localization. Thanks Very Much
    Claudia

    Hi Claudio,
    Try this,
    ->> Open the Pick List(System) PLD and Save as the New PLD.
    ->> Open the NEw PLD and Create 1 Database Field(for WareHouse Name) in Repetetive Area.
    Table -> OWHS - WareHouse
    Column -> WhsName - WareHouse Name
    Save as and Run the Print Preview.
    IF will not print the WareHouse Name in Print.
    Do this in PLD.
    ->> Open your PLD.
    --> Ralate to WareHouse Code Field ID in WareHouse Name Field at Content Tab on Properties Window.
    Regards,
    Madhan.

  • Problem in picking the system variable value in Calculation Script

    Hi All,
    We are using a Calculation Script to perform data export. And the target location where to crete the exported output file is given to the environment system variable.
    Now I am using this system variable in the calculation script as below:
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET DATAEXPORTOPTIONS
    DataExportLevel "ALL";
    DataExportOverwriteFile ON;
    Fix ( &CurrMiles, &CurrProj, &CurrVer,"No Project","No Version")
    DATAEXPORT "File" " " $DEXPORTPATH;
    ENDFIX
    Here "DEXPORTPATH" is the system variable
    I am creating this system variable from the batch script and the system variable value varies at the runtime.
    This calculation script works fine for first time and it picks the correct value from the system variable.
    But the problem occurs from next execution of calc script. Even if i update the system variable with other value, it picks only the last execution system variable value and it performs execution.
    Eg: Suppose for first execution system variable value is "D:\Bkup\PMV.txt"
    The calc script works fine with this.
    For next execution, system variable value is changed to "D:\Time\temp.txt"
    Now the calc script picks the system variable value as "D:\Bkup\PMV.txt"
    and performs execution which is wrong.
    Please help me on this issue how to handle system variables in calc scripts.
    Thanks in advance
    Regards
    Swathi

    811829 wrote:
    Hi All,
    We are using a Calculation Script to perform data export. And the target location where to crete the exported output file is given to the environment system variable.
    Now I am using this system variable in the calculation script as below:
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET DATAEXPORTOPTIONS
    DataExportLevel "ALL";
    DataExportOverwriteFile ON;
    Fix ( &CurrMiles, &CurrProj, &CurrVer,"No Project","No Version")
    DATAEXPORT "File" " " $DEXPORTPATH;
    ENDFIX
    Here "DEXPORTPATH" is the system variable
    I am creating this system variable from the batch script and the system variable value varies at the runtime.
    This calculation script works fine for first time and it picks the correct value from the system variable.
    But the problem occurs from next execution of calc script. Even if i update the system variable with other value, it picks only the last execution system variable value and it performs execution.
    Eg: Suppose for first execution system variable value is "D:\Bkup\PMV.txt"
    The calc script works fine with this.
    For next execution, system variable value is changed to "D:\Time\temp.txt"
    Now the calc script picks the system variable value as "D:\Bkup\PMV.txt"
    and performs execution which is wrong.
    Please help me on this issue how to handle system variables in calc scripts.
    Thanks in advance
    Regards
    SwathiAs of my knowledge system variables will not update immediately...you need to log off the session after changing the value.
    Update the system variable..
    Log off from the session..
    And Re-login with the same username ....and check...
    Regards,
    Prabhas

  • How to point the classpath to "CLASSPATH" system variable?

    Hi Experts!
    I'm trying to create a web dynpro application for sending a simple email using the tutorial that can be found here.
    I was actually able to make the program work using Java Swing, but not in my web dynpro implementation.
    According to the tutorial, the jar files should be located at "CLASSPATH" system variables to make things work.
    When I tried printing the URL of the classpath of the web dynpro app, it is pointing to a different location from what I have defined in the system.
    I have created the "CLASSPATH" system variable at "C:\CLASSPATH\lib" with the jar files on it. Here's the correct classpath using my swing application:
    /C:/CLASSPATH/lib/commons-beanutils-1.8.3.jar
    /C:/CLASSPATH/lib/commons-codec-1.4.jar
    /C:/CLASSPATH/lib/commons-collections-3.2.1.jar
    /C:/CLASSPATH/lib/commons-configuration-1.7.jar
    /C:/CLASSPATH/lib/commons-digester-1.8.1.jar
    /C:/CLASSPATH/lib/commons-httpclient-3.1.jar
    /C:/CLASSPATH/lib/commons-lang-2.6.jar
    /C:/CLASSPATH/lib/commons-logging-1.1.1.jar
    /C:/CLASSPATH/lib/ewsjavaapi-1.1.5.jar
    /C:/CLASSPATH/lib/javamail-ews-bridge-0.0.8.jar
    /C:/CLASSPATH/lib/jcifs-1.3.15.jar
    /C:/CLASSPATH/lib/mail-1.4.jar
    /C:/CLASSPATH/lib/slf4j-api-1.6.4.jar
    But the web dynpro app is pointing at different directories.
    @Printing project classpath...
    /E:/usr/sap/GOS/J03/exe/jstart71.jar
    /E:/usr/sap/GOS/J03/exe/sapjvm_5/lib/jvmx.jar
    /E:/usr/sap/GOS/J03/exe/sapjvm_5/lib/jvmx_tools.jar
    /E:/usr/sap/GOS/J03/exe/jre/lib/iqlib.jar
    /E:/usr/sap/GOS/J03/exe/sapjvm_5/lib/tools.jar
    /E:/usr/sap/GOS/J03/j2ee/cluster/bin/boot/sap.com~tc~bl~jkernel_boot~impl.jar
    /E:/usr/sap/GOS/J03/j2ee/cluster/bin/boot/jaas.jar
    /E:/usr/sap/GOS/J03/j2ee/cluster/bin/system/sap.com~tc~bl~bytecode~library.jar
    /E:/usr/sap/GOS/J03/j2ee/cluster/bin/boot/memoryanalyzer.jar
    This is the code I used for printing the classpath:
    ClassLoader cl = ClassLoader.getSystemClassLoader();
    URL[] urls = ((URLClassLoader) cl).getURLs();
    for (URL url : urls) {
        System.out.println(url.getFile());
    How can I set the correct classpath to the "CLASSPATH" system variable?

    Erwin,
    You wil need to add the jar files to a Library DC and then reference them in your Web Dynpro app.
    Take a look at this tutorial
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/006a6229-b1ed-2e10-0c8c-cc5673cf268f?QuickLink=index&overridelayout=true
    Stefan

Maybe you are looking for

  • Mail Client Job Scheduled

    Hi, I have configured Mail sender adapter to read emails from exchange server imap://host:port/InBox In Communication channel monitoring I dont see any error message but  I see status message Mail Client Job Scheduled  and there is nothing in Moni Ca

  • Lost messages when sending email offline with iOS6?

    I'm using iOS6 on an iPad 3rd generation, WiFi only. When I'm in airplane mode, or I'm not connected to a Wifi access point I can compose e-mail messages and press Send, and rather than getting an error saying I'm offline, the iPad displays the "send

  • IMAC 20" screen intermittent lines, tears and distortion

    2006 IMAC 2.16GH, 3MG, 250Gig HD, x1600 video card. I get inbermittent lines and tears. Usually I can move folder-doc-etc and the spot goes away. The lines sometimes stay until reboot. I have external 2nd monitor and I get tears with it as well. Not

  • USER EXIT CODE In BEX

    Friends, In Bex query for an ODS,I need to create a report -In the selection screen user has to enter one date value.(DATE1 Varible) I need to get the values in the report based on following condition ==>DATE1 < DATE2. As user defined variable can be

  • Blank second page and export error in Crystal 10 Web Report Viewer

    We have a customer that is having 2 issues viewing an .rpt file in the Crystal 10 Web Report Viewer.  When they view a report that is 12 pages, the first page appears OK.  When they click Next to go to the Next page, the page shows as blank.  The sec