MDM Hierarchy Table Into Tree UI Control in ABAP WebDynpro & MDM ABAP APIs

Experts,
I am a newbie to ABAP / MDM ABAP APIs. I am looking into the possibility of using Tree as as a UI control in a webdynpro abap application to represent hierarchy tables, perform hierarchy / taxonomy search, create and update records involving hierarchy fields, using MDM ABAP APIs.
I would like to seek inputs to check whether and how, is it possible to use MDM ABAP APIs to:
1. To perform taxonomy search on material table
2. To Create material records in the main table involving taxonomy fields.
3. To search on main table records using taxonomy attribute values as search parameters.
4. To use Tree UI control with in WebDynPro ABAP, to peform above operations.
We intend to use function modules - service calls from within WebDynPro ABAP applications, hence would like to know the feasibility, actual build effort and complexity of function modules.
Inputs and advice on same will be highly appreciated and duly rewarded.
Regards,
Paras

1. To perform taxonomy search on material table - if material table is of type Taxonomy then possible
2. To Create material records in the main table involving taxonomy fields - possible . you create records in main table and assign value of field to that of taxonomy table entry
3. To search on main table records using taxonomy attribute values as search parameters. - possiblr
4. To use Tree UI control with in WebDynPro ABAP, to peform above operations. - yes possible
dont mix between hierarchy table and taxonomy table
they are diff in MDM , but it is possible to build UI with WD tree element for each of these types.
all that you said are supported in ABAP APIs
thanks
-Adrivit

Similar Messages

  • MDM Hierarchy Table Into Tree (Java WebDynpro)

    Hello all,
                I have a requirement of showing a MDM Hierarchy Table into Tree UI element.
    These are the steps am following:
    1) MDM Connectivity
    2) Using RetrieveLimitedHierTreeCommand command to retrieve tree structure of the table
    3) Using getChildren() method of each node to get the children
    4) Made a tree ui element with a recursive node
    Now since the Hierarchy table can reach any level of nodes how do i write code for dynamic tree node/leaf generation?
    Please guide me through with detailed steps/code if possible?
    Regards,
    Yogesh Bhatia

    Hi Yogesh,
    After getting the HierNode you have to recursively populate the hierarchy tree using the below code:
      private void createHierarchyTree( parent_element, com.sap.mdm.data.HierNode HierNode)
         if(HierNode != null && HierNode .getChildren() != null)
              for(int iChildCount=0 ; iChildCount < HierNode .getChildren().length ; iChildCount++)
                   IPublic<comp name>.Iparent_element objTreeElement = parent_element.node<Recursive node name>().create<name>Element();
                   objTreeElement.setattr1(HierNode.getChildren()[iChildCount].getDisplayValue());
                   objTreeElement.setattr1_Recid(HierNode.getChildren()[iChildCount].getId().id);
                   parent_element.node<Recursive node name>().addElement(objTreeElement);
    // call the method recursively               
    createHierarchyTree(objTreeElement, HierNode.getChildren()[iChildCount]);
    This will populate the tree, you need to create an action in the tree view and link it to TreeNode Type action property using which you can get the selected value.
    Hope this helps!!
    Cheers,
    Arafat

  • Editing Tree UI for MDM Hierarchy tables ina WDJ application

    Hi ,
    We have a requirement where MDM hierarchy tables are displayed using a tree UI in WDJ application.
    However, tree UI is used only for the display purpose. Is there anyway or any other UI available
    using which we can achive edit option in the tree as well?
    Not only this, we are supposed to provide functionality to support moves across the nodes of hierarchy.
    Like PC move or SBU move from one hierarchy to another.
    First of all, can we achive this in WDJ or MDM WebDynpro COnfigurator? If we can, then how? Any links or pointers for this?
    Thank You,
    Apoorva Dave

    You could use a Tree UI element together with a detail view for editing the selected tree node. Or you could use a "TreeTable" which is a Web Dynpro Table with a TreeByNestingTableColumn.

  • Editing tree ui for MDM hierarchy tables in a WDJ aplication

    Hi ,
    We have a requirement where MDM hierarchy tables are displayed using a tree UI in WDJ application.
    However, tree UI is used only for the display purpose. Is there anyway or any other UI available
    using which we can achive edit option in the tree as well?
    Not only this, we are supposed to provide functionality to support moves across the nodes of hierarchy.
    Like PC move or SBU move from one hierarchy to another.
    First of all, can we achive this in WDJ or MDM WebDynpro COnfigurator? If we can, then how? Any links or pointers for this?
    Thank You,
    Apoorva Dave

    i think u can use the method addNodeType (IWDAbstractTreeNodeType nodeType, int index) to add/edit an element at a particular index in the tree.
    but drag drop features i think are not supported in standard WD and u need to use a java script in the view to achieve this ?
    thanks
    -Adrivit

  • SAP Netweaver MDM Hierarchy Table Type

    Good Day         
    We need to implement an MDM solution using Hierarchy tables.
    Where can i find a good tutorial on how to use MDM hierarchy table??

    Hi,
    You can find in SAP help portal..just browse saying SAP MDM reference guides!!
    http://help.sap.com/saphelp_nwmdm71/helpdata/en/loio30bf76947bb64c48a2e835fda42c5183_30bf76947bb64c48a2e835fda42c5183/95/aff04a0aae4a3592fcb3e75869a90b/frameset.htm
    use SMP credentials
    Regards,
    Girish

  • How to retrieve the data from MDM hierarchy table using MDM Java API

    Hi,
    I had a hierarchy table in MDM. This table had some column say x. I want to retrieve the values of this x column and need to show them in a drop down using MDM Java API.
    Can anyone help me to solve this?
    Regards
    Vallabhaneni

    Hi,
    Here is your code...
    TableId Hier_TId = repository_schema.getTableId(<hierarchy table id>);
    java.util.List list = new ArrayList();
    ResultDefinition Supporting_result_dfn = null;
    FieldProperties[] Hier_Field_props =rep_schema.getTableSchema(Hier_TId).getFields();
    LookupFieldProperties lookup_field = null;
    TableSchema lookupTableSchema = null;
    FieldId[] lookupFieldIDs = null;
    for (int i = 0, j = Hier_Field_props.length; i < j; i++) {
    if (Hier_Field_props<i>.isLookup()) {     
                                  lookup_field = (LookupFieldProperties) Hier_Field_props<i>;
         lookupTableSchema =repository_schema.getTableSchema(lookup_field.getLookupTableId());
                                  lookupFieldIDs = lookupTableSchema.getFieldIds();
         Supporting_result_dfn = new ResultDefinition(lookup_field.getLookupTableId());
         Supporting_result_dfn.setSelectFields(lookupFieldIDs);
         list.add(Supporting_result_dfn);
    com.sap.mdm.search.Search hier_search =new com.sap.mdm.search.Search(Hier_TId);
    ResultDefinition Hier_Resultdfn =     new ResultDefinition(Hier_TId);
    Hier_Resultdfn.setSelectFields(rep_schema.getTableSchema(Hier_TId).getDisplayFieldIds());
    ResultDefinition[] supportingResultDefinitions =
    (ResultDefinition[])list.toArray(new ResultDefinition [ list.size() ]);
    RetrieveLimitedHierTreeCommand retrieve_Hier_tree_cmd =
    new RetrieveLimitedHierTreeCommand(conn_acc);
    retrieve_Hier_tree_cmd.setResultDefinition(Hier_Resultdfn);
    retrieve_Hier_tree_cmd.setSession(Auth_User_session_cmd.getSession());
    retrieve_Hier_tree_cmd.setSearch(hier_search);
    retrieve_Hier_tree_cmd.setSupportingResultDefinitions(supportingResultDefinitions);
    try {
         retrieve_Hier_tree_cmd.execute();
    } catch (CommandException e5) {
              // TODO Auto-generated catch block
              e5.printStackTrace();
    HierNode Hier_Node = retrieve_Hier_tree_cmd.getTree();
    print(Hier_Node,1);
    //method print()
    static private void print(HierNode node, int level) {
    if (!node.isRoot()) {
         for (int i = 0, j = level; i < j; i++) {
              System.out.print("\t");
         System.out.println(node.getDisplayValue());
    HierNode[] children = node.getChildren();
    if (children != null) {
              level++;
    for (int i = 0, j = children.length; i < j; i++) {
    print(children<i>, level);
    //end method print()
    Best regards,
    Arun prabhu S
    Edited by: Arun Prabhu Sivakumar on Jul 7, 2008 12:19 PM

  • Problem while populating RFC table into HTMLB tableView control

    Hi, We are trying to populate some data from R/3 into the front end. For this we are using tableView control in HTMLB. But the problem is, one particular field is behaving strangely where as all other fields are displayed correctly. This value is sometimes displayed correctly and sometimes not. The FM if executed at the back end is giving correct result always. In Java there is a single line code i.e. table.getString("FIELD_NAME_IN_RFC");. Please guide us to find out the problem if somebody has already faced this before.

    Hi, We are trying to populate some data from R/3 into the front end. For this we are using tableView control in HTMLB. But the problem is, one particular field is behaving strangely where as all other fields are displayed correctly. This value is sometimes displayed correctly and sometimes not. The FM if executed at the back end is giving correct result always. In Java there is a single line code i.e. table.getString("FIELD_NAME_IN_RFC");. Please guide us to find out the problem if somebody has already faced this before.

  • Develop MDM Heirarchy table using Webdynpro Tree

    Hi
    Can anyone let me know how i can build a MDM Heirarchy table using webdynpro tree.
    Thanks

    Can you be more specific? Is your problem with MDM or Web Dynpro? And what do you mean by "build an MDM Hierarchy Table"?
    Walter

  • Can we import multiple language descriptions in Hierarchy tables of MDM

    Hello Experts,
    I am using MDM 7.1 SPS4 and working on the Vendor Repository standard content.
    My source file of Regions table contains data in multiple languages for each region record. All the required destination language fields have been mapped properly in the standard map. Import action is set to 'Create' for new records and 'Update Mapped only fileds' for existing records. Matching criteria has Name<English> filed defined in it.
    However, after importing these hierarchy records, in data manager only the Name description of English is populated while all other language descriptions for the same record is shown in Red (i.e not populated with the expected data).
    Is this a limitation of MDM itself or am I missing some setting?
    Thanks in advance,
    Elizabeth.

    Hi Elizabeth,
    steps for importing  into hierarchy tables
    To add new multilingual records:
    1 If necessary, create the hierarchy from the current language layer Name field that contains the hierarchy information (e.g. using the Split Hierarchy command).
    2Map the current language layer Name field and then Map/Add the entire set of hierarchy values.
    3 Map the other language layer Name field(s). No value mapping is necessary.
    4 Map the [Remote Key] field.
    5 Record match using: (a) the Name field; (b) the [Remote Key] field (if the Name field was not value mapped); or (c) the combination of both.
    To update the language layer of existing records:
    Map the other language layer Name field(s). No value mapping is necessary.
    Map the [Remote Key] field.
    Record match using the [Remote Key] field and set the import action to Update (All Mapped Fields).
    Just try and if you need any other info then please get back to me.
    Thanks,
    Sudhanshu

  • Update value from internal table into table control

    hi friends,
    i have two text field and a button in a screen.if give the value and click the button it should get updated in the table control which is in the next screen.plz
    help me with some sample coding.

    hi Karthik ,
    Here you go with the sample coding of moving internal table values to table control on module pool programs :
    in screen painter flow-logic ............
    process before output.
    module status_3000.
    loop at g_tab_con_01_itab
         into g_tab_con_01_wa
         with control tab_con
         cursor tab_con-current_line.
    module tab_con_move.
    endloop.
    process after input.
    module exit at exit-command.
    module user_command_3000.
    module clear_ok_code.
    loop at g_tab_con_01_itab.
    module read_tab_con.
    endloop.
    in your program .............
    include z_tab_ctrl_top                          .    " global Data
    program  z_tab_ctrl.
    tables : sflight,sbook,zsflight.
    types:begin of t_tab_con_01 ,
            carrid like sflight-carrid,
            connid like sflight-connid,
            sel type c,
           end of t_tab_con_01.
    data: g_tab_con_01_itab type  t_tab_con_01 occurs 0 with header line,
          g_tab_con_01_wa type t_tab_con_01,
          g_tab_con_01_copied ,
          g_tab_con_01_lines like sy-loopc,
          ok_code like sy-ucomm,
          lines type i,
          init ,
          fill type i.
    controls: tab_con type tableview using screen 3000.
    module status_3000 output.
      set pf-status 'ST100'.
      set titlebar 'T100'.
    endmodule. 
    module update_table_control input.
      describe table g_tab_con_01_itab lines tab_con-lines.
    endmodule.  
    module exit input.
      ok_code = sy-ucomm.
      if ok_code eq 'BACK' or ok_code eq 'EXIT' or ok_code eq 'CANCEL'.
        leave program .
      endif.
    endmodule.        
    module clear_ok_code input.
    clear ok_code.
    endmodule.      
    module fill_tab_con output.
    read table g_tab_con_01_itab into zsflight index tab_con-current_line.
    endmodule.                 " fill_tab_con  OUTPUT
    module read_tab_con input.
    *lines = sy-loopc.
    read table g_tab_con_01_itab into g_tab_con_01_wa index tab_con-current_line.
    if sy-subrc eq 0.
    move-corresponding sflight to g_tab_con_01_wa.
    modify g_tab_con_01_itab from g_tab_con_01_wa index tab_con-current_line.
    else.
    move-corresponding sflight to g_tab_con_01_wa.
    append g_tab_con_01_wa to g_tab_con_01_itab.
    endif.
    module tab_con_move output.
    move-corresponding g_tab_con_01_wa to sflight.
    endmodule.                 " tab_con_move  OUTPUT
    module tab_con_get_lines output.
    g_tab_con_01_lines = sy-loopc.
    endmodule.                 " tab_con_get_lines  OUTPUT
    module tab_con_modify input.
    move-corresponding sflight to g_tab_con_01_wa.
      modify g_tab_con_01_itab
          from g_tab_con_01_wa
          index tab_con-current_line.
    endmodule.                 " tab_con_modify  INPUT
    module populate_tab_ctrl input.
    if sy-subrc eq 0.
    endif.
    endmodule.
    Look at the following modules in the above program ....
    fill_tab_con
    tab_con_modify
    tab_con_get_lines
    update_table_control
    This will definately solve your problem or give an idea for solution ....
    reward if helpful,
    Regards,
    Ranjita

  • Tree view control - populating speed - over 100 nodes

    I have a few questions about a tree view control:
    1. If you put more than approximately 100 nodes in a tree, it populates too slow. There is no change if you try with query or record group. I figured that the populating of the record group makes all problems, but there is no chance to enlarge the array siye of the record group. Developer 6 has some built-ins which can do that, bu after many unsuccesful tries I don't see a solution.
    I tried to make fetches from cursor into a record group (30 nodes on a "page", but it looses a real hierarchy and you should do a lot of programming). If anybody knows how to make the population of the tree faster or have some template / please forward.
    2. After we put the patch 5 of developer6, tree view control is totally unpredictable. Usually its when you programmaticaly try to select a node (ftree.set_tree_selection)...Anybody have the same problems?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Natasa Stojovska ([email protected]):
    I have a few questions about a tree view control:
    1. If you put more than approximately 100 nodes in a tree, it populates too slow. There is no change if you try with query or record group. I figured that the populating of the record group makes all problems, but there is no chance to enlarge the array siye of the record group. Developer 6 has some built-ins which can do that, bu after many unsuccesful tries I don't see a solution.
    I tried to make fetches from cursor into a record group (30 nodes on a "page", but it looses a real hierarchy and you should do a lot of programming). If anybody knows how to make the population of the tree faster or have some template / please forward.
    <HR></BLOCKQUOTE>
    Try taking out the 'start with' and 'connect by' clauses in your select statement if you're using them. However, this will mean that you will have to determine the levels of the tree manually and ensure that the data comes out in the same order each time you execute the select statement.
    null

  • Tree view control print

    Hi all
          I want to set a print option for the tree view control along with back,exit etc options.please help me to do this.
    Thanks in regards
    Regards
    Giri

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Natasa Stojovska ([email protected]):
    I have a few questions about a tree view control:
    1. If you put more than approximately 100 nodes in a tree, it populates too slow. There is no change if you try with query or record group. I figured that the populating of the record group makes all problems, but there is no chance to enlarge the array siye of the record group. Developer 6 has some built-ins which can do that, bu after many unsuccesful tries I don't see a solution.
    I tried to make fetches from cursor into a record group (30 nodes on a "page", but it looses a real hierarchy and you should do a lot of programming). If anybody knows how to make the population of the tree faster or have some template / please forward.
    <HR></BLOCKQUOTE>
    Try taking out the 'start with' and 'connect by' clauses in your select statement if you're using them. However, this will mean that you will have to determine the levels of the tree manually and ensure that the data comes out in the same order each time you execute the select statement.
    null

  • Hierarchy Table - Parent/Child Value Pairs w/o Node Name

    Hi,
      Has any body worked with below senario to create a Hierarchy table through Import Manager. If so how did you do it? I followed and sucessfull with some senario's by refering the blog "MDM Import Manager: handling multiple formats of source data for hierarchy" by pandey but not with this one. This scenair is actually from help.sap.com
    Parent           Category
               Printers
    Printers      Laser
    Printers      Inkjet
    Inkjet           B&W
    Inkjet           Color
    Printers      Dot Matrix
    Dot Matrix      300 DPI
    Dot Matrix      600 DPI
    Dot Matrix      1200 DPI
    Edited by: SDN POWERED on Jun 7, 2009 8:59 PM

    Hi SDN Powered,
    For Hierarchy Table - Parent/Child Value Pairs w/o Node Name just do as follows:
    1) In the Source Hierarchy tree, select the Parent and Child field nodes which you want to use to build hierarchy.
    2) Right-click on one of the nodes and choose Create Hierarchy Field from the context menu, or choose Source > Create Hierarchy Field from the main menu.
    3) MDM opens the Create Hierarchy Field dialog box. This dialog box contains 4 feilds, viz Hierarchy Field Name, Parent Field, Child Field, and Node Name Field. In the Hierarchy Field Name, type the name for the new field.In the Parent Field, Child Field. For Parent/Child Value Pairs w/o Node Name , set the Node Name Field to None.
    4) Click OK to close the Create Hierarchy Field dialog box. The MDM Import Manager creates Hierarchy using the values you have provided.
    I hope I am able to solve your problem.
    Thanks & Regards
    Dilmit Chadha

  • Importing Hierarchy table in hierarcy struture, How?

    hi friends
    i am trying to import soure file(Acces), which contains three fields which contain data as shown below
    they are
        field1                                     field2                                   field3
                                                     10                                    Products
           10                                     1001                              Bateries,Power & Surge
          1001                                 100101                             Alkaline Batteries
          1001                                  100102                          Battery Backups
            10                                      1002                             Calculators & POS
          1002                                100201                        Basic-Display Calculators
          1002                                  100202                               Cash Registers
            20                                     20                                        Services
             20                                    2001                               Access & Security
            2001                           200101             Acccess Request-Application or Site
            2001                             200102                        Access Request-Chat/IM
    Now i want to convert this fields in to hierarch struture and i want to import this into hierarchy table which contain two fields(i.e.field1 and field2), in the data manager
    My problem is
    1) i want to import the data in the corresponding fields
    2) at the same time after importing, i want the data of the this fields should appear as a parent child relationship in the data manager.
    if any one know the solution for this , please explain in step by step process.
    if you have any PDF's on every Import operation in the MDM please provide to me.
    It  will be greatful for me.
    Thanks in Advance.......
    bharat.chinthapatla

    Hi bharat,
    if your source data is like this ex:
    1. Consumables & Maintenance Solutions;Cleaning, Freshening &  Softening;Cleaners;Cleaner Compounds
    2. Hand, Power, Machine, & Measuring Tools;Assembly & Fastening;Wrenches;Manual Wrenches;Manual Wrench Parts & Accessories
    you can follow this process:
    1. select the category and right click, in the context menu set the split delimeter, in that choose split hierarchy.
    2. select the category and right click, from the context menu select split into hierarchy.
    3. In Map fields/values tab, in source fields you will see new split hierachy field, map this field to corresponding destination cateory field.
    4. in values pane, you can see the source values in a hierarchy.
    5. Map these values to the corresponding destination values, other wise you can add to the destination in a new category, ( select the source values node and click on add button and you can selcect Add branch as child Or Add branch as sibling)
    6. Once value mapping is over, do the importing and you can see these results in Data manager Taxonomy mode.
    as you said: you have data like field1 field 2 field 3
    You have to select all the fields in Import Manager which u need to hierarchies and select the option “ Create Hierarchy field ”. You will see a new popup window in which you have to fill  the fields like ( parent field/ child filed and node) and your hierarchy will be created.
    hope this may help You,
    Regards,
    srinivas

  • Displaying icons in tree view control

    Hi all
            i am trying to display  icons in my tree view control.I am using beow code but i am not getting the ouput.Please help me.
    Type-pools : fibs,stree , ICON.
    data : t_node type snodetext.
    data : node_tab like t_node occurs 0 with header line,
           it_icon_id type icon-id.
    clear : node_tab, node_tab[].
    select single id from icon into it_icon_id
           where name = 'ICON_CUSTOMER'.
    node_tab-type = 'T'.
    node_tab-name = 'Earth'.
    node_tab-tlevel = '01'.
    node_tab-nlength = '5'.
    node_tab-color = '4'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 3.
    node_tab-NODEICON = it_icon_id.
    append node_tab.
    clear node_tab.
    node_tab-type = 'P'.
    node_tab-name = 'Europe'.
    node_tab-tlevel = '02'.
    node_tab-nlength = '6'.
    node_tab-color = '1'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 4.
    node_tab-NODEICON = it_icon_id.
    append node_tab.
    clear node_tab.
    CALL FUNCTION 'RS_TREE_CONSTRUCT'
    EXPORTING
      INSERT_ID                = '000000'
      RELATIONSHIP             = ' '
      LOG                      =
      TABLES
        NODETAB                  = node_tab
    EXCEPTIONS
      TREE_FAILURE             = 1
      ID_NOT_FOUND             = 2
      WRONG_RELATIONSHIP       = 3
      OTHERS                   = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      DATA: type_mapping TYPE stree_ctl_type_mapping_tab.
      DATA: wa_type TYPE stree_ctl_type_mapping.
      CLEAR: type_mapping[].
        wa_type-type = 'A'.
        wa_type-icon = '@A0@'.
        APPEND wa_type TO type_mapping.
    CALL FUNCTION 'RS_TREE_CONTROL_PREPARE'
    EXPORTING
        CONTROL_PATTERN             = 'PH'
        MULTIPLE_SELECTION          = 'X'
         TYPE_MAPPING                = type_mapping.
    CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
    EXPORTING
    LAYOUT_MODE                     = ' '
      USE_CONTROL                     = STREE_USE_LIST.
    Thank you.
    Regards
    Giri.

    Here is another option using <ICON> include,
    *& Report  ZKB_TREE_EXAMPLE
    REPORT  zkb_tree_example.
    INCLUDE <icon>.
    TYPES: BEGIN OF t_sbook,
            customid TYPE sbook-customid,
            fldate TYPE sbook-fldate,
            bookid TYPE sbook-bookid,
          END OF t_sbook.
    DATA: i_sbook TYPE TABLE OF t_sbook,
          w_sbook TYPE t_sbook.
    SELECT-OPTIONS: s_custid FOR w_sbook-customid.
    DATA: o_custom_container  TYPE REF TO cl_gui_custom_container,
          o_tree              TYPE REF TO cl_gui_simple_tree.
    TYPES: t_node_table LIKE TABLE OF trstree.
    DATA: i_node TYPE t_node_table,
          w_node TYPE LINE OF t_node_table.
    START-OF-SELECTION.
      CALL SCREEN 9000.
    *&      Module  status_9000  OUTPUT
          text
    MODULE status_9000 OUTPUT.
      SET PF-STATUS '9000'.
    ENDMODULE.                 " status_9000  OUTPUT
    *&      Module  user_command_9000  INPUT
          text
    MODULE user_command_9000 INPUT.
      CASE sy-ucomm .
        WHEN 'BACK' OR 'EXIT'.
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.
    ENDMODULE.                 " user_command_9000  INPUT
    *&      Module  init_9000  OUTPUT
          text
    MODULE init_9000 OUTPUT.
      DATA: lw_sbook TYPE t_sbook.
      SELECT customid fldate bookid FROM sbook
             INTO TABLE i_sbook WHERE customid IN s_custid.
      SORT i_sbook BY customid ASCENDING.
      CREATE OBJECT o_custom_container
           EXPORTING
                container_name              = 'TREE'
           EXCEPTIONS
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
      IF sy-subrc <> 0.
        MESSAGE 'Error Creating Container' TYPE 'E'.
      ENDIF.
      CREATE OBJECT o_tree
           EXPORTING
               parent                      = o_custom_container
               node_selection_mode         =
                                 cl_gui_simple_tree=>node_sel_mode_single
           EXCEPTIONS
               lifetime_error              = 1
               cntl_system_error           = 2
               create_error                = 3
               failed                      = 4
               illegal_node_selection_mode = 5.
      IF sy-subrc <> 0.
        MESSAGE 'Error Creating Tree' TYPE 'E'.
      ENDIF.
    Add ROOT Folder
      CLEAR w_node.
      w_node-node_key  = 'ROOT'.
      w_node-text      = 'Root'.
      w_node-isfolder  = 'X'.
      APPEND w_node TO i_node.
      CLEAR lw_sbook .
      LOOP AT  i_sbook INTO w_sbook.
        IF lw_sbook-customid NE w_sbook-customid.
          lw_sbook-customid = w_sbook-customid.
          CLEAR w_node.
          w_node-node_key  = w_sbook-customid.
          w_node-text      = w_sbook-customid.
          w_node-relatkey  = 'ROOT'.
          w_node-relatship = cl_gui_simple_tree=>relat_last_child.
          w_node-isfolder  = 'X'.
          APPEND w_node TO i_node.
        ENDIF.
        CLEAR w_node.
        w_node-node_key  = w_sbook-bookid.
        w_node-relatkey  = w_sbook-customid.
        w_node-relatship = cl_gui_simple_tree=>relat_last_child.
        w_node-text      = w_sbook-bookid.
    <b>    w_node-n_image = icon_customer.</b>
        APPEND w_node TO i_node.
      ENDLOOP.
      CALL METHOD o_tree->add_nodes
        EXPORTING
          table_structure_name           = 'TRSTREE'
          node_table                     = i_node
        EXCEPTIONS
          failed                         = 1
          error_in_node_table            = 2
          dp_error                       = 3
          table_structure_name_not_found = 4
          OTHERS                         = 5.
      IF sy-subrc <> 0.
        MESSAGE 'Error Adding Node to Tree' TYPE 'E'.
      ENDIF.
    Expand tree
      CALL METHOD o_tree->expand_root_nodes
        EXPORTING
          level_count    = 2
          expand_subtree = ' '
        EXCEPTIONS
          OTHERS         = 1.
      IF sy-subrc <> 0.
        MESSAGE 'Error Expanding Tree' TYPE 'E'.
      ENDIF.
    ENDMODULE.                 " init_9000  OUTPUT
    Regards
    Kathirvel

Maybe you are looking for

  • Problems exporting OMF from FCP 6

    I've been trying to export an omf of a 40 min dvcprohd sequence to hand off to my sound mixer. He needs the omf with handles of at least 20 seconds. When I try to export it I get the message telling me that the file will exceed 2GB and is not support

  • How can I hide the por:8080 on the broswer

    http://www.mydotcom.com:8080/examples/.....jsp How can I hide the port 8080, cause this is what shows on the URL. thanks

  • GarageBand already downloaded, Mac App Store asking me to pay for it again!

    I have a 2008 model of the iMac. It started out on Snow Leopard and came with an iLife '09 disc which had GarageBand. It is now running OS X Yosemite and I have updated all of my iLife apps except for GarageBand. I wanted to update it from the Mac Ap

  • How to load dynamic text inside a movie clip?

    hello all - i have a main stage where on the first frame my "home" movie clip displays. i did this by dragging/dropping, and then i put a stop action. all works fine. inside this home movie clip on the main stage, there are links to other movie clips

  • Illustrator Colour Management Bug

    Hello, When I load in a CSF in illustrator CS 5.5 whose "CMYK profile" is not installed on a Mac, Illustrator Changes the CMYK profile to something else without changing the "settings" pull down menu to "custom...". When i do the same in InDesign & P