直接看实列吧:
*&---------------------------------------------------------------------*
*& Report ZTEST_ZM_026
*&---------------------------------------------------------------------*
*&动态生成内表
*&20220120 zhangmin
*&---------------------------------------------------------------------*
REPORT ztest_zm_026.
TABLES: sflight.
DATA:gt_sflight LIKE TABLE OF sflight WITH HEADER LINE.
DATA:BEGIN OF gt_connid OCCURS 0,
connid LIKE sflight-connid,
END OF gt_connid.
DATA:gt_fieldcat LIKE TABLE OF lvc_s_fcat,
gs_fieldcat LIKE LINE OF gt_fieldcat.
FIELD-SYMBOLS:<fs_output> TYPE STANDARD TABLE.
PARAMETERS:p_carrid LIKE sflight-carrid.
START-OF-SELECTION.
PERFORM frm_get_column.
PERFORM frm_generate_itab.
PERFORM frm_alv_display