How to scroll to a specific node in the webdynpro tree

Hi all,
I'm developing an application where I need to load and expand a tree upon some action in another view.
Loading the children, expanding nodes and setting a new lead selection (with cl_wd_dynamic_tool=>set_tree_lead_selection) all works fine.
But I did not find a way to scroll the tree, so that the node is in the currently visible area of the tree. Is there a way to do this?
Thanks for your answers!
Best regards,
  Frank

Tree is a particular structure, you need to realize a recursive function, specially if the tree with is a recursive TreeNode.
this is a quickly answer, i did this in java.
The idea is the same everywhere, this is an ABAP-LIKE solution, understand and translate in a good ABAP source.
FUNCTION FindNode(TypeNode tree_node, TypeNode node_to_find ).
IF ( tree_node.ELEMENT_ID EQ node_to_find.ELEMENT_ID ).
"""""""    do what you wanna do  """""
ELSE.
  n = tree_node.GET_NUMBERS_OF_CHILDS;
  """"""""" RECURSION
  FOR i = 0 TO n.
    child_node = tree_node.GET_CHILD(i).
    CALLFUNCTION FindNode(child_node, node_to_find ).
  ENDFOR.
ENDIF.
ENDFUNCTION.

Similar Messages

  • How to address message to the specific node of the ESB cluster

    Hi!
    We are running ESB on two node active-active cluster configuration. We use custom adapter to communicate with customer legacy system over Socket connection. The point is, that we need to transfer large amount of data from our database into customer system using one open socket connection. Because of memory limitation we had to split data into multiple messages in ESB. This socket connection can be open from any of the active cluster node, but ones it's open all messages must be send within the node which had open the connection.So, the messages should not arrive into another node. The question: How is it possible to address (route) ESB messages into specific node of the cluster?
    Thanks in advance.
    Jaro,

    Muthu92 wrote:
    Thank you for your reply. It is very useful for me.  But i can't give conditional operator in that operator. It is showing error.
    My Test cases
    A[0]+A[1]>150
    A[31]-50 <100.
    If those are your exact statements, then they don't make sense in a formula node.  You have to use them in an if-statement or some other type of control logic.  This mimics text-based programming languages such as C... See here for instructions on formula node syntax: http://zone.ni.com/reference/en-XX/help/371361G-01​/lvhowto/formula_node_syntax/
    For instance, you COULD say something like:
    **In this example, let A[0] == x, A[1] == y, A[31] == z**
    if(x+y>150)
    /* do something if this is true */
    else if(z-50 < 100)
    /* do something else */
    EDIT: 
    It should also be noted that Variable Names MUST be lowercase!! I just discovered this
    EDIT2:
    I stand corrected.  After trying to create an example and digging through the LabVIEW Help, I stumbled across this:
    Differences between the Parser in the Mathematics VIs and the Formula Node
    The parser in the Mathematics VIs supports all elements that Formula Nodes support with the following exceptions:
    Variables—Only a, a0, ..., a9, ... z, z0, ..., z9, are valid.
    Logical, conditional, inequality, equality—?:,, &&, !=, ==, <, >, <=, and >= are not valid.
    Functions—atan2, max, min, mod, pow, rem, and sizeOfDim are not valid. You can use these functions in a Formula Node or use their corresponding LabVIEW functions.
    So it DOES NOT seem like Eval Formula Node can do conditionals like you want.  I would just implement them using a LabVIEW based algorithm after all.  Trying to out smart the formula nodes to avoid simple LabVIEW code is just too much of a hassle
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • How can I disable/enable specific cell on the matrix?

    Hi,
    Please help me, how can I disable/enable specific cell on the matrix?
    Regards,
    vinoth

    Hi,
    Do you want to control by sdk?
    If yes, then you can use CommonSetting property.
    Try this,
         Dim oMatrix As SAPbouiCOM.Matrix
               Dim oRowCtrl As SAPbouiCOM.CommonSetting
               oMatrix = frm_id.Items.Item("mat_id").Specific
               oRowCtrl = oMatrix.CommonSetting()
               oRowCtrl.SetCellEditable(1, 2, False)
    Regards,
    silambu

  • How do I get a specific node in Elixir org chart?

    The problem now is, how do I get a node from the org chart?  I have seen various methods like, getChild, getChildAt, getChildByName, but none of them seem to get the node I'm looking for.  Each node has a unique attribute of DistID.  I don't know how to use that or if I can to get the node I"m looking for.  If I can do that, then I will have solved my problem and have the tree load as the results come back from my web service.

    recomendation for a program that optimizes your disc
    IMO defragmenting the HD is a waste of time. I used to use Norton Speed Disk in the Mac OS 6-7 era but then gave up on that and haven't noticed any ill effects.
    iMovie has behaved OK if I have kept a few GB free on the import drive (only the very last MBs of the drive are so fragmentated that the iMovie import starts to drop frames). Another option is to import the a dedicated partition and reformat it occasionally.
    For more info and about applications see also:
    http://db.tidbits.com/article/7254

  • How to iterate to a specific node in Oracle ATS OpenScript

    Hi,
    I have recorded a script in Oracle ATS Open Script tool. I want to iterate back to a specific node after completing the first iteration. Is there any way to do that?
    I don't want to iterate back to first step again and again.
    Regards,
    Sahil
    Edited by: 1009073 on May 31, 2013 1:39 AM

    Hi, DeepuM,
    Thnxs fr this info,I've followed the step which was mentioned earlier in your posts..but i m getting error.
    here's my scenario : i have a lo-gin script node and two child scripts in RUN Section,i want to iterate only the lo-gin node.. hence i moved the child scripts to initialize section ended up with this error "Failure when running child script"
    kindly help.
    Thanks in Advance.
    Regards,
    Diane

  • How to make the leaf node of the APEX tree downloadable

    Hi All,
    I am trying to build a "library" page for my application, with the documents as the leaf nodes of the tree. The documents come from a database table, and each document is a BLOB.
    My question is, how should I write the "link" part of the APEX tree query to make the lead node document downloadable for the end users?
    Thanks,
    Christine

    Hilary helped me out of this by creating a new form page with two new items there corresponding to the PK and BLOB column, then in the tree query use apex_util.get_blob_file_src function as the link. Below is the email from Hilary:
    1. Created Form, page 13, based upon your table storing the documents as BLOBs. The form page has just two associated items: P13_DOC and P13_DOC_ID. The item P13_DOC is of type FILE and contains a source type of DB column, which is the first required parameters of the function get_blob_file_src. NOTE: I could have created a form region on the same page as your tree, but chose to generate a separate page. You may choose to change this yourself.
    2. Updated the Tree query on pg 12 to use the following link for tree nodes of level 4:
    apex_util.get_blob_file_src('P13_DOC',v.attr3)
    ...where P13_DOC is the application page item mentioned in step 1 above, and v.attr3 should hold the unique ID associated with the document. Your tree now allows users to download the listed documents.

  • How to delete an old SIA node from the CMS database?

    Hello Everyone,
    I had installed XI 3.1 SP3 on RHEL server with CMS database in Oracle. I added an additional SIA node in the same CMS database using "Add Server Intelligence" option in "serverconfig.sh" script. Since I didnot delete the old one before adding a new one, now even though the services run with the new node but the old SIA node with its own central management server is also present. I know this because when I do "./ccm.sh -start all", it starts the old SIA too. So I have to shut down the old sia every time. This has become a sort of nuisance and I wanted to delete the old SIA node. However when I use "serverconfig.sh" script to delete it, it says cannot find the server with that SIA node.
    Looks like the old SIA nod is still registered in the CMS database but the server config.sh cannot find it. How can I get rid or the old SIA gracefully.
    Please help.
    Regards.

    Thanks Danis one more time.
    Yes, I know the name of the SIA. Good to know that creating an additional SIA with the same name and deleting it would do the trick. However, since the old SIA with the same name is still hanging around there, will it allow me to create an new one with the same name?
    Also, I have seen almost always adding a new SIA renders the existing ones non-usable and non-deletable (without using the work around). My reservation at this point is that, won't just adding an additional SIA though with an old name make the existing SIA running all the services unusable?
    I apologize for all the questions. Since it is the production environment I will be working on, I have very little luxury of first trying it out and asking the questions. We just want all the points covered before proceeding.
    I would very much appreciate your inputs.
    Thank you.

  • How to transfer data between different nodes of the same context.

    Hi experts,
       I am working on an application in ABAP webdynpro in which i want to copy data from one node to another node in the same context of a view and both the nodes are mapped with different nodes of context of component controller. How to code this. Please help.
    Thanks and Regards.
    Vaibhav Tiwari.

    Hi Vaibhav,
    you are in the wrong forum.
    BTW: Copying value of nodes is done automaticcally if you connect the nodes.
    Regards Mario

  • How to go to a particular node in a hierarchical tree?

    I want to do this simple thing with a Forms hierarchical tree.
    Since tree has lots of levels and branches I want to give a search box.
    User types the label and press a button. The form then has to query the tree node and expand ONLY the path where the node is (if found) and highlight it. If a node with a label is NOT found I give an error message to the user.
    I got hold of a code segment to explode a tree and modified it, but it does not work. The entire tree is expanded and you don't know where you are.
    Any help will be greatly appreciated?
    PROCEDURE Expand_All_Nodes_in_Tree IS
         node ftree.node;
         htree ITEM;
         state varchar2(30);
    BEGIN
         -- Search the tree identifiant --
         htree := Find_Item('menu.tree');
         -- Search the root --
         node := Ftree.Find_Tree_Node(htree, '');
         -- Expand all nodes --
         WHILE NOT Ftree.ID_NULL(node) LOOP
         state := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_STATE);
         IF state = Ftree.COLLAPSED_NODE THEN
         Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, Ftree.EXPANDED_NODE);
         END IF;
         node := Ftree.Find_Tree_Node(htree, '', ftree.find_NEXT,Ftree.NODE_LABEL,'', node);
    IF Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_LABEL) = :ctrl.node_lable_to_search THEN
    EXIT;
    END IF;     
         END LOOP;
    END;

    Hi Channa,
    Try this code with you tree i am using the same situation and this code is working perfect with me.
    PROCEDURE find_node_in_tree(search_string varchar2, find_type varchar2) IS
    htree ITEM;
    search_start_node ftree.node;
    find_node ftree.node;
    BEGIN
    htree := Find_Item('blk_tree.main_tree');
         search_start_node := nvl(ftree.get_tree_selection(htree,1),ftree.root_node);
         find_node := ftree.find_tree_node(htree,upper(search_string)||'%',ftree.find_next,ftree.node_label,ftree.root_node,search_start_node-1);
         if find_node = 0 then
              find_node := 1;
    end if;
    Ftree.Set_Tree_selection(htree, find_node, Ftree.SELECT_ON);
    exception
         when others then
              NULL;
    END;
    -Ammad

  • How to make repricing for specific conditions at the time of billing?

    Hello
    I'm SD Pricing person. Let me ask here experts below my concern.
    In EU countries, there is recycling fee in sales of electronics or Note PC with batteries....to keep our earth clean.
    So when customers buy such products, they have to pay more as recycling fee including invoice amount.
    My question is... we want to make repricing for recycling conditions when the billing is created.
    Based on our configuration, recycling condition is not defined as a kind of tax condition.
    So this value is just copied from sales order.
    (pricing type in copy control is 'G' which means repricing for tax condition.)
    In this situation, we want to make repricing for those conditions during operating system.
    Is there any easy way to cover this?
    As I think, this is not easy because the system is already operated.
    To change condition attribution is really risky. If we dare do, we have to migrate all open orders.
    So I want to put this way to the end of my choice.
    For this requirement,
    1. We have to change condition class or category or calculation type in order to be repriced based on pricing type 'G'.
        (ex. Set the condition category as 'I' inter-billing or 'L' always repricing.)
        But transaction data are created now and all open orders will be affected.
    2. To create new conditions are not easy because these conditions are mapped to the CO-PA value field and the values are posted in FI doc.
    3. To change pricing type in copy control is almost impossible because of the impact.
    What can I do this in this situation?
    What I want to do is just to make repricing for specific conditions at the time of billing in case that pricing type of copy control is 'G'.
    Thank you in advance.

    Let me ask agagin to all experts.
    I want to make A condition to be repriced at the time of billing.
    For this, I have to set condition category as 'L' (Generally new when copying).
    But I do not want to do in that way becauuse I am maintaining big operated system now.
    In addition, though I migrate open orders after changing config. as 'L', it is almost impossible for use to migrate because we have more than a thound open orders per a DAY as Globalized system.
    That is why I am asking.
    Simply I can create new condition but as I mentioned, there are various recycling fee so we already created about 10 conditions. And this recycling conditions are linked to REA package of SAP. So creating another 10 more conditions can not be a way for us.
    At last, what I want is not to be shown this condition only in billing doc.
    'A' condition should be displayed in both Sales order and Billing doc.
    And simultaneously, when the billing is created and if user changed 'A' condition master, then new value which is different from sales order have to be reflected in billing doc.
    Thank you in advance.

  • Nodes in the R-tree

    Hello,
    I have a question concerning a R-tree Index:
    If I create a R-tree Index with:
    CREATE INDEX test ON tablename (geom)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    at which position can I decide, how many entries
    a node could have?
    The more entries a Tree has, the smaller is the height
    and the performance is better.
    Isn�t it true?
    Thanks for helping

    Hi,
    The number of entries for each node is determined at index create time by the R-tree indexing code. The number of entries is a function of:
    dimensionality of index
    geodetic/non-geodetic
    tablespace block size
    etc.
    It is not necessarily the case that more entries from a single node is better (or why have a tree structure at all?).
    Hope this helps.

  • Scrolling not possible in BSP (inside the webdynpro area)

    Hi,
    I am having a BSP application which has a webdynpro application embedded in it inside an IFRAME. The size of my webdynpro application exceeds the size of the BSP page and hence the vertical scroll bars appear at the right side (These are scroll bars of the BSP application).
    But i am unable to scroll through the page using my mouse when the cursor is present over the webdynpro area. The same works fine if i keep the cursor over the BSP area.
    Is there a way to make the page scrollable irrespective of the position of the cursor?
    Thanks,
    Prasath N

    No solution. I am currently using the scroll bar of the webdynpro.

  • Re: How to iterate to a specific node in Oracle ATS OpenScript

    Hi
    We have insurance production developed using oracle forms 10. Trying to automate few processes of the application. Installtion is fine recording and playback works. Have list of queries which needs to be addressed:
    - When I try to choose to the functional EBS/forms I'm able to recordand play back say for ex sample1 test. This is also achived in Load testing EBS/forms aswell when I compare the tree view or java code. I able to see the action set.textfield(value) while I choose the Functional ebs/forms this is not seen I can only mousecilck accelement("@index=0") 322,17s.Please advise on this if any settings are missed.
    - I used databanks configured them to required fields ex : CURRENCIES_CURR_NO_2 ={{db.currencydata.CURRENCIES_CURR_NO_2}}. I have few records which has to be picked when I run the iteration kindly advise me how this can be achived. i HAVE PASTED SAMPLE JAVA CODE Of my application.
    Please advise me how this can be done.

    Hi, DeepuM,
    Thnxs fr this info,I've followed the step which was mentioned earlier in your posts..but i m getting error.
    here's my scenario : i have a lo-gin script node and two child scripts in RUN Section,i want to iterate only the lo-gin node.. hence i moved the child scripts to initialize section ended up with this error "Failure when running child script"
    kindly help.
    Thanks in Advance.
    Regards,
    Diane

  • How to start from a specific point on the timeline

    I have a horizontal list of image thumbnails, there are 21 thumbnails and only 7 are visible at one time and scrolls back and forth. It works fine.
    However, when I choose an image that is not in the first seven, say the 8th image, the page loads and the thumbnails goes back to the beginning images (undesirable). When the 8th image page is shown I would like the thumbnails to start at the eigth image, NOT from the beginning again.
    I had the animation positioned to the eight image for the start, with the first 7 off to the left and the second 7 off to the right. But when I saved and loaded it into the page, it just starts from the begining.
    How can I start the thumbnails from a specific desired position, such as the 8th image or the 15th image depending on the page?
    Thank you for any help.
    Anthony

    Hi Anthony,
    Thank you for your post.
    It would be better if you share any link or actual composition with us.
    Regards,
    Devendra

  • JTree - need to get the value of a node at a specific node in the tree

    For Example here is a tree:
    Root
    -Item1
    A
    B
    C
    -Item2
    A
    B
    C
    Scenario: Somebody selects B in Item2 from the tree and drags it to a JList. Need to be able to tell the JList that the B came from Item2 and not Item1. So how do I get the Item1, Item2 value? Thanks in advance for all your help.
    Here is the code I am working with...so I have a TreeSelectionEvent(e), a DefaultMutableTreeNode(node) and my JTree(mainTree)
    public void valueChanged(TreeSelectionEvent e) {
    DefaultMutableTreeNode node = (DefaultMutableTreeNode) mainTree.getLastSelectedPathComponent();
    getChildren(node);

    public void valueChanged(TreeSelectionEvent e) {
       javax.swing.tree.TreePath path = e.getPath();
       ...Then use path.getLastPathComponent() and path.getParentPath().getLastPathComponent() methods.
    Tristan

Maybe you are looking for