Lecture09 abap on line
-
Upload
mkpatil -
Category
Technology
-
view
1.566 -
download
2
description
Transcript of Lecture09 abap on line
Lecture 9Reporting – Interactive (A)
BCO5647 Applications Programming Techniques (ABAP)
2BCO5647
Readings & Objectives
Readings
Keller & Keller Chapter 7Section 7.3.6 & 7.3.7
Objectives
This lecture will
Introduce basic concepts of interactive reporting
Introduce interactive event statements
Examine AT LINE-SELECTION event statement in reference to interactivereports
Introduce the HIDE command and examine how it is used in interactivereports
Examine techniques to ensure valid line selection in interactive reports
3BCO5647
Interactive Reporting: Overview
A simple list can have an interactive or “drill-down” capability added wheremore detail can be displayed related to a line on the original list.
LH 0012 BERLIN NEW YORK
LH 0023 LONDON BERLIN
Flights Dates Available
for LH 0023
29.10.2006
12.11.2006
11.12.2006
12 SEATS AVAILABLE
for LH 0023 on 12.11.2006
Drill-Down
Drill-Down
4BCO5647
Interactive Reporting: Overview
Interactive reporting allows you to create secondary lists and windows. Todisplay these on the screen you use function keys, pushbuttons anddouble-clicks.
Using function keys the user can also branch to a transaction or anotherreport program.
5BCO5647
Events
ABAP is an event-driven programming language.
Event statements are markers in your program code that define when thecode associated with an event should run.
New Event statement
LOAD-OF-PROGRAM
6BCO5647
Using the AT LINE-SELECTION event
Simple Example:
report lec701a.
start-of-selection. write: / ‘basic list’. write: / sy-lsind.
at line-selection. write: / ‘secondary list after double-click’. write: / sy-lsind color 4.
7BCO5647
Using the AT LINE-SELECTION event
8BCO5647
Example: Interactive Report
9BCO5647
Using the AT LINE-SELECTION event
10BCO5647
The HIDE area
The Hide statement allows you to store the field contents for a particular listline in a special memory area.
For each field in the Hide statement, the system stores the field name andvalue.
11BCO5647
Using the AT LINE-SELECTION event
As soon as the user selects a line by double-clicking, the system passes the values stored for this line in the HIDE area back into the original fields.
12BCO5647
Valid Line Selection
In the example above, one field (spfli-carrid) whose contents is stored in the Hide areais set to the initial value.
When the user selects an invalid line, the system cannot find a corresponding value inthe Hide area.
When the CHECK statement produces a negative result, the system leaves the currentprocessing block without producing a secondary list.