Code: Alles auswählen.
FORM init_fieldcat USING p_gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: ls_fieldcat TYPE slis_fieldcat_alv,
wa_textpool TYPE textpool.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'VKBUR'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Verkaufsbüro'.
ls_fieldcat-seltext_m = 'Verk.büro'.
ls_fieldcat-seltext_s = 'Vkbüro'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'LAND'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Land'.
ls_fieldcat-seltext_m = 'Land'.
ls_fieldcat-seltext_s = 'Land'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'KUNNR'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Kunde'.
ls_fieldcat-seltext_m = 'Kunde'.
ls_fieldcat-seltext_s = 'Kunde'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'NAME1'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Name'.
ls_fieldcat-seltext_m = 'Name'.
ls_fieldcat-seltext_s = 'Name'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'EDI'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'EDI'.
ls_fieldcat-seltext_m = 'EDI'.
ls_fieldcat-seltext_s = 'EDI'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_AUF_TECCOM'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Aufträge TecCom'.
ls_fieldcat-seltext_m = 'Auftr. TecCom'.
ls_fieldcat-seltext_s = 'A.TecCom'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_AUF_SONST'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'sonstige Aufträge'.
ls_fieldcat-seltext_m = 'sonst. Auftr.'.
ls_fieldcat-seltext_s = 'sonst. A.'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_POS_TECCOM'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Positionen TecCom'.
ls_fieldcat-seltext_m = 'Pos. TecCom'.
ls_fieldcat-seltext_s = 'P. TecCom'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_POS_SONST'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'sonst. Positionen'.
ls_fieldcat-seltext_m = 'sonst. Pos.'.
ls_fieldcat-seltext_s = 'sonst. P.'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_AUF_GES'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Aufträge gesamt'.
ls_fieldcat-seltext_m = 'Auftr. ges.'.
ls_fieldcat-seltext_s = 'A. ges.'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_POS_GES'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Positionen gesamt'.
ls_fieldcat-seltext_m = 'Pos. ges.'.
ls_fieldcat-seltext_s = 'P. ges.'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'PROZENT_POS'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'real. Pos. in %'.
ls_fieldcat-seltext_m = 'Pos. %'.
ls_fieldcat-seltext_s = 'P. %'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'WERT_TECCOM'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Auftragswert TecCom'.
ls_fieldcat-seltext_m = 'Wert TecCom'.
ls_fieldcat-seltext_s = 'Wert T'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'WERT_SONST'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Auftragswert sonst.'.
ls_fieldcat-seltext_m = 'Wert sonst.'.
ls_fieldcat-seltext_s = 'Wert S'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'WERT_GES'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Auftragswert ges.'.
ls_fieldcat-seltext_m = 'Wert ges.'.
ls_fieldcat-seltext_s = 'gesamt'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'PROZENT_WERT'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'real. Auftragswert %.'.
ls_fieldcat-seltext_m = 'real. Wert %'.
ls_fieldcat-seltext_s = 'Wert %'.
APPEND ls_fieldcat TO p_gt_fieldcat.
ENDFORM.
Code: Alles auswählen.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
i_bypassing_buffer = 'X'
* I_BUFFER_ACTIVE = ' '
i_callback_program = g_repid
* i_callback_pf_status_set = ''
* i_callback_user_command = ''
* i_structure_name = 'z1m0mm_0001'
is_layout = gs_layout
it_fieldcat = gt_fieldcat
* it_excluding = gt_excluding
* IT_SPECIAL_GROUPS =
it_sort = gt_sort
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* i_save = 'U' "JS 22.09.2003
i_save = 'A' "JS 22.09.2003
is_variant = g_variant
it_events = gt_events[]
* it_event_exit = gt_event_exit
is_print = gt_print
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = ausgabe_tab.
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
.
Code: Alles auswählen.
FORM layout_build USING p_gs_layout TYPE slis_layout_alv.
p_gs_layout-colwidth_optimize = 'X'.
* p_gs_layout-no_vline = 'X'.
p_gs_layout-zebra = 'X'.
p_gs_layout-cell_merge = 'X'.
p_gs_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " LAYOUT_BUILD