Lecture08 abap on line

1,524 views

Published on

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,524
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
149
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • You can use any of the following FORMAT options: COLOR <n> [ON|OFF] Colors the line background INTENSIFIED[ON|OFF] Intensify colors YES|NO INVERSE [ON|OFF] Inverse: Background/text color HOTSPOT [ON|OFF] Display mouse pointer as hand and single click with mouse button (used with AT LINE-SELECTION ) RESET Resets all formats to their default values The formats set with FORMAT take effect with the next WRITE statement. You can use all FORMAT options with the WRITE statement, but the options will affect only the one field in which they appear. FORMAT options in a WRITE statement change the global formatting instructions (set with a FORMAT statement) for the field.
  • You can use the AS SYMBOL option of the WRITE statement to include symbols in lists. The symbolic names of these characters are defined in include program <symbol> . You can also insert icons into the list with WRITE <f> AS ICON . To do this, you have to link the include program <icon> in your program. You can link the include program <list> to use both symbols and icons in the list. You can find an overview of available symbols and icons in the online documentation or in the statement examples for WRITE . To generate a horizontal line, use the ULINE statement, system field sy-uline in a WRITE statement. To generate a vertical line, use system field sy-vline in a WRITE statement
  • Use the additions LINE-SIZE <s> and LINE-COUNT <m> with the REPORT statement to create global definitions for column and line length for all list levels. The different list levels are created during interactive reporting. Within a list level, you can use NEW-PAGE LINE-COUNT <s> to change the number of lines on a page - this value overrides the definition in the REPORT statement. The width of a list can only be changed by creating a new list level. If you want to use the default values, then set <s> and/or <m> to zero. You cannot use variables for <s> or <m>. An optional addition in the REPORT statement, n, reserves a line for the footer. To create a footer, you have to program the END-OF-PAGE event.
  • You can maintain a list header (page header) and up to four column headers for a list. If you have not maintained a list title, the system uses the program name as a default (system field SY-TITLE ). The addition NO STANDARD PAGE HEADING in the REPORT statement suppresses the output of list/column headers. Alternatively the TOP-OF-PAGE event can be used to generate page headers. TOP-OF-PAGE is especially useful when you want to output variables in the headers. TOP-OF-PAGE is triggered whenever a new page is created ( WRITE , ULINE , and so on). If you do not suppress the standard list headers, they appear above the lines generated by TOP-OF-PAGE . Lines generated by TOP-OF-PAGE remain in the window during vertical scrolling.
  • Note the use of the START-OF-SELECTION event to separate the TOP-OF-PAGE event. START-OF-SELECTION is the default event if your program does not have an event entry.
  • Formatting Output - Solid Lines SY-ULINE & SY-VLINE allow you to frame a list, and separate headings by horizontal lines and columns by vertical lines. Explain how program works in reference to producing the output below:
  • Lecture08 abap on line

    1. 1. Lecture 8 Reporting – Formatting Output BCO5647 Applications Programming Techniques (ABAP)
    2. 2. Readings & Objectives <ul><li>Readings </li></ul><ul><li>Matzke Chapter 7 Section 7.3 Pages 401 - 410 </li></ul><ul><li>Objectives This lecture will </li></ul><ul><li>Introduce formatting options for ABAP report programs </li></ul><ul><li>Examine color output options and how they can be applied </li></ul><ul><li>Examine Icon, Symbol and Line options and how they can be applied </li></ul><ul><li>Examine Line Size and Line Count options and how they can be applied </li></ul><ul><li>Examine Page and Columns Headers how they can be applied </li></ul>
    3. 3. Formatting Output - Color <ul><li>ABAP allows you to use 7 colors in your output lists. </li></ul><ul><li>You can activate these colors by specifying a number or a symbolic name. </li></ul><ul><li>To display the colors and their corresponding symbolic names, use transaction LIBS and select Demo: All Colors . </li></ul>
    4. 4. Formatting Output - Color
    5. 5. Generating Icons, Symbols and Lines
    6. 6. Setting the list format
    7. 7. Page and Column Headers
    8. 8. Header using TOP-OF-PAGE Event
    9. 9. Formatting Output - Solid Lines <ul><li>The SY-ULINE system field generates a horizontal line, SY-VLINE a vertical line. report lec702. data: square type i, line_size type i value 40. uline. format color col_heading. write: / sy-vline, ‘Numbers and their squares’, at line_size sy-vline. format color off. uline. do 10 times. square = sy-index ** 2. write: / sy-vline, sy-index color col_key, sy-vline, square, at line_size sy-vline. enddo. uline. </li></ul>

    ×