How-to get path to a node in SPRO

Hello guys,
I'm working on a tool which creates automatic dcumentation tool of changes in SPRO. All goes fine except one thing:
I need to generate a PATH to IMG ACTIVITY. I know the code of activity, I know it's HIER_GUID. What I need to get is all "parents" HIER_GUID of bottom node.
So far I got only one FM - STREE_GET_PATH_TO_NODE. It's fine but it returns only the path to 03 level in SPRO. (01 - is top, 02 - are components).
What I desperatly need is how to get a connection from 03 to 02 level.
You can simulate the FM with following values:
SEARCH_FOR_NODE-NODE_ID = 1C1B49FEC279D411AB74009027B70B8E
SEARCH_FOR_NODE-TREE_ID = 367A8DF9ACEE16E7E10000009B38F976
The result contain the highest node id 367A8DAFACEE16E7E10000009B38F976, which stands for "SAP Business Parnter" (according the table TNODEIMGT-NODE_ID).
But the fact, that "SAP Business Partner" is in "Cross-Application Components" is unreachable for me.
Do you know, how to get relevant node on level 02 ?
All hints will be rewarded.
Thank you
Regards
Tomas

Hello guys,
I'm working on a tool which creates automatic dcumentation tool of changes in SPRO. All goes fine except one thing:
I need to generate a PATH to IMG ACTIVITY. I know the code of activity, I know it's HIER_GUID. What I need to get is all "parents" HIER_GUID of bottom node.
So far I got only one FM - STREE_GET_PATH_TO_NODE. It's fine but it returns only the path to 03 level in SPRO. (01 - is top, 02 - are components).
What I desperatly need is how to get a connection from 03 to 02 level.
You can simulate the FM with following values:
SEARCH_FOR_NODE-NODE_ID = 1C1B49FEC279D411AB74009027B70B8E
SEARCH_FOR_NODE-TREE_ID = 367A8DF9ACEE16E7E10000009B38F976
The result contain the highest node id 367A8DAFACEE16E7E10000009B38F976, which stands for "SAP Business Parnter" (according the table TNODEIMGT-NODE_ID).
But the fact, that "SAP Business Partner" is in "Cross-Application Components" is unreachable for me.
Do you know, how to get relevant node on level 02 ?
All hints will be rewarded.
Thank you
Regards
Tomas

Similar Messages

  • TreeModel - get path of selected node

    How can I get path of selected node. I know getRowKey will return me for example [0,1,0] , but how can I use that to get string representation [Test, Folder1, Node0]
    I tried to loop thru it but the results are inccorect.

    public String pickPara_action() {
    // Add event code here...
    setCurrentParagraphNumberFromRow();
    return null;
    private void setCurrentParagraphNumberFromRow() {
    FacesContext ctx = FacesContext.getCurrentInstance();
    //java.lang.ClassCastException: oracle.jbo.uicli.binding.JUCtrlHierNodeBinding
    /*JUCtrlValueBindingRef*/JUCtrlHierNodeBinding tableRowRef =
    /*(JUCtrlValueBindingRef)*/(JUCtrlHierNodeBinding)this.getParagraphTreeTable().getRowData();
    try
    paragraphPk = (Double)tableRowRef.getRow().getAttribute("pk");
    catch (Exception ex) {
    System.err.println ("backingToc: exception at get attribute"+ex);
    String paragraphPk_str = paragraphPk.toString();
    System.err.println("backingToc: before store");
    IMS_UserSystemState.storeCurrentParagraphNumber(paragraphPk_str);
    }

  • How to get path of a specified file

    how to get path of a specified folder
    my code is as follows: Iam using struts 1.2
    my directory structure in tomcat/webapp is as afollows:
    sfq
    |
    | _ _xml
    | |     
    | |_ _ sqx_read.xml
    |
    |__jsp
    |
    |__WEB-INF
         |
         |_ _classes
              |
              |_ _ReadXml.class
    Now i have to get the path of a sql_read.xml file which is in xml folder from ReadXml.java file. pls it's urgent

    Urgent or not, you can obtain the document root directory as
    ServletContext.getRealPath("/")

  • How to get path of downloaded file?

    Hi,
    I use JDeveloper 11g with ADF.
    I have to download file with original date. If i want to save date i have to zip file. After that to unzip. My queation is: when clien download file how to get path of downloaded file????
    Because, i want to save unziped file on location where client want to download.

    Hi,
    you cannot download a file directly to a client. If this is a requirement then you need a signed Java Applet to handle the download. Otherwise a download dialog is opened for the user to define where to store the file.
    Frank

  • How to get Value of tree node without Reload Page

    hi,
    i worked with apex 4.2 and i created Tree and tabular form to retrieve the date according the value of tree select node the code of tree something like this
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    "ENAME" as title,
    null as icon,
    "EMPNO" as value,
    null as tooltip,
    'f?p=36648:34:5234984107903::::P40_SELECTED_NODE:'||empno as link
    from "DEPT"."EMP"
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME
    and i put Selected Node Page Item: P40_SELECTED_NODE . the tree worked good and retrieve the data into tabular form according to tree node value
    my Question :
    1- i want to retrieve the data without submit the page where each time i select value from tree make page reload to update the tabular form with new value ,there is any way to pass the value of tree node to P40_SELECTED_NODE item and refresh tabular form without page reload .
    2- i want when selected from tree run page process according to value of tree node i tray to create Dynamic action with *(jquery selector : div.tree li>a)* but the Value of node incorrect.
    Regards
    Ahmed;

    look at this link
    Re: How to get Value of tree node without Reload Page ..!

  • How to get total number of nodes in a JTree?

    Hi,
    I am trying to get total number of nodes in a JTree, and cannot find a way to do it.
    The current getRowCount() method returns the number of rows that are currently being displayed.
    Is there a way to do this or I am missing something?
    thanks,

    How many nodes does this tree have?
    import java.awt.EventQueue;
    import javax.swing.*;
    import javax.swing.event.TreeModelListener;
    import javax.swing.tree.*;
    public class BigTree {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    TreeModel model = new TreeModel() {
                        private String node = "Node!";
                        @Override
                        public void valueForPathChanged(TreePath path,
                                Object newValue) {
                            // not mutable
                        @Override
                        public void removeTreeModelListener(TreeModelListener l) {
                            // not mutable
                        @Override
                        public boolean isLeaf(Object node) {
                            return false;
                        @Override
                        public Object getRoot() {
                            return node;
                        @Override
                        public int getIndexOfChild(Object parent, Object child) {
                            return child == node ? 0 : -1;
                        @Override
                        public int getChildCount(Object parent) {
                            return 1;
                        @Override
                        public Object getChild(Object parent, int index) {
                            return node;
                        @Override
                        public void addTreeModelListener(TreeModelListener l) {
                            // not mutable
                    JFrame frame = new JFrame("Test");
                    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                    frame.getContentPane().add(new JScrollPane(new JTree(model)));
                    frame.pack();
                    frame.setLocationRelativeTo(null);
                    frame.setVisible(true);
    }But for bounded tree model using DefaultMutableTreeNode look at bread/depth/preorder enumeration methods to walk the entire tree. Or look at the source code for those and adapt them to work with the TreeModel interface.

  • JTree: How to get the currently selected node

    How do I get the currently selected node in JTree?
    getLastSelectedPathComponent() this method always return the last selected node and not the current one.
    Thanks in advance
    Sachin

    Use
    TreePath selectedPath = tree.getSelectionPath()If your tree allows multiple selections, use
    TreePath [] selectedPaths = tree.getSelectionPaths() this will return an array of all selected tree paths.
    Once you get the tree path, call the treePath.getLastPathComponent(). this should tell you the currently selected node.
    Hope this helps
    Sai Pullabhotla

  • How to get the following-sibling nodes until a specific node

    XSL people,
    I need to get all the following-sibling nodes for every <h> node until the next <h> node.
    Example:
    <body>
    <h>Header1</h>
    <a>Line 11</a>
    <b>Line 12</b>
    <c>Line 13</c>
    <a>Line 14</a>
    <h>Header2</h>
    <a>Line 21</a>
    <c>Line 22</c>
    <a>Line 23</a>
    <b>Line 24</b>
    </body>
    So I need to get this strings:
    from the first <h> node: Line 11Line 12Line 13Line 14
    from the second <h> node: Line 21Line 22Line 23
    When using following-sibling
    <xsl:value-of select="following-sibling::a"/>
    <xsl:value-of select="following-sibling::b"/>
    <xsl:value-of select="following-sibling::c"/>
    I am not getting the second <a> node (of course!), so for the first <h> node I am only getting
    Line 11Line 12Line 13
    and not
    Line 11Line 12Line 13Line 14
    and I don't know how to get it.
    Thank you.
    Anatoliy Smirnov

    Thanks Sudipto for trying to help. I did try that, and as I mentioned in the previous posting, it doesn't work for the tree nodes (multiple RowSetIterator). the following is my code, where the treeVO is the vo instance for the firstLevel tree nodes and it has view link to its children. I am not sure how to sort all children for each level. Even for the first level where I did the explicit sorting in memory, it still not sorting at all.
    treeVO.setSortBy("code");
    treeVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS|ViewObject..QUERY_MODE_SCAN_DATABASE_TABLES);
    treeVO.executeQuery();

  • XPath - How to get only second matching node?

    Hello,
    withs this XPath expression:
    //td[contains(@name, 'FirstColumn')]on this XML:
    <html>
         <table>
              <tr>
                   <td name="MyFirstColumnInRow">A11 - skip me!</td>
                   <td name="MySecondColumnInRow">A12</td>
              </tr>
              <tr>
                   <td name="MyFirstColumnInRow">A21 - find me!</td>
                   <td name="MySecondColumnInRow">A22</td>
              </tr>
              <tr>
                   <td name="MyFirstColumnInRow">A31 - skip me!</td>
                   <td name="MySecondColumnInRow">A32</td>
              </tr>
         </table>
    </html>I have got three matching nodes: A11, A21, A31 .
    How to expand this XPath expression to get only the second node: A21 ?
    I can't find appropriate solution.
    Thanks in advance.

    Why don't you get all the nodes and than you can do whatever you want? You can even get an iterator (here commented out) or write your rule in a loop.
        public static Document parseXmlIntoDOM(File xmlFile,boolean validating,boolean spaceAware) throws XMLException{
            Document document = null;
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setValidating(validating);  
            factory.setNamespaceAware(spaceAware);
            try {
               DocumentBuilder builder = factory.newDocumentBuilder();
               document = builder.parse(xmlFile);
            catch (SAXException sxe) {throw new XMLException("An error in parsing the input source",sxe);}
            catch (ParserConfigurationException pce) {throw new XMLException("An error in parsing the input source",pce);}
            catch (IOException ioe) {throw new XMLException("An error in parsing the input source",ioe);}
            return document;
        public static void main(String args[]){
            Document dom;
            try{
                File file = new File("C:\\Documents and Settings\\diego\\xml\\newXMLDocument.xml");       
                dom = parseXmlIntoDOM(file,false,true);
                XPath xpath = XPathFactory.newInstance().newXPath();
                String expression = "/html/table/tr/td";
                DTMNodeList tdNodes = (DTMNodeList)xpath.evaluate(expression, dom, XPathConstants.NODESET);
                //DTMIterator iterator=tdNodes.getDTMIterator();
                Node secondinstance = tdNodes.item(2);
                System.out.println(secondinstance.getTextContent());
                }catch(Exception e){
                    e.printStackTrace();
        }This works just fine for me and that is my output (in the standard):
    compile:
    run:
    A21 - find me!
    BUILD SUCCESSFUL (total time: 1 second)Sorry the code I wrote is awful, but working. P.S. is there a way for not using the "DTM" api?

  • How to get path of jar file

    I am using a class which is present in a jar file.
    There are lot of versions of this jar file are present on machine.
    I am accessing one class from this jar.
    How do I know which jar is used by application.
    How to get the path(path on machine like c:\java\lib) of this jar file.

    URL jarURL = this.getClass().getResource("/whatever.class");will return you a jar:// URL. Experiment with that. (Remember that "whatever.class" needs to be prefixed by the full name of the package the class is in.)

  • How to get path to file variable with applescript

    I've tried:
    `set file_path to path of myfile`
    but it's giving me error:
    `error "Finder got an error: Can’t get path of document file ..."`

    Code is:
    set theFolder to (choose folder with prompt "Select the start folder")
    set file_list to every file of theFolder
    repeat with myfile in file_list
        set file_name to name of myfile
        set file_path to path of myfile
        log (file_path & "/" & file_name as string)
    end repeat

  • How to get path or parent folder

    Hello
    I'm overriding method extendedPreAddRelationship on class S_Relationship.
    My purpose is to check whether the document is being put in the correct path or not.
    I can get folder name and document name using following code:
    AttributeValue av;
    av = def.getAttribute(Relationship.LEFTOBJECT_ATTRIBUTE);
    S_PublicObject folder = (S_PublicObject) av.getPublicObject(this.getSession());
    av = def.getAttribute(Relationship.RIGHTOBJECT_ATTRIBUTE);
    S_PublicObject document = (S_PublicObject) av.getPublicObject(this.getSession());
    What I need is the whole path (or at least the parent folder). Can I get path somehow? Or should I try to search parent folders?
    Jaska

    My purpose is to check whether the document is being put in the correct path or not.Hi,
    I had a similar problem - I needed to compare the path of current folder with path from parameters. Because I wasn't be able to get the path of folder, I did it in reverse way, comparing the folders. To get folder from path I needed getRootFolder method, which wasn't in server-side classes, so I extend S_TieFolder class:
    * Analogy of LibrarySession.getRootFolder().
    public static S_Folder getRootFolder(S_LibrarySession session)
    throws IfsException
    S_Folder folder = null;
    try
    Collection c = session.getValueDefaultCollection();
    S_ValueDefault vd = (S_ValueDefault)c.getItems("RootFolder");
    AttributeValue av = vd.getPropertyValue();
    folder = (S_Folder)av.getPublicObject(session);
    catch(Exception e)
    throw new IfsException(21020, e, session);
    return folder;
    In extendedPreAddItem method of S_TieFolder:
    S_Folder paramFolder = (S_Folder)getRootFolder(session).findPublicObjectByPath(folderPath);
    if( this==paramFolder ) ...
    Radek
    [email protected]

  • How to get path of a VI used in LV project?

    How can I get the path of a VI used in LabVIEW project?
    Actually I want to replace the VI used in LV project by saome other VI, and I think it can be done if I get the path of the VI already present in project and replace that path with path of the VI which I want to include in that project.

    There are several ways to replace a VI, say "MyFirstVI", with another, say "MySecondVI".  The method you use will depend on several factors, including
    the version of LabVIEW you are running
    whether the VIs are in a LabVIEW Project or not (if they are, I'm assuming they are in the same Project)
    whether you want to replace all MyFirstVI instances with MySecondVI, or selected ones
    the size (number of VIs) of the Project.
    As noted, if you want to replace all of MyFirstVI with MySecondVI in a Project, here is one way to do this:
    Close the Project.  You do not want to do this with Project open.
    Rename MyFirstVI to MyOldFirstVI.
    Rename MySecondVI to MyFirstVI.  If MySecondVI already exists in the Project, you might want to Copy it instead of Rename.
    Open the Project.  Find and open an instance of MyFirstVI, verify it has the code of MySecondVI.
    In Project Explorer, find MyFirstVI and rename it MySecondVI.
    Exit Project.  Rename MyOldFirstVI back to MyFirstVI.
    At this point, all of your VIs have their "original" names, but in, say, Main.vi, wherever MyFirstVI was called, you should see MySecondVI.
    For doing selective Replacement (or even total replacement where you want to actually see all of the instances where replacements are made), you can use QuickDrop to your advantage.  You need to have in memory the VIs that use MyFirstVI, and also have MySecondVI in memory.  With the Project open and the relevant VIs in memory:
    Open any VI that shows MyFirstVI on the Block Diagram.  Right-click it and choose "Find All Instances".
    When the search is done, you need to "visit" each of the found VIs -- use Ctrl-G to do this.
    When you find an instance of MyFirstVI, type Ctrl-Space to activate QuickDrop, start typing MySecondVI until it appears on the Selection line (if you are lucky, you will only need to type MySec and it will find the correct VI), then type Ctrl-P to replace MyFirstVI with MySecondVI.
    Type another Ctrl-G to go to the next instance of MyFirstVI and replace as needed.  When you've replaced all of them (or all that you want to replace), stop.
    Bob Schor

  • Parse XML: how to get all the sub nodes of an element

    Hello, I am using org.w3c.dom to parse an XML file. I want to get all the information under an elements, including all the sub nodes and sub sub nodes, maybe output as a String or String[ ]. How should I do it with org.w3c.dom?
    e.g. I want to get all the text within<datafile></datafile>:
    <datafile>
    blablabla
    <id> bla <description>bla</description></id>
    </datafile>
    I write:
    Node element = InterfaceDOM.getElementsByTagName("datafile");
    how can I return all the sub content within this element?
    Thanks a lot!

    http://www.developerfusion.co.uk/show/2064/

  • How to get path

    Hello
    How do I get the current path an object is executing from? This is for a simple test. I have a file I want to open up within my object. That file is being copied to the .class directory where my object is. I just want to figure out how to use some static method of the Class to find where it is so I can use it. I am sure this is the wrong way to do it, if even possible. I just need this as a "throwaway" technique. tia.

    See http://www.rgagnon.com/javadetails/java-0076.html

Maybe you are looking for

  • Background job issue

    The background job - SAP_COLLECTOR_FOR_NONE_R3_STAT is taking too long to complete. It is stuck with - Reason - RFC   Status - On-hold Double clicking on the work process I see this - Waiting f. Gateway A92SV093XI034 Report / Spool action CL_SLD_ACCE

  • Install oracle 10.2.0.5 on windows 7 32 bits

    Hi all , I want to install oracle 10.2.0.5 on windows 7 (32bits) but in the websit I found <B>"Oracle Database 10g Release 2 (10.2.0.5) Enterprise/Standard Edition for Microsoft Windows (64-bit Itanium)" [http://www.oracle.com/technetwork/database/10

  • Crashes on battery power

    Totally weird. After upgrading to Yosemite a couple of months ago I get sporadic system crashes on my MacBook Pro. They occur periodically, usually once or twice a day; often when there was no apparent activity or app work being done. After several w

  • PNP logical database

    if data is fetched into pernr structure according to the selection screen criteria what is the need for seperate tables p0003 or p0006..... Kindly explain the entire flow logic of the foll .code: tables :pernr. infotypes:0001,0002,0006..... get pernr

  • IPod is in use by another user on this computer

    I don't have a multi-user setup on this mac! I've tried restoring the factory settings to default using ipod updater, but no luck. This is likely to be related to my previous problem: http://discussions.apple.com/thread.jspa?threadID=256209&tstart=0