Application Development and Automation 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: 
Read only

Tree Control

PS_1978
Active Participant
0 Likes
440

Hi,

I have to create a report/module pool program in which I have to display a tree on the left hand side and a table control towards the right hand side and the table contro should do the functionalities of creating new entries, modifying existing ones, deleting and so on (all the functions which we see in table maintenance generator SM30).

Can some one give me some ideas on how to create a navigation tree towards the left hand side of the screen and then displaying details of table in right hand side.

Thanks & Best Regards,

Phani Kumar. S

2 REPLIES 2
Read only

Former Member
0 Likes
377

Hi Phani,

Create on screen. In that left hand side take one custom control and write the code for that custom container. In that same screen right side place subscreen and call the table control.

Naveen.

Read only

Former Member
0 Likes
377

You might need to create a Dock Container...That way you could have a Tree and Table on the same screen...

This code from Rich Heilman usea a Dock Container and the CL_GUI_TEXTEDIT control...Should give you a hint -:)


report zrich_0001 .
 
data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.
 
data: itext type table of tline-tdline,
      xtext type tline-tdline.
 
parameters: p_check.
 
at selection-screen output.
 
  repid = sy-repid.
 
  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft->dock_at_left
                        extension = 1070.
 
  create object text_editor
              exporting
                   parent     = dockingleft.
 
  xtext = 'http:\\www.sap.com'.
  append xtext to itext.
 
  call method text_editor->set_text_as_r3table
     exporting
           table              = itext
     exceptions
           others             = 1.
 
 
start-of-selection.
 
  call method text_editor->get_text_as_r3table
     importing
           table              = itext
     exceptions
           others             = 1.
 
  loop at itext into xtext.
    write:/ xtext.
  endloop.

Greetings,

Blag.