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 structure in selection screen

Former Member
0 Likes
1,134

Hi there ,

we have product hierarchical level for materials ........... we want that in selection screen for the Product hierarchy we get tree structure on F4 so that the user can select the level in which he is interested to spool the data for the report......

Please suggest me how we can do the same.....

Regards

Kaushik

3 REPLIES 3
Read only

ingo_barschow
Explorer
0 Likes
669

Implement a class which should do the following things:

create a CL_GUI_DIALOGBOX_CONTAINER

create a CL_GUI_ALV_TREE (or some other tree_control), referring to the dialogbox_container

modify the fieldcatalog for using hotspots / layouts etc

implement event-handler for hotspot, node_click, etc.

declare a public data-structure for the selected data.

...

any functionality for classes and the events of cl_gui_alv_tree is possible, also drag 'n drop and so on.

...

You have to define something like this in your report:

AT SELECTION-SCREEN
  ON VALUE-REQUEST FOR +your_fieldname+.
  SUPPRESS DIALOG.

...

  • Insert code to create an instance / call a method in your class

...

At F4 or click on the select-icon, the dialogboxcontainer will appear and shows your tree-control. The user is been able to select one (or some, depending on the value for sel_mode in the layout-structure).

Normally I use this construct for an alv_grid to implement user-define f4-helpscreens, it works very good.

Read only

Former Member
0 Likes
669

hi check this..

Read only

kaushik_choudhury2
Active Contributor
0 Likes
669

Hi there ,

Thanks a ton for suggesting me the resolution .....the gap is closed

Thanks & Regards

Kaushik