메뉴 건너뛰기

SAP 한국 커뮤니티

REPORT z17_22

sapjoy 2012.08.01 20:48 조회 수 : 2264

REPORT  z17_22                                 .

 

include <icon>.

typesbegin of g_type_itab.
        include type sflight.
        types:   icon  type icon_d,
      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-icon = icon_locked.
    elseif gs_itab-seatsocc >= 50.
      gs_itab-icon = icon_message_warning.
else.
      gs_itab-icon = icon_unlocked.
    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_column ?= lr_columns->get_column( 'ICON' ).
lr_column->set_icon( if_salv_c_bool_sap=>true ).
lr_column->set_long_text( 'ICON' ).

gr_table->display( ).

번호 제목 글쓴이 날짜 조회 수
670 Z01_012 [9] sapjoy 2006.12.02 4546
669 REPORT Z03_005 [1] sapjoy 2006.12.02 2735
668 REPORT Z03_006 [5] sapjoy 2006.12.02 2812
667 Z01_018 [2] sapjoy 2006.12.02 3042
666 Z01_019 [2] sapjoy 2006.12.02 2688
665 Z01_020 [2] sapjoy 2006.12.02 3008
664 Z01_021 [1] sapjoy 2006.12.02 2771
663 REPORT Z03_018 [3] sapjoy 2006.12.02 2605
662 Z02_003 [2] sapjoy 2006.12.02 3042
661 REPORT Z02_005 . sapjoy 2006.12.02 2375
660 REPORT Z04_005 . sapjoy 2006.12.02 2595
659 <b>ABAP SOURCE는 교재에 사용된 소스들입니다.</b> [1] sapjoy 2006.12.02 3618
658 Dynamic Table Maintenance [1] sapjoy 2006.12.04 4094
657 REPORT Z06_001 MESSAGE-ID ZTEST . [1] sapjoy 2006.12.05 3205
656 REPORT Z07_002 . sapjoy 2006.12.06 2755
655 Z07_001 sapjoy 2006.12.06 2396
654 Z07_005 sapjoy 2006.12.06 2353
653 REPORT Z07_007 sapjoy 2006.12.07 2698
652 REPORT Z07_008 sapjoy 2006.12.07 2462
651 REPORT Z07_009 sapjoy 2006.12.07 2258