Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to display data into tree format with out using custom container ?

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Thank u