03-09-2009 7:36 AM
Hi,
Experts,
I want to display sflight data into tree format by using oabap classes with out container becoz in those tables container is optional thats why i want to display it with out container,events,hierarchy.
thanks in advance,
shabeer ahmed
03-09-2009 8:13 AM
TRY.
CALL METHOD cl_salv_tree=>factory
EXPORTING
R_CONTAINER =
IMPORTING
r_salv_tree = r_tree
CHANGING
t_table = lt_cross
.
CATCH cx_salv_error.
ENDTRY.
USE Class: cl_salv_tree
SAMPLE PROGRAM: SAPBC405_LDBD_ALV_OM_TREE
Note : No Container or Grid is required..
Regards,
Gurpreet
03-09-2009 1:39 PM
Hi Shabeer,
You can use docking container, for which you dont have to create container.
data: o_docking type ref to cl_gui_docking_container,
o_grid type ref to cl_gui_alv_grid.
create object o_docking
exporting
ratio = '95'.
create object o_grid
exporting
i_parent = o_docking.
" then call method for alv grid display passing your output table
o_grid->set_table_for_first_display(
OR you can use class SALV as mentioned below.
data: gt_outtab type table of SFLIGHT.
data: gr_table type ref to cl_salv_table.
"... Select Data
select * from SFLIGHT into corresponding fields of table gt_outtab.
"... Create Instance
call method cl_salv_table=>factory
IMPORTING
R_SALV_TABLE = gr_table
changing
t_table = gt_outtab.
"... Display Table
gr_table->display( ).
Regards,
Pratik Vora
Edited by: Pratik Vora on Mar 9, 2009 7:12 PM
03-10-2009 8:52 AM