‎2006 Oct 05 3:47 PM
Hi all,
Can any body please send me examples for System fields I know Sy-lsind, sy-lisel can any body send me the examples for others
Thanks in advance
Ranjith
‎2006 Oct 05 4:01 PM
HI Ranjith,
<b>SY-CPAGE</b>
Page number of the first displayed page of the list from which the event was triggered. Counting starts at 1
<b>
SY-LILLI</b>
Line from which the event was triggered Counting begins at 1 and includes the page header.
<b>
SY-LISEL</b>
Contents of the line from which the event was triggered
<b>SY-LISTI</b>
Index of the list from which the event was triggered
<b>SY-LSIND</b>
Index of the list that is being created (basic list: 0, detail list > 0). Each time an interactive list event occurs, the system automatically increases SY-LSIND by 1. SY-LSIND can be changed in the ABAP program to navigate between detail lists. Changes to SY-LSIND are not taken into account until the end of the list event. Therefore, any manipulation of SY-LISND should be done using the last command of the processing block.
<b>
SY-LSTAT</b>
ID for list levels within the program. SY-LSTAT can be filled with values during list creation in the ABAP program. The value valid when the list is completed is saved with the list. In the case of an interactive list event, SY-LSTAT is set to the value it was assigned during the creation of the list from which the event takes place. SY-LSTAT is no longer maintained and should therefore no longer be used.
<b>SY-STACO</b>
Number of the first displayed column of the list from which the event was triggered. Counting starts at 1.
<b>SY-STARO</b>
Number of the upper-most displayed row of the upper-most page of the list, from which the event was triggered. Counting begins at 1. This does not include the page header.
Regards
Sudheer
‎2006 Oct 06 3:08 PM
Hi Sudeer,
Thanks for ur answer,Can you please send me the examples for those syatem Fields
Thanks in Advance
Ranjith
‎2006 Oct 05 4:06 PM
Goto Table
SYST
, you can find all the system fields.SY-LSTAT
ID for list levels within the program. SY-LSTAT can be filled with values during list creation in the ABAP program. The value valid when the list is completed is saved with the list. In the case of an interactive list event, SY-LSTAT is set to the value it was assigned during the creation of the list from which the event takes place. SY-LSTAT is no longer maintained and should therefore no longer be used.
SY-STACO
Number of the first displayed column of the list from which the event was triggered. Counting starts at 1.
SY-STARO
Number of the upper-most displayed row of the upper-most page of the list, from which the event was triggered. Counting begins at 1. This does not include the page header.
Printing Lists
When printing lists, the spool and runtime systems require certain internal information, which is available in the following system fields and is set during print activation.
SY-CALLR
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-PRDSN
Contains the name of the spool file during printing.
SY-SPONO
Contains the name of the spool number during printing.
SY-MAROW, SY-MACOL
The SET MARGINstatement fills the system fields SY-MAROW and SY-MACOL, which determine the number of lines on the upper margin and the number of columns on the left margin when printing.
Print Parameters
The print parameters are transferred to the spool system by the runtime system in a structure of dictionary type PRI_PARAMS. Before this structure was used, its purpose was served by system fields. Today a subset of the PRI_PARAMS structure is still written to system fields with the same names when printing is activated. This information is redundant and should not be used.
Messages
If you execute the MESSAGE statement, the following system fields are set. If you execute the MESSAGE RAISING statement in function modules and methods, these fields are also set in the calling program, if it handles the exception.
SY-MSGID
SY-MSGID contains the message ID.
SY-MSGNO
SY-MSGNO contains the message number.
SY-MSGTY
SY-MSGTY contains the message type.
SY-MSGV1, ,SY-MSGV4
SY-MSGV1 to SY-MSGV4 contain the field contents that are used for the messages placeholders.
Special Actions that Fill Message Fields
· If you request database locks using the ENQUEUE function module, the field SY-MSGV1 contains the name of the user who holds the lock, in the case of the FOREIGN_LOCK exception.
· IN the case of CALL TRANSACTION or CALL DIALOG with the USING addition, a message displayed during the called screen sequence is returned in the fields SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, ... , SY-MSGV4.
· During Remote Function Call (RFC), error messages are transferred from the remote system to the calling system and SY-MSGID, SY-MSGTY, SY-MSGNO,SY-MSGV1, SY-MSGV2, SY-MSGV3, SY-MSGV4 are set. If short dumps or type X messages occur, the system also sets the fields.
Internal system fields
Internal system fields are only for internal use in the ABAP runtime environment and are defined in the kernel. Under no circumstances must they be overwritten in ABAP programs and they should also not be read (processed).
SY-CFWAE
Undocumented
SY-CHWAE
Undocumented
SY-DEBUG
Undocumented
SY-DSNAM
Name of spool output file.
SY-ENTRY
Undocumented
SY-FFILE
Flat file (USING/GENERATING DATASET).
SY-FLENG
Length of a field.
SY-FODEC
Number of decimal places of a field.
SY-FOLEN
Output length of a field.
SY-FTYPE
Data type of a field.
SY-GROUP
Bundling
SY-INPUT
Undocumented
SY-LPASS
Undocumented
SY-NEWPA
Undocumented
SY-NRPAG
Undocumented
SY-ONCOM
On Commit flag. This system field is set to different values depending on the call status of an ABAP program. Of these, only the value of P is guaranteed. If at all, SY-ONCOM must only be queried for P.
The value 'P' means that the program is already executing a subroutine started using PERFORM ON COMMIT and therefore a further subroutine call using PERFORM ... ON COMMIT would cause a runtime error.
SY-PAUTH
Undocumented
SY-PLAYO
Undocumented
SY-PLAYP
Undocumented
SY-PNWPA
Undocumented
SY-PRI40
Undocumented
SY-PRINI
Undocumented
SY-PRLOG
Undocumented
SY-REPI2
Undocumented
SY-RSTRT
Undocumented
SY-SFOFF
Undocumented
SY-SUBCS
Call status of an executable program.
SY-SUBTY
Call type of an executable program.
SY-TABID
Undocumented
SY-TLOPC
Undocumented
SY-TSTIS
Undocumented
SY-XCODE
Extended function code Is filled, like SY-UCOMM, by user actions on lists. Before the length of SY-UCOMM was increased from 4 to 70 characters, SY-XCODE was used internally to evaluate lengthy entries in the command field of the lists standard toolbar. Use SY-UCOMM in application programs.
SY-XFORM
SYSTEM-EXIT subroutine.
SY-XPROG
SYSTEM-EXIT program.
Obsolete System Fields
In the transition from R/2 to R/3, some system fields were carried over that are no longer filled. These system fields are obsolete and can no longer be used.
SY-APPLI
In R/2, ID for which SAP applications are installed. No longer filled.
SY-BATZD
In R/2, ID for daily background scheduling. No longer filled.
SY-BATZM
In R/2, ID for monthly background scheduling. No longer filled.
SY-BATZO
In R/2, ID for single background scheduling. No longer filled.
SY-BATZS
In R/2, ID for immediate background scheduling. No longer filled.
SY-BATZW
In R/2, ID for weekly background scheduling. No longer filled.
SY-BREP4
In R/2, root name of request report for background processing. No longer filled.
SY-BSPLD
In R/2, ID for immediate spool output for background processing. No longer filled.
SY-CCURS
In R/2, rate specification/result field from CURRENCY CONVERSION. No longer filled.
SY-CCURT
In R/2, table rate from CURRENCY CONVERSION. No longer filled.
SY-CDATE
In R/2, rate date from CURRENCY CONVERSION. No longer filled.
SY-CTABL
In R/2, rate table from CURRENCY CONVERSION. No longer filled.
SY-CTYPE
In R/2, rate type from CURRENCY CONVERSION. No longer filled.
SY-DCSYS
Dialog system of R/2 System No longer filled.
SY-FMKEY
Previously, current function code menu. No longer filled.
SY-LOCDB
Local database, not implemented.
SY-LOCOP
Local database operation, not implemented.
SY-MACDB
Previously, name of file for matchcode access. No longer filled.
SY-MARKY
Current line character for the MARK statement. However, the language element MARK will only be supported for a short time.
SY-PAGCT
In R/2, maximum number of pages per list. No longer filled.
SY-PREFX
ABAP prefix for background jobs. No longer filled.
SY-SFNAM
Undocumented
SY-SPONR
In R/2, you could process spool files using the TRANSFER statement, set by SY-SPONR. No longer filled.
SY-TFDSN
Previously, name of external storage file for extracts. No longer filled.
SY-TMAXL
Previously, maximum number of entries in an internal table. No longer filled.
SY-TNAME
Previously, name of an internal table after an access. No longer filled.
SY-TOCCU
With the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TOCCU was filled with the value of the initial main memory requirements for the addressed internal table. No longer filled.
SY-TPAGI
Previously, ID whether an internal table is stored in the paging area. No longer filled.
SY-TTABC
Previously, index of last read row in an internal table. No longer filled.
SY-TTABI
Previously, offset of internal tables in roll area. No longer filled.
SY-WAERS
Previously, company code currency after reading booking segment. No longer filled.
SY-WILLI
In R/2, number of selected list row for detail list in window. Use SY-LILLI.
SY-WINCO
In R/2, cursor position for detail list in window. Use SY-CUCOL.
SY-WINDI
In R/2, index of list for detail list in window. Use SY-LSIND.
SY-WINRO
In R/2, cursor position for detail list in window. Use SY-CUROW.
SY-WINSL
In R/2, content of selected row for detail list in window. Use SY-LISEL.
SY-WINX1
In R/2, window coordinate for detail list in window. No longer used.
SY-WINX2
In R/2, window coordinate for detail list in window. No longer used.
SY-WINY1
In R/2, window coordinate for detail list in window. No longer used.
SY-WINY2
In R/2, window coordinate for detail list in window. No longer used.
http://help.sap.com/saphelp_nw2004s/helpdata/en/7b/fb96c8882811d295a90000e8353423/frameset.htm
Prakash.
‎2006 Oct 06 3:24 PM
Hi Ranjith,
Example Programs for youe sake ..
<b>1St one:-</b>
REPORT demo_list_interactive_1.
START-OF-SELECTION.
WRITE: 'Basic List, sy-lsind =', sy-lsind.
AT LINE-SELECTION.
WRITE: 'Secondary List, <b>sy-lsind</b> =', sy-lsind.http://www.sap-basis-abap.com/abap/check-boxes-in-an-interactive-report.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba2eb35c111d1829f0000e829fbfe/content.htm
http://www.karakas-online.de/forum/viewtopic.php?t=3353
Even you will find the Example programs in <b>ABAPDOCU</b>
enter this ABAPDOCU in the command linem you will get all the example programs
Regards
Sudheer
‎2006 Oct 06 3:25 PM
check in the structure SYST in SE11 for all system fields what u are looking in different scenarios