Sie sind auf Seite 1von 3

report zalv .

type-pools : slis.
tables : spfli,sflight.

data : begin of itab occurs 0,


carrid like spfli-carrid,
connid like spfli-connid,
end of itab.
constants:
gc_formname_top_of_page type slis_formname value 'top_of_page'.

data : g_fieldcat type slis_t_fieldcat_alv,


g_repid like sy-repid,
gt_events type slis_t_event,
g_layout type slis_layout_alv,
gs_keyinfo type slis_keyinfo_alv,
g_tabname_header type slis_tabname,
g_tabname_item type slis_tabname.

data : itab1 like sflight occurs 0 with header line.

g_repid = sy-repid.

select carrid connid into corresponding fields of table itab from


spfli.

g_tabname_header = 'itab'.
g_tabname_item = 'itab1'.

clear gs_keyinfo.
gs_keyinfo-header01 = 'carrid'.
gs_keyinfo-item01 = 'carrid'.

loop at itab.
select * from sflight where carrid = itab-carrid.
move-corresponding sflight to itab1.
append itab1.
clear itab1.
endselect.
if sy-subrc eq 0.
exit.
endif.
endloop.

perform e03_eventtab_build using gt_events[].

perform pc_fld using :


1 1 'carrid' 'carrier' 10 ' h' 'itab',
1 2 'connid' 'connectionid' 04 ' h' 'itab',
2 1 'fldate' 'flight det' 10 ' h' 'itab1',
2 2 'price' 'pricing det' 20 ' h' 'itab1'.
call function 'reuse_alv_hierseq_list_display'
exporting
* i_interface_check = ' '
i_callback_program = g_repid
* i_callback_pf_status_set = ' '
i_callback_user_command = 'abcdef'
* is_layout =
it_fieldcat = g_fieldcat
* it_excluding =
* it_special_groups =
* it_sort =
* it_filter =
* is_sel_hide =
* i_screen_start_column = 0
* i_screen_start_line = 0
* i_screen_end_column = 0
* i_screen_end_line = 0
* i_default = 'x'
* i_save = ' '
* is_variant =
it_events = gt_events[]
* it_event_exit =
i_tabname_header = g_tabname_header
i_tabname_item = g_tabname_item
* i_structure_name_header =
* i_structure_name_item =
is_keyinfo = gs_keyinfo
* is_print =
* is_reprep_id =
* i_buffer_active =
* i_bypassing_buffer =
* importing
* e_exit_caused_by_caller =
* es_exit_caused_by_user =
tables
t_outtab_header = itab
t_outtab_item = itab1
* exceptions
* program_error = 1
* others = 2
.
if sy-subrc <> 0.
* message id sy-msgid type sy-msgty number sy-msgno
* with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.

* -----------------------------------------------------------*
form abcdef using r_ucomm like sy-ucomm rs_selfield type
slis_selfield.
* -----------------------------------------------------------*
case r_ucomm.
when '&ic1'.
read table itab index rs_selfield-tabindex.
if sy-subrc eq 0.
endif.
clear r_ucomm.
endcase.

endform.

*&---------------------------------------------------------------------*
*& form pc_fld
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->p_1 text
* -->p_1 text
* -->p_0057 text
* -->p_0058 text
* -->p_10 text
* -->p_0060 text
* -->p_0061 text
*----------------------------------------------------------------------*

form pc_fld using l p f d o r t.

data : t_fld type slis_fieldcat_alv.

clear t_fld.

move : l to t_fld-row_pos.
move : p to t_fld-col_pos.
move : f to t_fld-fieldname.
move d to : t_fld-seltext_l,
t_fld-seltext_m,
t_fld-seltext_s.
move 'l' to t_fld-ddictxt.
move o to t_fld-outputlen.
move t to t_fld-tabname.
move ' ' to t_fld-do_sum.

append t_fld to g_fieldcat.

endform. " pc_fld


form e03_eventtab_build using e03_lt_events type slis_t_event.
data: ls_event type slis_alv_event.
*
call function 'reuse_alv_events_get'
exporting
i_list_type = 0
importing
et_events = e03_lt_events.
read table e03_lt_events with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move gc_formname_top_of_page to ls_event-form.
append ls_event to e03_lt_events.
endif.
endform.
_______________

Das könnte Ihnen auch gefallen