效果: carrid 列的第二行 设置为热键,
CONNID 第三行设置为button
code:
*&---------------------------------------------------------------------*
*&Report
ZLM_ALV_009
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORTzlm_alv_009 .
*
CLASSlcl_report
DEFINITION .
*
PUBLIC
SECTION .
TYPES
:
BEGIN
OF
spfli_struc .
INCLUDE
TYPE
spfli .
TYPES
:
i_celltype
TYPE
salv_t_int4_column ,
END
OF
spfli_struc .
DATA :
gt_spfli
TYPE
STANDARD
TABLE
OF
spfli_struc .
*
ALV
reference
DATA :
o_alv
TYPE
REF
TO
cl_salv_table .
METHODS :
get_data ,
"
data
selection
generate_output .
"
Generating
output
*
PRIVATE
SECTION .
METHODS :
set_columns .
"
Set
columns
ENDCLASS .
"lcl_report
DEFINITION
*
*
START-OF-SELECTION .
DATA :
lo_report
TYPE
REF
TO
lcl_report .
*
CREATE
OBJECT
lo_report .
lo_report ->get_data (
) .
lo_report ->generate_output (
) .
*
CLASSlcl_report
IMPLEMENTATION .
*
METHOD
get_data .
*
data
selection
SELECT
*
FROM
spfli
INTO
CORRESPONDING
FIELDS
OF
TABLE
gt_spfli .
FIELD-SYMBOLS :
《lfs_spfli》
LIKE
LINE
OF
gt_spfli .
DATA :
lt_celltype
TYPE
salv_t_int4_column .
DATA :
ls_celltype
LIKE
LINE
*&
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT
*
CLASS
*
*
*
ENDCLASS .
*
*
START-OF-SELECTION .
*
*
CLASS
*
*