Google Search - Blog...........

ABAP - Report To Display Important System Fields (Example: Sy-Subrc, Sy-Tabix, etc.).

LIST OF IMPORTANT SYSTEM FIELDS:-


SY-ABCDE Constant: Alphabet (A,B,C,...)
SY-APPLI SAP applications
SY-BATCH Background active (X)

IF SY-BATCH EQ SPACE.
WRITE: / 'Report was started on-line'.
WRITE: / 'Using variant:', SY-SLSET.
ELSE.
WRITE: / 'Report was started in background'.
ENDIF.

SY-BATZD Background SUBMIT: Daily
SY-BATZM Background SUBMIT: Monthly
SY-BATZO Background SUBMIT: Once
SY-BATZS Background SUBMIT: Immediately
SY-BATZW Background SUBMIT: Weekly
SY-BINPT Batch input active (X)

This field indicates if the transaction was called in a Batch Input session or by an online user. To test it, a batch input session must be created. From Release 3.1g the next procedure can be used.

Create a report which displays this system field

Create a Transaction code for this report

Use transaction SHDB to record a the previous transaction

Press the Overview button and choose the 'generate program' function.

Running the previously generated program it will create a Batch Input session

Now call transaction SM35 and process the created Batch Input in foreground. It should display an 'X' for system field SY-BINPT.

SY-BREP4 Background SUBMIT: Root name of request report
ST-BSPLD Background SUBMIT: List output to spool
SY-CALLD CALL mode active (X)

This field indicates if the transaction was called from another transaction.

Create a report which displays this system field

Create a Transaction code for this report

Create a new report containing the next ABAP command: CALL TRANSACTION tcode. Where tcode is the Transaction code you created. When you run this report, it should display an 'X' for system field SY-CALLD.

SY-CALLR Print: ID for print dialog function
SY-CCURS Rate specification/result field (CURRENCY CONVERT)
SY-CCURT Table rate from currency conversion
SY-CDATE Date of rate from currency conversion
SY-COLNO Current column during list creation

WRITE: SY-COLNO, ',', SY-LINNO, 'Cursor position (column, row).'.

SY-CPAGE Current page number
WRITE: / 'SY-CPAGE:', SY-CPAGE LEFT-JUSTIFIED.

SY-CPROG Runtime: Main program
WRITE: /5 'Main program:' RIGHT-JUSTIFIED, 40 SY-CPROG.

SY-CTABL Exchange rate table from currency conversion
SY-CTYPE Exchange rate type 'M','B','G' from CURRENCY CONVERSION
SY-CUCOL Cursor position (column)

WRITE: / 'SY-CUCOL:', SY-CUCOL LEFT-JUSTIFIED.

CUROW Cursor position (line)
WRITE: / 'SY-CUROW:', SY-CUROW LEFT-JUSTIFIED.

SY-DATAR Flag: Data received

In transaction programming this field indicates the change of data on the screen. In the PBO part you may set default values of the input fields of the dynpro. In the PAI part you can check if they were changed. If SY-DATAR is set, then the user has modified or entered new data on the screen.

SY-DATLO Local date for user
SY-DATUM System: Date
SY-DATUT Global date related to UTC (GMT)
SY-DAYST Summertime active ? ('daylight saving time')
SY-DBCNT Number of elements in edited dataset with DB operations

WRITE: /12 'Number of selected records:', SY-DBCNT CENTERED.

SY-DBNAM Logical database for ABAP/4 program
SY-DBSYS System: Database system
SY-DCSYS System: Dialog system
SY-DSNAM Runtime: Name of dataset for spool output
SY-DYNGR Screen group of current screen
SY-DYNNR Number of current screen
SY-FDAYW Factory calendar weekday
SY-FDPOS Location of a string

SEARCH T FOR 're'.

READ TABLE T INDEX SY-TABIX.

WRITE: / SY-TABIX, T-FIELD.

SKIP.

WRITE: /9 'At the example of sy-tabix, Row', (3) SY-TABIX, ',' ,

'keyword ''re'' found at off-set position:', (3) SY-FDPOS.

SY-FMKEY Current function code menu
SY-HOST Host

INDEX Number of loop passes
DO 5 TIMES.

WRITE: SY-INDEX.

ENDDO.


SY-LANGU SAP logon language key
SY-LDBPG Program: ABAP/4 database program for SY-DBNAM
SY-LILLI Number of current list line
AT LINE-SELECTION.

DETAIL.
* SY-LSIND is the index of the current list
WRITE: / 'SY-LSIND:', SY-LSIND LEFT-JUSTIFIED.
* SY-LISTI is the index of the previous list
WRITE: / 'SY-LISTI:', SY-LISTI LEFT-JUSTIFIED.
* SY-LILLI is the number of the selected line in the absolute list
WRITE: / 'SY-LILLI:', SY-LILLI LEFT-JUSTIFIED.

SY-LINCT Number of list lines
WRITE: / SY-LINCT, 'line and', (3) SY-LINSZ, 'column is a page'.

SY-LINNO Current line for list creation
WRITE: SY-COLNO, ',', SY-LINNO, 'Cursor position (column, row).'.

SY-LINSZ Line size of list
WRITE: SY-COLNO, ',', SY-LINNO, 'Cursor position (column, row).'.

SY-LISEL Interact.: Selected line
* contents of the selected line

WRITE: / 'SY-LISEL:', SY-LISEL.

SY-LISTI Number of current list line
* SY-LISTI is the index of the previous list

WRITE: / 'SY-LISTI:', SY-LISTI LEFT-JUSTIFIED.


SY-LOCDB Local database exists.
SY-LOCOP Local database operation.
SY-LOOPC Number of LOOP lines at screen step loop.
SY-LSIND Number of secondary list.
* SY-LSIND is the index of the current list

WRITE: / 'SY-LSIND:', SY-LSIND LEFT-JUSTIFIED.


SY-LSTAT Interact.: Status information for each list level
SY-MACDB Program: Name of file for matchcode access
SY-MACOL Number of columns from SET MARGIN
SY-MANDT Client number from SAP logon
SY-MARKY Current line character for MARK

SY-MAROW No. of lines from SET MARGIN statement
SY-MODNO Number of alternative modi
SY-MSGID Message ID
SY-MSGLI Interact.: Message line (line 23)
SY-MSGNO Message number
SY-MSGTY Message type (E,I.W,...)

MSGV1 Message variable
MSGV2 Message variable
MSGV3 Message variable
MSGV4 Message variable


SY-OPSYS System: Operating system
SY-PAART Print: Format
SY-PAGCT Page size of list from REPORT statement
SY-PAGNO Runtime: Current page in list
SY-PDEST Print: Output device
SY-PEXPI Print: Spool retention period


SY-PFKEY Runtime: Current F key status
SY-PLIST Print: Name of spool request (list name)
SY-PRABT Print: Department on cover sheet
SY-PRBIG Print: Selection cover sheet
SY-PRCOP Print: Number of copies
SY-PRDSN Print: Name of spool dataset


SY-PREFX ABAP/4 prefix for background jobs
SY-PRIMM Print: Print immediately
SY-PRNEW Print: New spool request (list)
SY-PRREC Print: Recipient
SY-PRREL Print: Delete after printing
SY-PRTXT Print: Text for cover sheet
SY-REPID Program: Name of ABAP/4 program


SY-RTITL Print: Report title of program to be printed
SY-SAPRL System: SAP Release
SY-SCOLS Columns on screen
SY-SLSET Name of selection set
SY-SPONO Runtime: Spool number for list output
SY-SPONR Runtime: Spool number from TRANSFER statement
SY-SROWS Lines on screen


SY-STACO Interact.: List displayed from column
SY-STARO Interact.: Page displayed from line
SY-STEPL Number of LOOP line at screen step
SY-SUBRC Return value after specific ABAP/4 statements
SY-SUBTY ABAP/4: Call type for SUBMIT
SY-SYSID System: SAP System ID
SY-TABIX Runtime: Current line of an internal table


SEARCH T FOR 're'.

READ TABLE T INDEX SY-TABIX.

SY-TCODE Session: Current transaction code
SY-TFDSN Runtime: Dataset for data extracts
SY-TFILL Current number of entries in internal table
SY-TIMLO Local time for user
SY-TIMUT Global time related to UTC (GMT)
SY-TITLE Title of ABAP/4 program


SY-TLENG Line width of an internal table
SY-TMAXL Maximum number of entries in internal table (?)
SY-TNAME Name of internal table after an access (?)
SY-TOCCU OCCURS parameter with internal tables
SY-TPAGI Flag indicating roll-out of internal table to paging area (?)
SY-TSTLO Timestamp (date and time) for user


SY-TSTUT Timestamp (date and time) related to UTC (GMT)
SY-TTABC Number of line last read in an internal table (?)
SY-TTABI Offset of internal table in roll area (?)
SY-TVAR0 Runtime: Text variable for ABAP/4 text elements
SY-TVAR1 Runtime: Text variable for ABAP/4 text elements
SY-TVAR2 Runtime: Text variable for ABAP/4 text elements
SY-TVAR3 Runtime: Text variable for ABAP/4 text elements
SY-TVAR4 Runtime: Text variable for ABAP/4 text elements


SY-TVAR5 Runtime: Text variable for ABAP/4 text elements
SY-TVAR6 Runtime: Text variable for ABAP/4 text elements
SY-TVAR7 Runtime: Text variable for ABAP/4 text elements
SY-TVAR8 Runtime: Text variable for ABAP/4 text elements
SY-TVAR9 Runtime: Text variable for ABAP/4 text elements
SY-TZONE Time difference from 'Greenwich Mean Time' (UTC) in seconds
SY-UCOMM Interact.: Command field function entry


SY-ULINE Constant: Underline (---------...)
SY-UNAME Session: SAP user from SAP logon
SY-UZEIT System: Time
SY-VLINE Constant: Vertical bar
SY-WAERS T001: Company code currency after reading B segment
SY-WILLI Number of current window line
SY-WINCO Cursor position in window (column)
SY-WINDI Index of current window line
SY-WINRO Cursor position in window (line)


SY-WINSL Interact.: Selected window line
SY-WINX1 Window coordinate (column left)
SY-WINX2 Window coordinate (column right)
SY-WINY1 Window coordinate (line left)
SY-WINY2 Window coordinate (line right)
SY-WTITL Standard page header indicator
SY-XCODE Extended command field
SY-ZONLO Time zone of user

No comments:

Post a Comment