检查LOGO是否存在
If you need to include a (lot of) graphic(s) on a layout, you need to check first if the object exists or this will cause errors when the output is triggered.?To do this : (example from smartforms)?- Define a variable 'GV_GRAPHICS_EXIST' in the global variables- Add the following code to your smartform data: ls_stxbitmaps like stxbitmaps.select single * from stxbitmaps into ls_stxbitmaps where tdobject = 'GRAPHICS'
对ALV的自动刷新
* ------- 对ALV LIST的刷新:MODULE user_command_1100 INPUT.DATA save_ok LIKE sy-ucomm.save_ok = ok_code.CLEAR ok_code.CASE save_ok.WHEN 'BACK'.CLEAR gs_data.PERFORM update_internal_table.SET SCREEN 0.LEAVE SCREEN.FORM update_internal_table.DATA: gd_repid LIKE sy-repid, "Existsref_grid TYPE REF TO cl_gui_alv_grid.IF ref_grid IS INITIAL.CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'IMPORTINGe_grid = ref_grid.ENDIF.IF NOT ref_grid IS INITIAL.CALL METHOD ref_grid->check_changed_data .ENDIF.END
在ALV中添加Footer
* --CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' 之前PERFORM f_build_eventcat. FORM list_text.DATA: w_end TYPE slis_listheader.DATA: i_end TYPE slis_t_listheader.DATA: p_netwr_c(20) TYPE c.DATA: p_fklmg_td_c(20) , p_netwr_td_c(20) ,p_sale_netwr_c(20) , p_sale_netwr_be_c(20).* --- footer p_netpr_beWRITE p_sale_netwr_be TO p_sale_netwr_be_c CURRENCY 'EUR'.CONDENSE p_sale_netwr_be_c.w_end-typ = 'S'.w_end-info = 'Tijdens de maand ontvangen bestellingen voor de Belgische markt:'.APPEND w_end TO i_end.CONCA