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: 

Simple Tree using custom container

Former Member
0 Kudos

Hi all,

I am facing a problem, I am preparing a simple tree in a custom container of using two table such as mchb and mska, from these table i am selecting fields wearks ,matrn ,veblen, quantity , lgort (storage location) and made a internal table, for using this fields I sorted three times with werks for plant than storage location for those plant which was sorted than material comes for all sorted plant and storage location ,for all sorting I made node for all i was using CONCATENATE command using index take all values of sorting make local index for all sorting, now i want to make when i double-click on material i want all field come in my tablecontrol which is there and than I want a pop-up window comes for further processing.

plese help me.

Ankur Garg.

3 REPLIES 3

Former Member
0 Kudos

Hi

You can create a class to manage the event of tree (see the event for double clic: NODE_DOUBLE_CLICK).

Max

former_member927251
Active Contributor
0 Kudos

Hi Ankur,

Refer the standard program SAPSIMPLE_TREE_CONTROL_DEMO in SE38.

Refer the following code in the include SIMPLE_TREE_CONTROL_DEMOCL1.

CLASS LCL_APPLICATION DEFINITION.

  PUBLIC SECTION.
    METHODS:
      HANDLE_NODE_DOUBLE_CLICK
        FOR EVENT NODE_DOUBLE_CLICK
        OF CL_GUI_SIMPLE_TREE
        IMPORTING NODE_KEY,
      HANDLE_EXPAND_NO_CHILDREN
        FOR EVENT EXPAND_NO_CHILDREN
        OF CL_GUI_SIMPLE_TREE
        IMPORTING NODE_KEY.
ENDCLASS.

CLASS LCL_APPLICATION IMPLEMENTATION.

  METHOD  HANDLE_NODE_DOUBLE_CLICK.
    " this method handles the node double click event of the tree
                                       " control instance

    " show the key of the double clicked node in a dynpro field
    G_EVENT = 'NODE_DOUBLE_CLICK'.
    G_NODE_KEY = NODE_KEY.
  ENDMETHOD.

<b>Reward points if it helps.</b>

Message was edited by: Amit Mishra

0 Kudos

I create my local class before sensing my problem ,because I am getting data when i take fields of my internal table on that screen on double click event, but i have problem when i create table control on that screen the values not come in table control instead of field form get programs please help me.

Ankur Garg.