ALV Filter 로직

Class 기반 ALV 리포트 개발 시, 사용가능한 filter 로직을 공유합니다.

1. ALV Grid Filter 구현 로직

DATA: gt_filter TYPE lvc_t_filt,
      gs_filter TYPE lvc_s_filt.
.....
gs_filter-fieldname = 'VBELN'.
gs_filter-sign = 'E'.
gs_filter-option = 'BT'.
gs_filter-low = '0000000001'.
gs_filter-high = '0000000003'.
APPEND gs_filter TO gt_filter.
.....
CALL METHOD gr_alvgrid->set_table_for_first_display
  EXPORTING
    is_variant = variant
    i_save = 'X'
    i_default = 'X'
    i_layout = gs_layout
  CHANGING
    it_outtab = table
    it_fieldcatalog = fcat
    it_filter = gt_filter[].

2. ALV Grid 테이블 데이터중 필터링된 대상 검색방법

  DATA: lt_fidx TYPE lvc_t_fidx.
  CALL METHOD go_grid1->get_filtered_entries
    IMPORTING
      et_filtered_entries = lt_fidx.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments