Tree based on class CL_GUI_COLUMN_TREE.

Hi,
i use a tree based on class CL_GUI_COLUMN_TREE.
Now i wish to adjust the column width of  the first hierarchy column. It doesnt work with method "ADJUST_COLUMN_WIDTH" because is it a hierarchy column.  Is there any other method? or how i must fill the "exporting" hierarchy_header when i create the object?
Stefan

I'm showing that I do this using the hierarch_header when creating the object in one of my programs.
data:  hierarchy_header type treev_hhdr.
* Setup the hierarchy header
    hierarchy_header-heading = 'Transactions'.
    hierarchy_header-width   = 30.    "<<--  Set the width
* Create a tree control
    create object tree
      exporting
        parent                = container
        node_selection_mode   = tree->node_sel_mode_single
        item_selection        = ' '
        hierarchy_column_name = 'Column1'
        hierarchy_header      = hierarchy_header       <<---  Right here
     exceptions
        others                      = 7.
Regards,
Rich Heilman

Similar Messages

  • Building Tree hierarchy Using nested loops and class cl_gui_column_tree

    Hello gurus,
    I want to create a tree report using custom container and class cl_gui_column_tree. I have read and understood the standard demo report which SAP has provided i.e. SAPCOLUMN_TREE_CONTROL_DEMO. But in this report all the levels nodes are created as constants and hardcoded. I want to create hierarchy using nested loops. For this i took one example of a hierarchy of VBAK-VBELN->VBAP-POSNR Like One sales order has many line items and each line item can have number of line items in billing plan.
    I have done some coding for it.
    FORM build_tree USING node_table TYPE treev_ntab
                                           item_table TYPE zitem_table.              " i created the zitem_table table type of mtreeitm in SE11.
      DATA: node TYPE treev_node,
                 item TYPE mtreeitm.
      node-node_key = root.
      CLEAR node-relatkey.
      CLEAR node-relatship.
      node-hidden = ' '.
      node-disabled = ' '.
      CLEAR node-n_image.
      CLEAR node-exp_image.
      node-isfolder = 'X'.
      node-expander = 'X'.
      APPEND node TO node_table.
      item-node_key = root.
      item-item_name = colm1.
      item-class = cl_gui_column_tree=>item_class_text.
      item-text = 'Root'.
      APPEND item TO item_table.
      item-node_key = root.
      item-item_name = colm2.
      item-class = cl_gui_column_tree=>item_class_text.
      item-text = 'Amount'.
      APPEND item TO item_table.
      LOOP AT it_vbeln INTO wa_vbeln.
        node-node_key = wa_vbeln-vbeln.
        node-relatkey = root.
        node-relatship = cl_gui_column_tree=>relat_last_child.
        node-hidden = ' '.
        node-disabled = ' '.
        CLEAR node-n_image.
        CLEAR node-exp_image.
        node-isfolder = 'X'.
        node-expander = 'X'.
        APPEND node TO node_table.
        item-node_key = wa_vbeln-vbeln.
        item-item_name = colm1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_vbeln-vbeln.
        APPEND item TO item_table.
        item-node_key = wa_vbeln-vbeln.
        item-item_name = colm2.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_vbeln-netwr.
        APPEND item TO item_table.
        LOOP AT it_posnr INTO wa_posnr.
        node-node_key = wa_posnr-posnr.
        node-relatkey = wa_vbeln-vbeln.
        node-relatship = cl_gui_column_tree=>relat_last_child.
        node-hidden = ' '.
        node-disabled = ' '.
        CLEAR node-n_image.
        CLEAR node-exp_image.
        node-isfolder = ' '.
        node-expander = ' '.
        APPEND node TO node_table.
        item-node_key = wa_posnr-posnr.
        item-item_name = colm1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_posnr-posnr.
        APPEND item TO item_table.
        item-node_key = wa_posnr-posnr.
        item-item_name = colm2.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_posnr-netpr.
        APPEND item TO item_table.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.
    Now this program compiles fine and runs till there is only one level. That is root->vbeln. But when i add one more loop of it_posnr it gives me runtime error of message type 'X'. The problem i found was uniqueness of item-item_name as all the sales order have posnr = 0010. What could be done? I tried giving item_name unique hierarchy level using counters just like stufe field in prps eg. 10.10.10, 10.10.20,10.20.10,10.20.20,20.10.10 etc.. etc.. but still i am getting runtime error when i add one more hierarchy using nested loop. Plz guide.
    Edited by: Yayati6260 on Jul 14, 2011 7:25 AM

    Hello all,
    Thanks the issue is solved. The node key was not getting a unique identification as nodekey. I resolved the issue by generating unique identification for each level. Thanks all,
    Regards
    Yayati Ekbote

  • How to create dynamic tree based on BAPI

    Hi
    I am able to create dynamic tree based on flat file structure example given in SDN . But how to create the tree from BAPI directly.Also when I will be clicking on any leaf node of the tree some data related to the node will be passed to another view.
    Regards
    Ananda

    What i'm trying to do is create an organizational structure.
    Global>Region>Plant-->Corporation
    The output from the RFC is a structure containing every possible combination for orgazational hierarchy. Basically a flat table with record for every possible combinaton of Region-Plant-Corporation. This data needs to be bound to a tree structure so that we can call BW queries based on that level. For example: Give me aged inventory for the SAP corporation within the plant Berlin that is located in the Europe region.
    Now that you understand the business reason will the nodes that represent Region and Plant and corporation be non-singleton nodes or recursive? I was thinking a hierarchy of non-singleton nodes.
    I can bind these nodes to the Region - Plant - Corporation elements returned from in the flat table structure. I will probably get duplicates as a specific Region will be listed multiple times for every possible combination of the data beneath it. I'm not so concerned about that right now as I want to make sure I understand how in Web Dynpro to bind the data to the tree.
    Hopefully this makes some sense. Can you elaborate on how this may be constructed in context of the view?
    Would i create a model node for region (0..n), model node for plant (0..n), and a model node for Corporation (0..n)?
    Or does this sound totally incorrect?
    julian
    We have 3 regions over 50 plants and probably around 500 corporations.

  • Tree based on XML DB files

    Has someone ever tried to build a tree based on XML DB files?
    Regards,
    Learco

    Hello,
    Yeah I've done that before, I basically was getting XML exports and was running them against one of 3 XSLT's , users choice , and one was a tree. I'll dig up the code.
    Or are you talking about building a tree based on all the files in XMLDB to navigate around them, I have a start on that I can give you as well, never finished it though.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Select Functional Location based on Class

    Hi,
    In a query, I need to select the functional locations (TPLNR) based on class (KLASSE_D) and Functional Location Category(FLTYP) which are defaulted on the selection screen. FLTYP = 'G' and LKASSE_D = 'GT_RETOB'  are the values always defaulted on the selection screen.
    I was hoping to select the data from table IFLOT based on FLTYP and filter it by class later. In PROD system, we have about  7 million records in IFLOT where FLTYP = 'G'.
    Can anybody know a better way to select the data based on these 2 conditions?
    Thanks.

    Hi,
    Normally the way I check for tables is as below,
    Go to the screen or transaction to know the tables then on top menu System select option status
    2. You will get pop-up, select Program screen double click, it will open ABAP editor,
    3. Here on Menu utlities select Display Object List or (CtrlShiftF5) will take you to another screen where on left you can see menu for all the Function modules, Dictionary structures etc. Normally we can find related tables from Dictionary structures.
    For getting exact tables it is always trial and error method. Pass some available data and check what are the required fields how to get dependent entries etc.
    Hope it help's.
    Regards,
    N.Nagaraju
    Edited by: NAGARAJU NANDIPATI on Jan 28, 2011 10:35 AM

  • Function module for Materials based on class type

    Hi ,
    Can any one suggest me how to find out Materisl based on class type any standard SAP Function module or BAPI avilable for the same?
    Regards,
    Raghu.

    hi,
    Check with one of the FM in the list.
    BAPI_MATERIAL_MAINTAINDATA_RT  Create and change material master data (reta
    BAPI_MATERIAL_DELETE                Flag Material for Deletion
    BAPI_MATERIAL_DISPLAY               Display Material
    BAPI_MATERIAL_EDIT                      Change Material
    BAPI_RETAILMATERIAL_CREATE     Create Material
    BAPI_RETAILMATERIAL_DELETE     Discontinue Material
    BAPI_STANDARDMATERIAL_CREATE   Create/Extend Material
    BAPI_MATERIAL_SAVEREPLICA       BAPI for Mass Maintenance of Material Data
    BAPI_MATERIAL_SAVEDATA          Create and Change Material Master Data
    Thanks
    sharath

  • BC based on class CSSBCVExtern and data type

    Hi all,
    I'm working with siebel 8.1.1.5 and i've the following problem.
    I've have a BC based on class CSSBCVExtern (get data from a web service by a business service defined into bus comp user prop Service Name) with all field defined type DTYPE_TEXT. The customer required some field with type DTYPE_CURRENCY (because the values are some king of amount for you're business) with total required true for automatic calculation (with applet based on applet web template Applet List Totals (Base/EditList), standard interactivity).
    The problem is that if i put type DTYPE_CURRENCY on this fields when the field are viewed on applet the application respond with a SSA NOTOK error and if i put type DTYPE_TEXT the automatic calculated total is truncated to integer (removing the decimal information).
    Anyone have an alternative solution or a workaround?
    Thanks a lot,
    Alessandro

    Hi Jagadeesh,
    thanks for your suggestion.
    I don't understand what do you mean with 'at table level' because is a virtual BC but I tryed with DTYPE_INTEGER, DTYPE_NUMBER, DTYPE_CURRENCY always with precision 22 and scale 7.
    Only With the combination DTYPE_CURRENCY and precision 22, scale 7 the applet list column show the decimal number.
    Unfortunatly always 00, so the number 2130,25 is viewed 2130,00.
    I have also tryed to setting the Display Format to #,###.#0 at List Column level unsuccesflully (2130,25 become 2130,0).
    Regards,
    Alessandro

  • Hierarchical tree based on columns in the same row

    Hi guys,
    I have the following table:
    TABLE A:
    COL1 COL2 COL3 COL4
    1 2 5 8
    1 2 6 9
    1 3 1 3
    1 4 2 4
    ... then, as I have ordered the info, I want to implement a tree based on every row of my table.
    Could you help me with the procedure please??
    Thanks.

    REPOST

  • How to create a tree based on directory structure

    I want to create a hierarchical tree in Forms 6i based upon a file system directory structure (similar to Windows Explorer). How can I populate a tree with this information, is there something that I can call or write that would return the file system structure in a format that I can populate my tree?
    Any advice would be greatly appreciated.
    Thanks
    Richard

    Your link does not seem to work.They're re-jigging all the links to accomodate the hot poop on Oracle's latest and greatest, 10G. So at least the website is on schedule even if the actual software delivery dates have slipped :P
    We can still get D2KWUTIL from here: http://te chnet.oracle.com/software/products/forms/content.html
    Cheers, APC

  • Sort Icon/option in ALV tree repot using classes and methods

    Hi all,
    I have done an alv tree report using the class cl_gui_alv_tree
    and i need to let users re-sort the report by using a sort icon(as visible in a normal alv report).Is there any possibility to create an icon and set the functionality such that the entire tree structure gets resorted depending upon the sort criteria?Please give me an example of doing so if there is an option.

    if u want without classes then i can  give an example of Sort Icon/option.
    example:-
    DATA:   wa_sortinfo TYPE slis_sortinfo_alv.
           i_sortcat TYPE slis_t_sortinfo_alv.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program     = report_id
                i_grid_title           = ws_title
               i_callback_top_of_page = 'TOP-OF-PAGE'
                is_layout              = wa_layout
                it_fieldcat            = i_fieldcat[]
                it_sort                = i_sortcat
                i_save                 = 'A'
                it_events              = i_events
           TABLES
                t_outtab               = i_reportdata1
           EXCEPTIONS
                program_error          = 1
                OTHERS                 = 2.
      IF sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      PERFORM sortcat_init CHANGING i_sortcat.
    FORM sortcat_init CHANGING i_sortcat TYPE slis_t_sortinfo_alv.
      CLEAR wa_sortinfo.
      wa_sortinfo-fieldname = 'EBELN'. (sales order)
      wa_sortinfo-tabname = 'I_REPORTDATA1'.
      wa_sortinfo-spos = 1.            " First sort by this field.
      wa_sortinfo-up = 'X'.            "   Ascending
      wa_sortinfo-subtot = 'X'.        " Subtotal at Name1
      APPEND wa_sortinfo TO i_sortcat.
      CLEAR wa_sortinfo.
      wa_sortinfo-fieldname = 'EBELP'.
      wa_sortinfo-tabname = 'I_REPORTDATA1'.
      wa_sortinfo-spos = 2.            " Sec sort by this field.
      wa_sortinfo-up = 'X'.            "   Ascending
      wa_sortinfo-subtot = 'X'.        " Subtotal at Name1
      APPEND wa_sortinfo TO i_sortcat.
    ENDFORM.                    " sortcat_init

  • Tree based on ViewObject with bindparams

    Hi,
    We have some pages that are tree-form based; the tree and the form and based on two different viewobject usages, but the same viewobject. This VO uses a bind parameter to limit the data. With JHeadstart we can provide this bindparameter with the group, but it seems that it generates a methodbinding and invokeaction only for the form and not for the tree and we have to add these after generation. Is there a way that we can generate these for both the tree and the form?
    Is this intended behaviour or can we request it as an enhancement?
    Fortunately in some cases can we use the same viewobjectusage for both the tree and the form and then it works out fine, but this is not possible for all the pages.
    Ciao
    Aino

    Aino,
    It is intended behavior, although I agree that we could apply the same bind params to the tree vo usage when it is based on the same VO. But a real solution is to add an additional group property: Tree Query Bind Parameters, as this also solves the case where the Tree Vo usage is based on a different VO. I have added this to the list of enhancements.
    Steven Davelaar,
    JHeadstart Team.

  • Get selected node of an adf tree in backing class

    hi,
    i am deploying an adf web application, i use jdeveloper 11g and a weblogic webserver.
    i have a bean family this bean contains a list of families and a parrentfamily object, so it is a rekursive relationship.
    i use the adf tree component to show all the families starting with the root family. works fine. only had to create a data controle of the bean and with dragndrop i create the adf tree.
    now i want to create a subfamily of any family shown in the tree, so i need the selected tree node in my backing bean (in a methode which is the action of my buttono) of the adf page.
    but iam unable to get the data.
    so my question i searched many times for:
    What is the best and easiest way to get the selection of an adf tree in the backing bean of the page?

    Hi,
    here's how you get the object itself, assuming your model is POJO based. Assuming "tree" is a variable pointing to a RichTree instance
    CollectionModel treeModel = (CollectionModel) tree.getValue();
    JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) treeModel.getWrappedData();
    RowKeySet rks = tree.getSelectedRowKeys();
    if(!rks.isEmpty()){
      List firstSet = (List)rks.iterator().next();
    JUCtrlHierNodeBinding node = treeBinding.findNodeByKeyPath(firstSet);
      DCDataRow rw = (DCDataRow) node.getRow();
      //get the object
    Object entity = rw.getDataProvider();       
    }                         Frank

  • Display the part of table tree based on input parameter

    Hi,
    I have the use case where I have to display the tree table based on the input parameter.This input parameter will display the displaying the node of tree which are under the given input node id.
    so If given node id is 10 then we should to display the node which are under 10.rest should not get displayed.
    Can you tell me how it can be achieved using ADF.
    I am using jdev 11.
    Thanks,
    Harsh

    This depends on how you apply the VC to the VO at runtime. Easiest way to accomplish this would be to create a VO in the data model of the application module which you edit in the data model to already having the vc applied to.
    In your region you can then drag the 'executeWithParameters' method onto the task flow and make it the default activity. Here you map the input parameter of hte task flow to the parameter needed for the executeWithParameter.
    For hte method you get a binding like
        <action IterBinding="EmployeesByNameIterator" id="ExecuteWithParams" RequiresUpdateModel="true" Action="executeWithParams">
          <NamedData NDName="bindLastName" NDValue="#{pageFlowScope.pname}" NDType="java.lang.String"/>
        </action>
    NDValue="#{pageFlowScope.pname}"
    is the inputParameter from the region (or task flow).
    Timo

  • Populating the tree based on the XML datasource

    We have a XML document that contains the required information regarding tree hierarchy.
    We would like to use this XML document as a datasource for the ADF tree/treeTable component.
    Can you please provide pointers for achieveing the same?
    Thanks in Advance,
    Navaneeth

    Two options are the URL Data Control: http://www.oracle.com/technetwork/developer-tools/jdev/urldatacontrol-099677.html
    or using JAXB with TopLink/EclipseLink to create Java objects that map to the XML and then exposing those as data controls.

  • Lead selection with a tree-based table.

    I've created a recursive context node to display contents of a KM folder.  The structure has been mapped to a table, which works just fine.  I can expand nodes of the tree and display the contents of sub-folders.  Great.  However, I need to know which backing KM object has been selected via the table.  Since this is a recursive structure, using
    wdContext.currentXXXX()
    does not work, since that's the top of the tree.  Parameter mapping will only give you the column and/or row of the item selected in the table, not the object itself.
    I'm missing something obvious here, but I can't figure out how to get the context element behind the selected row in a table which is displaying a recursive structure.
    I can do this with a Tree structure, since you can map the 'path' parameter to the actual context object.  However, the Table UI doesn't offset that information (a severe oversight, at least in my mind).
    Suggestions?

    Thanks Armin, that works great.
    Had I finished reading this page:
    http://help.sap.com/saphelp_nw70/helpdata/en/60/1f1f056f057d4d962375efd3c92ed0/frameset.htm
    I would have found the correct documentation.

Maybe you are looking for

  • Hi ,BAPI Needed to create sales order

    Hi, i want to create  a salesorder by giving quotation number as an input. whenever sales quotation is saved it should check for some conditions and finally it should automatically create the sales order of type ZMS without user intervention. Please

  • Small Business Server 2011 Essentials failed lock bios on LSI MegaRaid 9260 8i on Gateway GT350 F1

    I had SBS 2011 Essentials on my Gateway GT350 F1 server setup in LSI MegaRaid 9260 8i Raid 1. I bought 2 x 900gb sas drives to replace the 2 x 300gb i have. When i try to install SBS 2011 Essentials i get a error message saying failed bios lock this

  • Apps require Apple ID then crash?

    Every time I open an app, it asks me for my Apple ID. I type it in, then it just crashes. I can't open almost any of my apps, how can I fix this? P.S. I made sure all of my Apple ID info was correct in my settings and it still won't work.

  • Acrobat Reader DC

    I have downloaded the new version, but can't seem to find where to sign into the new version to us my subscription of EXportPDF ???

  • SQLJ classes (Will not insert result into table)

    /*@lineinfo:filename=SqljCircle*//*@lineinfo:user-code*//*@lineinfo:1^1*/import java.sql.SQLException ; import oracle.sqlj.runtime.Oracle; // iterator for the select /*@lineinfo:generated-code*//*@lineinfo:5^1*/ // SQLJ iterator declaration: class my