report zsalv_040 .
types: begin of g_type_itab.
include type sflight.
types: exception type char1,
end of g_type_itab.
data gt_itab type table of g_type_itab.
data gs_itab type g_type_itab.
data gr_table type ref to cl_salv_table.
select * from sflight into table gt_itab
up to 25 rows.
loop at gt_itab into gs_itab.
if gs_itab-seatsocc >= 90.
gs_itab-exception = '1'.
elseif gs_itab-seatsocc >= 50.
gs_itab-exception = '2'.
else.
gs_itab-exception = '3'.
endif.
modify gt_itab from gs_itab.
endloop.
cl_salv_table=>factory(
importing
r_salv_table = gr_table
changing
t_table = gt_itab ).
data: lr_columns type ref to cl_salv_columns_table,
lr_column type ref to cl_salv_column_table.
lr_columns = gr_table->get_columns( ).
lr_columns->set_exception_column( 'EXCEPTION' ).
lr_column ?= lr_columns->get_column( 'EXCEPTION' ).
lr_column->set_short_text( 'MY EXCEPT' ).
data: lr_functional_settings type ref to cl_salv_functional_settings.
lr_functional_settings = gr_table->get_functional_settings( ).
data: lr_tooltips type ref to cl_salv_tooltips.
lr_tooltips = lr_functional_settings->get_tooltips( ).
lr_tooltips->add_tooltip(
type = cl_salv_tooltip=>c_type_exception
value = '1').
lr_tooltips->add_tooltip(
type = cl_salv_tooltip=>c_type_exception
value = '2').
lr_tooltips->add_tooltip(
type = cl_salv_tooltip=>c_type_exception
value = '3').
gr_table->display( ).
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
570 | REPORT z15_09. | sapjoy | 2012.08.01 | 967 |
569 | REPORT z14_19. | sapjoy | 2012.08.01 | 968 |
568 | REPORT z05_07. | sapjoy | 2012.07.30 | 970 |
567 | REPORT z07_03. | sapjoy | 2012.07.30 | 970 |
566 | REPORT z10_09. | sapjoy | 2012.07.30 | 970 |
565 | REPORT z05_29. | sapjoy | 2012.07.30 | 974 |
564 | REPORT z12_04. | sapjoy | 2012.07.30 | 976 |
563 | REPORT Z12_17. | sapjoy | 2012.07.30 | 981 |
562 | REPORT z15_08. | sapjoy | 2012.08.01 | 982 |
561 | REPORT z17_10 . | sapjoy | 2012.08.01 | 985 |
560 | REPORT z09_02. | sapjoy | 2012.07.30 | 992 |
559 | REPORT z12_07. | sapjoy | 2012.07.30 | 994 |
558 | REPORT z12_32. | sapjoy | 2012.07.30 | 994 |
557 | REPORT z17_08 . | sapjoy | 2012.08.01 | 994 |
556 | REPORT z05_06. | sapjoy | 2012.07.30 | 996 |
555 | REPORT z05_19. | sapjoy | 2012.07.30 | 996 |
554 | REPORT z05_03. | sapjoy | 2012.07.30 | 998 |
553 | REPORT Z12_16. | sapjoy | 2012.07.30 | 998 |
552 | REPORT z12_25. | sapjoy | 2012.07.30 | 999 |
551 | REPORT z14_06. [1] | sapjoy | 2012.08.01 | 1007 |