SAP R/3 Document: System Fields List
SAP R/3 Document: System Fields List
System fields
Constant: Alphabet (A,B,C,...) Example : System fields I REPORT ZBCTCB93 NO STANDARD PAGE HEADING. DETAIL. WRITE: /5 'Logon name of the user: ' RIGHT-JUSTIFIED, 40 SYUNAME. WRITE: /5 'Logon client: ' RIGHT-JUSTIFIED, 40 SY-MANDT. WRITE: /5 'Logon language: ' RIGHT-JUSTIFIED, 40 SY-LANGU. WRITE: /5 'Current date: ' RIGHT-JUSTIFIED, 40 SY-DATUM. WRITE: /5 'Current time: ' RIGHT-JUSTIFIED, 40 SY-UZEIT. WRITE: /5 'Current transaction: ' RIGHT-JUSTIFIED, 40 SY-TCODE. WRITE: /5 'Main program: ' RIGHT-JUSTIFIED, 40 SY-CPROG. SKIP. WRITE: /5 'SAP System ID: ' RIGHT-JUSTIFIED, 40 SY-SYSID. WRITE: /5 'SAP Release: ' RIGHT-JUSTIFIED, 40 SY-SAPRL. WRITE: /5 'Host: ' RIGHT-JUSTIFIED, 40 SY-HOST. WRITE: /5 'Operating system: ' RIGHT-JUSTIFIED, 40 SY-OPSYS. WRITE: /5 'Database system: ' RIGHT-JUSTIFIED, 40 SY-DBSYS. SKIP TO LINE 20. POSITION 10. WRITE: SY-COLNO, ',', SY-LINNO, 'Cursor position (column, row).'. WRITE: 'New:', SY-COLNO,',',SY-LINNO. SKIP. SY-ULINE = '------ Underline ------'. ULINE (23). WRITE: /5 'Vertical bar:', SY-VLINE. TOP-OF-PAGE. DETAIL. WRITE: 2 'Report Title: ', SY-TITLE(20). WRITE: 'Page Number: ', SY-PAGNO. SKIP.
ABCDE
APPLI
EXAMPLE : BATCH
REPORT ZBCTCB99 NO STANDARD PAGE HEADING. PARAMETERS: TEST.
BATZD BATZM BATZO BATZS BATZW BINPT BREP4 BSPLD CALLD CALLR CCURS CCURT CDATE COLNO
Background SUBMIT: Daily Background SUBMIT: Monthly Background SUBMIT: Once Background SUBMIT: Immediately Background SUBMIT: Weekly Batch input active (X) Background SUBMIT: Root name of request report Background SUBMIT: List output to spool CALL mode active (X) Print: ID for print dialog function Rate specification/result field (CURRENCY CONVERT) Table rate from currency conversion Date of rate from currency conversion
CPAGE
EXAMPLE :
REPORT ZBCTCB90 NO STANDARD PAGE HEADING
Runtime: Main program Exchange rate table from currency conversion Exchange rate type 'M','B','G' from CURRENCY CONVERSION
DATAR
In transaction programming this field indicates the change of data on the screen. In the PBO part you set the default value 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.
Local date for user System: Date Global date related to UTC (GMT) Summertime active ? ('daylight saving time') Number of elements in edited dataset with DB operations
EXAMPLE : DBCNT
REPORT ZBCTCB92. TABLES: T000. DATA: BEGIN OF T OCCURS 0,
Logical database for ABAP/4 program System: Database system System: Dialog system Runtime: Name of dataset for spool output Screen group of current screen Number of current screen
EXAMPLE :
REPORT ZBCTCB93 NO STANDARD PAGE HEADING. PARAMETERS: TEST. DATA: SESSION TYPE I. DATA: BEGIN OF T_TSTCT OCCURS 10. INCLUDE STRUCTURE TSTCT.
FDAYW
DATA: END OF T_TSTCT. DETAIL. SESSION = SY-MODNO + 1. SET MARGIN 5 3. * The report must have a selection screen and from there execute+print * should be called the SET MARGIN to take effect. WRITE: / 'Number of this session:', SESSION. WRITE: / 'List starts from the ', SY-MACOL, ',', SY-MAROW, 'upper-left corner.'. SKIP.
FDPOS FMKEY HOST INDEX LANGU LDBPG LILLI LINCT LINNO LINSZ LISEL LISTI LOCDB LOCOP LOOPC LSIND
Location of a string Current function code menu Host Number of loop passes SAP logon language key Program: ABAP/4 database program for SY-DBNAM
Number of current list line Number of list lines Current line for list creation Line size of list Interact.: Selected line Number of current list line
Local database exists Local database operation Number of LOOP lines at screen step loop
MARKY Current line character for MARK MAROW No. of lines from SET MARGIN statement MODNO Number of alternative modi
Message ID
EXAMPLE :
REPORT ZSYSTEM LINE-SIZE 255. TABLES: T100. * Batch-input data DATA: BEGIN OF G_BDCDATA OCCURS 100. INCLUDE STRUCTURE BDCDATA. DATA: END OF G_BDCDATA. DATA: G_MESSAGE(200). PERFORM FILL_BDCDATA. CALL TRANSACTION 'FI01' USING G_BDCDATA MODE 'N'. * of course it is nicer with a message itab, but this example * should also demostrate the use of system variables. SELECT SINGLE * FROM T100 WHERE SPRSL = 'E' AND ARBGB = SY-MSGID AND MSGNR = SY-MSGNO. G_MESSAGE = T100-TEXT. PERFORM REPLACE_PARAMETERS USING SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 CHANGING G_MESSAGE. WRITE: / 'System variables:'. SKIP. WRITE: / ' Sy-msgty:', SY-MSGTY. WRITE: / ' Sy-msgid:', SY-MSGID. WRITE: / ' Sy-msgno:', SY-MSGNO. WRITE: / ' Sy-msgv1:', SY-MSGV1. WRITE: / ' Sy-msgv2:', SY-MSGV2. WRITE: / ' Sy-msgv3:', SY-MSGV3.
MSGID
MSGLI MSGNO MSGTY MSGV1 MSGV2 MSGV3 MSGV4 OPSYS PAART PAGCT PAGNO
Interact.: Message line (line 23) Message number Message type (E,I.W,...) Message variable Message variable Message variable Message variable System: Operating system Print: Format Page size of list from REPORT statement Runtime: Current page in list Print: Output device
EXAMPLE :
REPORT ZZBETO98. PARAMETERS: PARAM(6) DEFAULT 'TEST'. WRITE: / 'System variables for printing.'. WRITE: / 'Please check the spool for the printout'. SKIP. * check is necessary to prevent further recursive calls of this program. IF NOT ( SY-PDEST IS INITIAL ). SKIP. WRITE: / 'System variables for printing:'. SKIP. WRITE: / ' Layout: SY-PAART',SY-PAART. * This can be used in normal lists as well. * If used with 'new-page print on', it continues counting WRITE: / ' Current page number: SY-PAGNO', SY-PAGNO. WRITE: / ' Printer: SY-PDEST', SY-PDEST. WRITE: / ' Priority: SY-PEXPI', SY-PEXPI. WRITE: / ' List name: SY-PLIST', SY-PLIST. WRITE: / ' Department: SY-PRABT', SY-PRABT. * output cover sheet with the report's parameters WRITE: / ' Output cover sheet: SY-PRBIG', SY-PRBIG. WRITE: / ' No. of copies: SY-PRCOP', SY-PRCOP.
PDEST
PEXPI PFKEY PLIST PRABT PRBIG PRCOP PRDSN PREFX PRIMM PRNEW
Print: Name of spool request (list name) Print: Department on cover sheet Print: Selection cover sheet Print: Number of copies
Print: Name of spool dataset ABAP/4 prefix for background jobs Print: Print immediately Print: New spool request (list)
Runtime: Spool number from TRANSFER statement Lines on screen Interact.: List displayed from column Interact.: Page displayd from line Number of LOOP line at screen step Return value after specific ABAP/4 statements ABAP/4: Call type for SUBMIT System: SAP System ID Runtime: Current line of an internal table Session: Current transaction code Runtime: Dataset for data extracts Current number of entries in internal table Local time for user Global time related to UTC (GMT) Title of ABAP/4 program
UCOMM Interact.: Command field function entry ULINE UNAME UZEIT Constant: Underline (---------...) Session: SAP user from SAP logon System: Time
WINX1
WRITE: / ' Initial values: '. WRITE: / ' SY-WINX1:', SY-WINX1. WRITE: / ' SY-WINX2:', SY-WINX2. WRITE: / ' SY-WINY1:', SY-WINY1. WRITE: / ' SY-WINY2:', SY-WINY2. AT LINE-SELECTION. WINDOW STARTING AT L_SCOL L_SROW ENDING AT L_ECOL L_ EROW . WRITE: / ' Values are from the upper left corner of the window.'. SKIP. WRITE: / ' After displaying the new window: '. SKIP. WRITE: / ' SY-WINX1:', SY-WINX1, '(Column of the left side)'. WRITE: / ' SY-WINX2:', SY-WINX2, '(Column of the right side)'. WRITE: / ' SY-WINY1:', SY-WINY1, '(Row of the upper side)'. WRITE: / ' SY-WINY2:', SY-WINY2, '(Row of the lower side)'.
Window coordinate (column right) Window coordinate (line left) Window coordinate (line right) Standard page header indicator