본문 바로가기
ABAP

ALV All select

by clode 2023. 2. 24.
728x90
반응형

PERFORM SELECTED_ALL  TABLES GT_LEFT
                                 USING PO_SENDER .


FORM SELECTED_ALL  TABLES PT_TABLE STRUCTURE GS_LEFT
                    USING  PO_GRID TYPE REF TO CL_GUI_ALV_GRID.
  DATA: LS_ROW    TYPE LVC_S_ROW,
        LT_ROWS   TYPE LVC_T_ROW.

      DESCRIBE TABLE PT_TABLE. " fills sy-tfill

      DO SY-TFILL TIMES.
        LS_ROW-INDEX = SYST-INDEX.
        APPEND LS_ROW TO LT_ROWS.
      ENDDO.

      CALL METHOD PO_GRID->SET_SELECTED_ROWS
        EXPORTING
          IT_INDEX_ROWS = LT_ROWS .

ENDFORM.       

전체 해제시엔 REFRESH 구문을 타게하면 된다.

PERFORM REFRESH_ALV USING GO_GRID2_120  GS_LAYOUT2_120  'X'.


FORM REFRESH_ALV  USING    PO_GRID TYPE REF TO CL_GUI_ALV_GRID
                           PS_LAYOUT TYPE LVC_S_LAYO
                           PV_FLAG.
  DATA: LS_STBL TYPE LVC_S_STBL.

* Layout
  IF PV_FLAG = 'X'.
    CASE PO_GRID.
      WHEN GO_GRID_120 OR GO_GRID2_120.
        PS_LAYOUT-CWIDTH_OPT  = GC_X.
        PS_LAYOUT-ZEBRA       = GC_X.
        PS_LAYOUT-SEL_MODE    = GC_D.

    ENDCASE.

    CALL METHOD PO_GRID->SET_FRONTEND_LAYOUT
      EXPORTING
        IS_LAYOUT = PS_LAYOUT.
  ENDIF.

* Refresh
  LS_STBL-ROW = 'X'.
  LS_STBL-COL = 'X'.

  CALL METHOD PO_GRID->REFRESH_TABLE_DISPLAY
    EXPORTING
      IS_STABLE = LS_STBL.
*      I_SOFT_REFRESH = 'X'.

ENDFORM.
728x90
반응형

'ABAP' 카테고리의 다른 글

강제로 PBO PAI 태우기  (0) 2023.02.24
Pop up Message  (0) 2023.02.24
ALV Fieldcatalog Using Field-symbol  (0) 2023.02.21
ALV 체크박스 클릭시 Cell edit  (1) 2023.02.21
Dynamic table Calculation  (0) 2023.02.21

댓글