ALV GRID should be the most common way to display, let me give an example: Query item description and item group
1 ReportZTEST01.2 3 Tables:mara,makt.4 5type-Pools:slis.6 7 Types:begin of Typ_mara,8MATNR type mara-Matnr,9MAKTX type makt-MAKTX,TenMATKL type mara-MATKL, One end of Typ_mara. A Data:gt_mara type Standard table of Typ_mara. - -Select-options:s_matnr for mara-Matnr. the -start-of-selection. - perform sub_get_data. - perform sub_alv_data. + - *&---------------------------------------------------------------------* + *& Form Sub_get_data A *&---------------------------------------------------------------------* at *text - *----------------------------------------------------------------------* - form Sub_get_data. - Select Mara~matnr makt~maktx mara~matkl - into corresponding fields of table Gt_mara - From Mara in Left join Makt -On mara~matnr = Makt~matnr andMakt~spras = sy-Langu to where Mara~matnr in S_matnr. +EndForm."Sub_get_data - the *&---------------------------------------------------------------------* * *& Form Sub_alv_data $ *&---------------------------------------------------------------------*Panax Notoginseng *text - *----------------------------------------------------------------------* the form Sub_alv_data. + A data:ltd_cat type Standard table of SLIS_FIELDCAT_ALV, the lth_cat type Slis_fieldcat_alv. + -Data:ls_lay type Slis_layout_alv."ALV Layout $Ls_lay-colwidth_optimize ='X'. $ -Lth_cat-fieldname ='Matnr'. -lth_cat-seltext_s ='Item Code'. the append Lth_cat to Ltd_cat. - clear Lth_cat.WuyiLth_cat-fieldname ='MAKTX'. thelth_cat-seltext_s ='Description'. - append Lth_cat to Ltd_cat. Wu clear Lth_cat. -Lth_cat-fieldname ='MATKL'. Aboutlth_cat-seltext_s ='Item group'. $ append Lth_cat to Ltd_cat. - clear Lth_cat. - -Pagerfunction 'Reuse_alv_grid_display' A Exporting +I_callback_program = sy-Repid theI_grid_title ='Bulk Query' -I_callback_user_command ='User_command' $Is_layout = Ls_lay"Gth_lay theIt_fieldcat =Ltd_cat theI_save ='A' the TABLES theT_outtab =Gt_mara. - inEndForm."Sub_alv_data the the About *&---------------------------------------------------------------------* the *& Form Sub_command the *&---------------------------------------------------------------------* the *text + *----------------------------------------------------------------------* - *-->i_ucomm Text the *-->i_selfield TextBayi *----------------------------------------------------------------------* theForm User_command using i_ucomm like sy-Ucomm the I_selfield type Slis_selfield. - -If I_ucomm ='&ic1'. theCase i_selfield-fieldname. theWhen'Matnr'. theSet parameter ID'MAT'Field i_selfield-value. theCall Transaction'MM03' andSkip First screen. - endcase. the endif. the theEndForm."User_command
ALV GRID (1) example