type-pools truxs.
tables sscrfields.
data:gt_fcat type lvc_t_fcat,
gs_fcat type lvc_s_fcat,
gs_layout type lvc_s_layo,
gt_event type slis_t_event,
gs_event like line of gt_event.
** 宏定义
define m_build_fcat.
clear gs_fcat .
gs_fcat-fieldname = &1.
gs_fcat-coltext = &2.
gs_fcat-scrtext_l = &2.
gs_fcat-scrtext_m = &2.
gs_fcat-scrtext_s = &2.
gs_fcat-ref_field = &3.
gs_fcat-ref_table = &4.
gs_fcat-checkbox = &5.
gs_fcat-edit = &6.
append gs_fcat to gt_fcat.
clear gs_fcat.
end-of-definition.
gs_layout-cwidth_opt = 'X'.
gs_layout-zebra = 'X'.
*&---------------------------------------------------------------------*
*& Form FRM_OUT_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->PT_ITAB text
*----------------------------------------------------------------------*
form frm_out_data tables pt_itab.
call function 'REUSE_ALV_GRID_DISPLAY_LVC'
exporting
i_callback_program = sy-repid
is_layout_lvc = gs_layout
it_fieldcat_lvc = gt_fcat
it_events = gt_event
i_save = 'A'"保存
tables
t_outtab = pt_itab
exceptions
program_error = 1
others = 2.
endform. "FRM_OUT_DATA
阅读(1848) | 评论(0) | 转发(0) |