Chapter 03_Simple Output Statements.ppt

Embed Size (px)

Citation preview

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    1/16

    IBM Global Services

    2005 IBM CorporationSimple Output Statements | 3.03 March-2005

    Simple Output Statements

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    2/16

    IBM Global Services

    2005 IBM Corporation2 March-2005Simple Output Statements | 3.03

    Objectives

    The participants will be able to :

    List the ABAP write statement

    Writing Icons and Symbols

    List New-Page statement

    Maintaining page header

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    3/16

    IBM Global Services

    2005 IBM Corporation3 March-2005Simple Output Statements | 3.03

    The ABAP WRITE Statement

    WRITE ********************.

    SKIP 2.

    WRITE: The date today is:, SY-DATUM,The current time is:, SY-UZEIT.

    SKIP 2.WRITE ********************.

    1

    -----------------------------------------------------------------------------------

    ********************

    The date today is: 12/30/1996 The current time is: 12:32:06

    ********************

    Notice that there is an automatic spacebetween the fields written to the list.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    4/16

    IBM Global Services

    2005 IBM Corporation4 March-2005Simple Output Statements | 3.03

    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 18:01:00

    -----------------------------------------------------

    ***** Department of Public Safety *****

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    5/16

    IBM Global Services

    2005 IBM Corporation5 March-2005Simple Output Statements | 3.03

    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 18:01:00

    ------------------------------------------------------------

    ***** Department of Public Safety *****

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    6/16

    IBM Global Services

    2005 IBM Corporation6 March-2005Simple Output Statements | 3.03

    WRITE Statement Extended Syntax

    WRITE .

    /p(I)

    / = Line Feed

    p = Column Position

    I = Output Length

    Program Field or

    Text Literal

    Format Options

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    7/16

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    8/16

    IBM Global Services

    2005 IBM Corporation8 March-2005Simple Output Statements | 3.03

    Writing Icons and Symbols

    INCLUDE .

    INCLUDE .

    Or

    TYPE-POOLS: icon.

    TYPE-POOLS: sym.

    WRITE: /10 ICON_DATE AS ICON, SY-DATUM,SYM_LEFT_HAND AS SYMBOL.

    Execute programs

    SHOWICON andSHOWSYMB to display

    the systems icons and

    symbols.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    9/16

    IBM Global Services

    2005 IBM Corporation9 March-2005Simple Output Statements | 3.03

    Maintaining Page Headers

    List header will replace titleon first line of standard

    header.

    Up to four lines of columnheadings can be maintained

    for the list. The title comes from theprograms attributes.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    10/16

    IBM Global Services

    2005 IBM Corporation10 March-2005Simple Output Statements | 3.03

    Demonstration

    Exploring ABAP Write statement with various options.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    11/16

    IBM Global Services

    2005 IBM Corporation11 March-2005Simple Output Statements | 3.03

    Practice

    Exploring ABAP Write statement with various options.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    12/16

    IBM Global Services

    2005 IBM Corporation12 March-2005Simple Output Statements | 3.03

    Numbered Texts (Text Symbols)

    WRITE: / TEXT-001, BIG BLUE,/ TEXT-002, TEST IT.

    Text symbols are referenced

    by a unique three-character

    code.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    13/16

    IBM Global Services

    2005 IBM Corporation13 March-2005Simple Output Statements | 3.03

    Demonstration

    Creation of text symbols and using that in the write statement.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    14/16

    IBM Global Services

    2005 IBM Corporation14 March-2005Simple Output Statements | 3.03

    Practice

    Creation of text symbols and using that in the write statement.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    15/16

    IBM Global Services

    2005 IBM Corporation15 March-2005Simple Output Statements | 3.03

    Summary

    The WRITE statement outputs the contents of a field or constant in a formatconsistent 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.

  • 8/14/2019 Chapter 03_Simple Output Statements.ppt

    16/16

    IBM Global Services

    2005 IBM Corporation16 March-2005Simple Output Statements | 3.03

    Questions

    What are the various options associated with the WRITE statement ?

    What does the NEW-PAGE statement do ?