IBM Global Business Services
Simple Output Statements
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Objectives
The participants will be able to :
List the ABAP write statement
Writing Icons and Symbols
List New-Page statement
Maintaining page header
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
The ABAP WRITE Statement
WRITE ********************.
SKIP 2.
WRITE: The date today is:, SY-DATUM,
The current time is:, SY-UZEIT.
SKIP 2.
WRITE ********************.
Notice that there is an automatic space
between the fields written to the list.
<program title>
1
----------------------------------------------------------------------------------********************
The date today is: 12/30/1996 The current time is: [Link]
********************
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
ABAP Format Specifications
WRITE 10 ***** City of Philadelphia *****.
SKIP 2.
WRITE: 10 Ticket Date, SY-DATUM.
WRITE: /10 Ticket Time, SY-UZEIT.
ULINE /10(60).
SKIP 2.
WRITE 10 ***** Department of Public Safety *****.
***** City of Philadelphia *****
Ticket Date 01/01/1997
Ticket Time [Link]
----------------------------------------------------***** Department of Public Safety *****
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
ABAP Format Options
WRITE 10 ***** City of Philadelphia *****.
SKIP 2.
WRITE: 10 Ticket Date, 25 SY-DATUM,
/10 Ticket Time, SY-UZEIT UNDER SY-DATUM.
ULINE /10(60).
SKIP 2.
WRITE 10 ***** Department of Public Safety *****.
***** City of Philadelphia *****
Ticket Date 01/01/1997
Ticket Time [Link]
-----------------------------------------------------------***** Department of Public Safety *****
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
WRITE Statement Extended Syntax
WRITE <format> <value> <options> .
<format>
/p(I)
/ = Line Feed
p = Column Position
I = Output Length
<value>
Program Field or
Text Literal
<options>
Format Options
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
NEW-PAGE Statement
WRITE ***** City of Philadelphia *****.
SKIP.
WRITE: / Ticket Date, 15 SY-DATUM.
WRITE: / Ticket Time, 15 SY-UZEIT.
SKIP.
WRITE ***** Department of Public Safety *****.
NEW-PAGE.
WRITE: Comments:.
<program title>
1
-------------------------------------------------------------------------------------***** City of Philadelphia *****
Ticket Date 01/01/1997
Ticket Time [Link]
***** Department of Public Safety *****
<program title>
2
--------------------------------------------------------------------------------------Comments:
7
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Writing Icons and Symbols
INCLUDE <ICON>.
INCLUDE <SYMBOL>.
Or
TYPE-POOLS: icon.
TYPE-POOLS: sym.
WRITE: /10 ICON_DATE AS ICON, SY-DATUM,
SYM_LEFT_HAND AS SYMBOL.
Execute programs
SHOWICON and
SHOWSYMB to display
the systems icons and
symbols.
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Maintaining Page Headers
List header will replace title
on first line of standard
header.
Up to four lines of column
headings can be maintained
for the list.
Simple Output Statements |
The title comes from the
programs attributes.
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Demonstration
Exploring ABAP Write statement with various options.
10
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Practice
Exploring ABAP Write statement with various options.
11
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Numbered Texts (Text Symbols)
WRITE: / TEXT-001, BIG BLUE,
/ TEXT-002, TEST IT.
Text symbols are referenced
by a unique three-character
code.
12
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Demonstration
Creation of text symbols and using that in the write statement.
13
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Practice
Creation of text symbols and using that in the write statement.
14
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Summary
The WRITE statement outputs the contents of a field or constant in a format
consistent with the data type.
The SKIP statement creates blank lines.
The NEW-PAGE statement starts a new page.
For writing Icon and Symbols in the report, TYPE-POOL ICON & SYM need to
be included in the program respectively.
Text elements can be maintained in multiple languages, so the display to the user
will depend on the users specified logon language.
15
Simple Output Statements |
Dec-2008
IBM Corporation 2013
IBM Global Business Services
Questions
What are the various options associated with the WRITE statement ?
What does the NEW-PAGE statement do ?
16
Simple Output Statements |
Dec-2008
IBM Corporation 2013