본문 바로가기
728x90
반응형

ALV25

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.
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.
ALV Drop down list fieldcatalog 속성에 추가해준다. ls_fdcat-drdn_hndl = '1'. ls_fdcat-checktable = '!'. ALV 드롭다운 만들어주기 FORM alv_cl_dropdown_list . DATA : lt_dropdown TYPE lvc_t_dral, ls_dropdown TYPE lvc_s_dral. * CLEAR ls_dropdown. * ls_dropdown-handle = '1'. "지금은 드롭다운이 하나라 핸들이 1 * ls_dropdown-int_value = '직영점'. "선택되는 값 * ls_dropdown-value = '직영점'. "보여지는 값? * APPEND ls_dropdown to .. 2023. 2. 21.
ALV Top-of-Page DATA 선언 DATA: g_alv TYPE REF TO cl_gui_alv_grid, go_splitter type ref to cl_gui_splitter_container, g_top type REF TO cl_gui_container, g_bottom type ref to cl_gui_container, g_dyndoc_id type ref to cl_dd_document.CLASS 정의 CLASS lcl_event DEFINITION. "정의부 PUBLIC SECTION. METHODS : top_of_page FOR EVENT top_of_page OF cl_gui_alv_grid IMPORTING e_dyndoc_id. ENDCLASS. CLASS lcl_event IMPLEMENTATION.. 2023. 2. 21.
ALV 특정 Cell EDIT 1. ALV에 출력되는 INT에 STYLE 필드 추가 DATA: BEGIN OF gs_tab. INCLUDE STRUCTURE zed03_alv_t1. DATA: style type lvc_t_styl, END OF gs_tab, gt_tab LIKE TABLE OF gs_tab.FORM layo . gs_layo-stylefname = 'STYLE'. ENDFORM."FORM add_row . DATA: ls_edit TYPE lvc_s_styl, lt_edit TYPE lvc_t_styl, l_tabix TYPE sy-tabix. CLEAR gs_tab, gs_tab-style. APPEND gs_tab TO gt_tab. READ TABLE gt_tab INTO gs_tab INDEX.. 2023. 2. 21.
728x90
반응형