10 | Working with the SAP List Viewer
After the grid object is instantiated, you can enable the standard ALV toolbar by
invoking method SET.ALL of class CL_SALV_FUNCTIONS. Figure 10.6 shows an
example of the report display generated by method show_grid.
tp
utt Eat Goto Stmngi Sptw h»»
G ' J ©Q© Q ft]
m
ABAP 00 Flight Query Report
Ol
& V V 2
O a a
a 5 (to
A/r4fxan Art res
Ajr^rKin Arim
A/r«ncan Artre?
IFUJ [FlQNOale |Ofj Depart city |T» lAwfrUfT" l0f»artjr» |A#rt*al | *eOf|Curr»jlS
17 10/10/2007 JFK NEW YORK SFC SAN FRANC I5C0 000000 21 CO 00 1CU10QC07
17 11/07/2007 JFK NEW YORK SFC SAN FRANCISCO 000000 21COOO
17 12*05/2007 JFK NEW YORK SFC SAN FRANCISCO 00 00 00 210000
M UmfcanAm— 17
[01
<02/2008 JFK I NEW YORK [Of 0|8AN FRANCISCO 'OOOOOO 21
CO
00
AA *A/r«fxanAr*r#s ' 17 01/3(1/2008 JFK*NEWYORK SFO* SAN FRANCISCO '00 00 00 21COOO
A/r*ocan Kf\m
A/r««canArtffs
:an Artr*j A/ntncJ
Amtncan Artr.e*
UmtflfnArtn—
17 03/26/2008 jFKjNCWYORK ISFOjSAN fRANttSCO 10000:00 pi oo.ool
wlwggOO^JfKlN^rYO^
21 CO
00
an Artres
an Artres
an Ann**
17 CW2ir2008 JFK NEW YORK SFO<8glF^CgC^OOOO^
5/18/2008 JFK NEW YORK
S
an Artre*
-BIM ARTFM
SmificsnArtris 17
07/16/2008 JFK NEW YORK SFO SAN FRANCISCO 00 00 00
06/13/2008 JFK NEW YORK SFO SAN FRANCISCO 00 00 00 21 0000
21
CO
00
09/10/2008 JFK NEW YORK SFC SAN FRANCISCO 00 00 00 21 00 00
10D8/2008 JFK NEW YORK SFC SAN FRANCISCO 00 00 00 2100 00
11105/2008 JFK NEW YORK SFO SAN FRANCISCO 00 00 00 21 0000
11A07/2C07
1205/2C07
01J02/2CC3
01/30f2CC3
02/27/2C03
03WK03
04/23*2008
05/21/21XS
07/I6f2i:03
08n*2l»8
08/1CV2C08
10C8/2CC8
11XW2CC8
422 8400 USD
422 9400'USD
422 9400 USD
4229400 USO
422 9400 USO
<22 9400 USD
422 9400 USO
422 9400'USD
422 9400 USD
422 9400 USO
422 9400 *USO
422 9400 USO
422 9400 USO
422 9400 *USO
422 9400 USD
Ct
Ot
ot
ot
ot
ot
ot
ot
ot
ot
OL
Delia Airlines
Delia Airlines
1893 11*05/2007
1649 12*03/2007
JFK NEW YORK SFC SAN FRANCISCO 17 1500 2037 00 11J05/2C07
Delia Airlines
Delia Airlines
Delia Airlines
'0enaA4rines
De«a Airtnes
Delia Airlines
Delia Afiines
Delia Airlines
Delia Airlines
11699112^1/2007
1699101/28/2008
[169919205/2008
1699 03/24/2008
1699 04/21/2008
JFK NEW YORK SFO SA.N
FRANC
ISCO
1
7 16 10 20 «7 00
JFK'NEWYORK SFO'SANFRANCISCO 17 15 DO 20 37 00
1699
1699
05/19/2008
06/16/2008
1699 07/14/2008
1699 OS/11/2008
JFK NEW YORK
JFK NEW YORK
JFK [NEW YORK
JFK NEW YORK*
JFK NEW YORK
JFK NEW YORK
JFK NEW YORK
JFK NEW YORK
SFOjSANFRANCISCO 17 1500 2037 00
TSfOjSANFRANCISCO 1715Q0 12037:001
jsFojsAN FRANCISCOM
'SFO'SANFRANCISCO
SFC SAN FRANCISCO
17 1500
2C37 00
171500
17:1500
r
SAN
FRANCISCO 171500
SFO SAN FRANCISCO 17 15 00
SFO* SAN FRANCISCO 17 1500
-2037:00
J-0
37 00
'20 37
00
20 37
00
2037 00
12XJ3/2C07
12/31/2CC7
01/20/2008
02/2V2C08
4229400 USO
422 9400 USD
422 9400 USD
422 8400 *USO
422 9400 USD
oynvmx 4229400 uso use
04/21/2CC*
06*16/2008
07/14/3C08
08J11/2C08
422 9400 USO
422 9400 USO
422 9400 *USO
422 9400 USD
422 9400
?
USO
| use
use
Figure 10.6 Displaying the Flight Query Results in an ALV Table
As you can see in Listing 10.4, shown earlier, there are few dependencies
between the CL_$ALV_TABLE view class and the underlying data model. In the
past, the coupling between the data model and the grid control was much tighter
because developers were forced to provide view metadata (i.e., the ALV field cat-
alog). Fortunately, with the encapsulation techniques employed in the design of
the ALV Object Model, SAP has eliminated these dependencies to make report
development much more flexible.
270