728x90 반응형 분류 전체보기244 ALV All select 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 . .. 2023. 2. 24. ALV Fieldcatalog Using Field-symbol PERFORM fieldcatalog_merge USING '스트럭쳐 이름' 'GT_FIELDCAT'. PERFORM field_setting_call USING 'GT_FIELDCAT'. PERFORM alv_init USING gs_layout gs_variant gi_grid. TOP FIELD-SYMBOLS : TYPE lvc_t_fcat, TYPE lvc_s_fcat. `FORM fieldcatalog_merge USING pv_table pv_fcat. ASSIGN (pv_fcat) TO . CALL FUNCTION 'LVC_FIELDCATALOG_MERGE' EXPORTING i_structure_name = pv_table CHANG.. 2023. 2. 21. ALV 체크박스 클릭시 Cell edit set handler CALL METHOD g_alv->register_edit_event EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified. "체크박스같은거 클릭시 바로 체인지드이벤트 탈수있게select data 처음 체크박스 안보이게 모드 i로 준다 LOOP AT gt_tab INTO gs_tab. gs_tab-mode = 'I'. MODIFY gt_tab FROM gs_tab. ENDLOOP.체인지드 이벤트때 모드 변경해주고 pbo 타게한다 FORM data_changed USING er_data_changed TYPE REF TO cl_alv_changed_data_protocol e_ucomm TYPE sy-ucomm. DATA: .. 2023. 2. 21. Dynamic table Calculation 필드심볼로 구성된 다이나믹 테이블에서 특정 필드 값 계산식이 필요할때 FIELD-SYMBOLS TYPE TABLE. DATA : TDREF TYPE REF TO DATA. CREATE DATA TDREF LIKE . ASSIGN TDREF->* TO . SORT BY ('VERSI') ('PERIO') ('ARTNR') ('WERKS'). LOOP AT ASSIGNING . ASSIGN COMPONENT 'VRGAR' OF STRUCTURE TO FIELD-SYMBOL(). IF = 'F'. ASSIGN COMPONENT 'VERSI' OF STRUCTURE TO FIELD-SYMBOL(). ASSIGN .. 2023. 2. 21. RANGES 변수 SELECT-OPTIONS 값 변형해서 변수에 넣기 RANGES: GR_PERIO FOR CE1K100-PERIO. IF S_MONTH-HIGH IS INITIAL. GR_PERIO[] = VALUE #( BASE GR_PERIO[] ( SIGN = 'I' OPTION = 'EQ' LOW = P_GJAHR && '0' && S_MONTH-LOW ) ). ELSE. GR_PERIO[] = VALUE #( BASE GR_PERIO[] ( SIGN = 'I' OPTION = 'BT' LOW = P_GJAHR && '0' && S_MONTH-LOW HIGH = P_GJAHR && '0' && S_MONTH-HIG.. 2023. 2. 21. ALV F4 (Possible entry) ALV에 F4 등록 alv first display 이전에 perform해준다. PERFORM SET_F4_FIELD_0100. FORM SET_F4_FIELD_0100 . DATA(LT_F4) = VALUE LVC_T_F4( REGISTER = GC_X ( FIELDNAME = 'INSPCHAR' ) ). CALL METHOD GO_GRID_100->REGISTER_F4_FOR_FIELDS EXPORTING IT_F4 = LT_F4[]. ENDFORM. Method 등록 METHODS: HANDLE_ON_F4 FOR EVENT ONF4 OF CL_GUI_ALV_GRID IMPORTING E_FIELDNAME E_FIELDVALUE ES_ROW_NO ER_EVENT_DATA ET_BAD_C.. 2023. 2. 21. 이전 1 ··· 23 24 25 26 27 28 29 ··· 41 다음 728x90 반응형