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: 

splitter control

Former Member
0 Kudos

Hi

when i double click or choose a fcode i woul dlike to go to a screen which is similar to the tree structure in se80.

the left side should show all the handling units in hierarchy nad depending on which we select i should be able to see teh w/vol details of that handling unit on the right hand side.

how do i go about designing this.

do i create a new screen first with the fields on the right hand side which are common to any Hu selected on the left hand side?

can i create that left hand split screen in the screen painter ? or do i have to call some methods in the PBO logic of that screen?

please suggest...thanks a lot...

6 REPLIES 6

Former Member
0 Kudos

Karunya,

You should be able to this using a SPLITTER container and then use the TREE controls and GRID controls.

Create a SCREEN and place CUSTOM control on the screen. In the control, place splitter container and split it vertically. Use the left half for your TREE and the right for your GRID that will display the details of the node that you have selected on the left side. If you don't want a grid, then you can directly use a DOCKING container, dock it to the left, create the TREE control in there and then you can use the screen for whatever you want to have.

Regards,

Ravi

Note : If this helps you, please reward points.

0 Kudos

how do i place splitter and split it vertically in the screen painter after placing the custom control.

can i do it in screen painter or do i have to code in the program to do this.

thanks

0 Kudos

you dont do that in screen painter, you have to code it. check the sample programs given.

Regards

Raja

Former Member

Former Member
0 Kudos

Hi

You can create a dynpro with only one element a subarea in this subarea you'll load the subscreen that'll show the details. TO show a tree use a DOCKCONTAINER:

DATA: my_docking TYPE REF TO cl_gui_docking_container,

g_tree TYPE REF TO cl_gui_list_tree.

CALL SCREEN 100.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_9000.

MODULE initialization.

CALL SUBSCREEN subscreen INCLUDING sy-repid sub_screen.

*

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_9000.

CALL SUBSCREEN subscreen.

module flush.

CHECK dynnr IS INITIAL.

  • Parametri per subscreen

sub_screen = '9001'.

  • Creazione dockin container

program = sy-repid.

dynnr = sy-dynnr.

CREATE OBJECT my_docking

EXPORTING repid = program

dynnr = dynnr

side = my_docking->dock_at_left

extension = 300.

  • create a tree control

CREATE OBJECT g_tree

EXPORTING

parent = my_docking

node_selection_mode = cl_gui_list_tree=>node_sel_mode_single

item_selection = 'X'

with_headers = ' '

EXCEPTIONS

cntl_system_error = 1

create_error = 2

failed = 3

illegal_node_selection_mode = 4

lifetime_error = 5.

PERFORM build_node_table USING node_table item_table.

CALL METHOD g_tree->add_nodes_and_items

EXPORTING

node_table = node_table

item_table = item_table

item_table_structure_name = 'MTREEITM'

EXCEPTIONS

failed = 1

cntl_system_error = 3

error_in_tables = 4

dp_error = 5

table_structure_name_not_found = 6.

ENDMODULE.

Then by the event for doubleclick you can change the subscreen.

See SAPTLIST_TREE_CONTROL_DEMO for more details

Max