探索flutter框架开发的app在移动应用市场的潜力与挑战
753
2022-10-19
REUSE_ALV_GRID_DISPLAY Refresh ALV_SAP刘梦_新浪博客
太久不写报表了,今天用到一个简单alv显示刷新,懒得写OO的,就直接最简单的用了FM:
之前都是用OO ALV 刷新,突然忘了怎么FM 的刷新,
然后搜了下,呵呵,做个简单记录吧。
主要代码
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_structure_name = 'SPFLI' i_callback_program = sy -repid i_callback_pf_status_set = 'FORM_SET_PF_STATUS' i_callback_user_command = 'FRM_COMMAND' TABLES t_outtab = gt_SPFLI EXCEPTIONS program_error = 1 OTHERS = 2 . IF sy -subrc <> 0 . * Implement suitable error handling here ENDIF .FORM form_set_pf_status USING rt_extab TYPE slis_t_extab. SET PF-STATUS 'STATUS_POST' .ENDFORM.FORM frm_command USING p_ucomm LIKE sy-ucomm ps_selfield TYPE slis_selfield. DATA: l_grid TYPE REF TO cl_gui_alv_grid. CASE p_ucomm. WHEN 'POST'. "post to PERFORM frm_post ..... CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR' IMPORTING e_grid = l_grid. CALL METHOD l_grid->check_changed_data. CALL METHOD l_grid->refresh_table_display. ps_selfield-refresh = 'X'. ps_selfield-col_stable = 'X'. ps_selfield-row_stable = 'X'. WHEN 'BACK'. LEAVE TO SCREEN 0. WHEN 'LEAVE'. LEAVE PROGRAM. ENDCASE .ENDFORM.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~