x效果图:
code:
*&---------------------------------------------------------------------*
*&Report
ZLM_ALV_007
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORTzlm_alv_007 .
*----------------------------------------------------------------------*
*
Code
to
Apply
Filters
to
SALV
Table
Display
*----------------------------------------------------------------------*
*
CLASS
lcl_report
DEFINITION
*----------------------------------------------------------------------*
CLASSlcl_report
DEFINITION .
*
PUBLIC
SECTION .
*
*
DATA :
gt_spfli
TYPE
STANDARD
TABLE
OF
spfli .
*
*
ALV
reference
DATA :
o_alv
TYPE
REF
TO
cl_salv_table .
*
METHODS :
*
data
selection
get_data ,
*
*
Generating
output
generate_output .
*
*$*$*.....CODE_ADD_1-
Begin..................................1..*$*$*
*
*
In
this
section
we
will
define
the
private
methods
which
can
*
be
implemented
to
set
the
properties
of
the
ALV
and
can
be
*
called
in
the
*
PRIVATE
SECTION .
METHODS :
set_pf_status
CHANGING
co_alv
TYPE
REF
TO
cl_salv_table .
*
METHODS :
set_filters
CHANGING
co_alv
TYPE
REF
TO
cl_salv_table .
*
Set
Top
of
page
METHODS :
set_top_of_page
CHANGING
co_alv
TYPE
REF
TO
cl_salv_table .
*
*
Set
End
of
page
METHODS :
*&
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS
*
*
*
*
*
*
*
*
*
*
*$*$*.....CODE_ADD_1
*
*
*
*
*
*
*
*
*