XMLTable.. how to reading the parent node..

<CONTEXT>
<UID>
<id>23</id>
<STARTTIME>01/01/2010</STARTTIME>
<STOPTIME>01/31/2010 23:59:59</STOPTIME>
<ACCOUNTID>
<acctid>Ac1</acctid>
<METERID>
<namek>METER1</namek>
<DETERMINANTVALUES>
<value>
<name>RECORDED_KWH</name>
<reading_charges>13955.58</reading_charges>
<cost>2.81</cost>
</value>
<value>
<name>STRND_KW_CHARGES</name>
<reading_charges>89.84</reading_charges>
<cost>2.01</cost>
</value>
<value>
<name>DEL_CHARGES</name>
<reading_charges>891.84</reading_charges>
<cost>5.29</cost>
</value>
</DETERMINANTVALUES>
</METERID>
<METERID>
<namek>METER2</namek>
<DETERMINANTVALUES>
<value>
<name>RECORDED_KWH</name>
<reading_charges>139553.58</reading_charges>
<cost>2.81</cost>
</value>
<value>
<name>STRND_KW_CHARGES</name>
<reading_charges>893.84</reading_charges>
<cost>2.01</cost>
</value>
<value>
<name>DEL_CHARGES</name>
<reading_charges>8913.84</reading_charges>
<cost>5.29</cost>
</value>
                    </DETERMINANTVALUES>
               </METERID>
               </ACCOUNTID>
     </UID>
</CONTEXT>
This XML data is read and put into an XMLType variable. We want each meters different values to be different rows:
select t.*
from
XMLTABLE('for $i in /CONTEXT/UID/ACCOUNTID/METERID/DETERMINANTVALUES/value return $i'
passing var1
COLUMNS
detval1 varchar2(100) PATH 'reading_charges',
meterid varchar2(100) PATH '../../name'
) t;
but the meterid fetches null value .. how can we fetch
uid1, accountid1, reading_charge1, cost1
uid1, accountid1, reading_charge2, cost2
uid1, accountid1, reading_charge3, cost3
Edited by: user3178919 on Feb 10, 2010 7:49 AM

Heres the formatted XML:
<CONTEXT>
     <UID>
          <id>23</id>
          <STARTTIME>01/01/2010</STARTTIME>
          <STOPTIME>01/31/2010 23:59:59</STOPTIME>
          <ACCOUNTID>
               <acctid>Ac1</acctid>
               <METERID>
                    <namek>METER1</namek>
                    <DETERMINANTVALUES>
                         <value>
                              <name>RECORDED_KWH</name>
                              <reading_charges>13955.58</reading_charges>
                              <cost>2.81</cost>
                         </value>
                         <value>
                              <name>STRND_KW_CHARGES</name>
                              <reading_charges>89.84</reading_charges>
                              <cost>2.01</cost>
                         </value>
                         <value>
                              <name>DEL_CHARGES</name>
                              <reading_charges>891.84</reading_charges>
                              <cost>5.29</cost>
                         </value>
                    </DETERMINANTVALUES>
               </METERID>
               <METERID>
                    <namek>METER2</namek>
                    <DETERMINANTVALUES>
                         <value>
                              <name>RECORDED_KWH</name>
                              <reading_charges>139553.58</reading_charges>
                              <cost>2.81</cost>
                         </value>
                         <value>
                              <name>STRND_KW_CHARGES</name>
                              <reading_charges>893.84</reading_charges>
                              <cost>2.01</cost>
                         </value>
                         <value>
                              <name>DEL_CHARGES</name>
                              <reading_charges>8913.84</reading_charges>
                              <cost>5.29</cost>
                         </value>
                    </DETERMINANTVALUES>
               </METERID>
          </ACCOUNTID>
     </UID>
</CONTEXT>
Expected output:
UID-ID, ACCOUNTID-acctid, METERID-NAME, DETERMINANT-value-reading-charges
23 Ac1 METER1 13955.58
23 Ac1 METER1 89.84
23 Ac1 METER1 891.84
because if we do as shown below the meterid value comes as NULL (not able to go the parent node and get the values)
select t.*
from
XMLTABLE('for $i in /CONTEXT/UID/ACCOUNTID/METERID/DETERMINANTVALUES/value return $i'
passing var1
COLUMNS
detval1 varchar2(100) PATH 'reading_charges',
meterid varchar2(100) PATH '../../name'
) t;
IF we do 'for $i in /CONTEXT
return $i//UID/ACCOUNTID/METERID/DETERMINANTVALUES/value'
- will we be able to get the paret node value
Can this be achieved using multiple XMLTable only can be achieved using single XMLTable?

Similar Messages

  • How to get the parent node of the current node?

    Hi all,
    i want to get the parent node of the current node and the not the parent of the parent node.
    thank you very much

    Hi,
    the parent node of <subnode1-2>29.99</subnode1-2> is (node1), how can do to get <node1> throw <subnode1-2>29.99</subnode1-2> the sub node of <node1>.
    As per my understanding the parent node of <subnode1-2>29.99</subnode1-2> is book not the node1.
    If you want node 1 as a parent of subnode1-2 than your xml will look like this.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book>
    <fathernode>Harry Potter</fathernode>
    <node1>
           <subnode1>29.99</subnode1>
           <subnode2>29.99</subnode2>
    </node1>
    <node2>
           <subnode1>19.99</subnode1>
           <subnode2>19.99</subnode2>
    </node2>
    </book>
    </bookstore>
    and also if you want tom retrive float data than refer following XPATH.
    "//book[[price='1000']]/price/text()"
    Regards,
    Manoj Bilthare

  • How to read the context node of used component?

    Hi,
    I have component called : SRQM_INCIDENT_H. This component has used component - BTSTATUS.
    Now, I need to read the context node of the BTSTATUS/UserStatus in GET Methods of Context node in SRQM_INCIDENT_H.
    Can you plese help me out.
    Thanks,
    Sandeep

    The component usages can be accessed from the component controller
    You should however assure that the context node is present in comp controlelr of the used component.View context nodes cannot be accessed.
    if not ,then you need to goto the component BTSTATUS ,add the context node  explicitly to comp controller,and do correct bindings to the view context node.
    Once you add the context node to the com controller,yo also need to expose it.
    go to runtime repository->component_interface->interface_controller->context->right click and select ADD CONTEXT NODE, and add you newly creatde context ndoe of comp contorller here.
    Now you cann access it using the code below in your comp SRQM_INCIDENT_H
    data:lr_comp_controller type ref to <ur comp controller class>lr_comp_controller ?= me->comp_controller.
        lr_comp_usage ?= lr_comp_controller->get_component_usage( iv_usage_name = '<name of the comp usage as in runtime repository' ).
        CHECK lr_comp_usage IS NOT INITIAL.
        lr_cnode ?= lr_comp_usage->get_context_node( iv_cnode_name = '<the required context node name>' ).
    Suvidha

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • How to read the selected row value of a table node

    hi
    i have a node of table type, displaying few records & with each record a  NEXT button is there.
    now i want to read the values of the selected row of the table & want to process next with NEXT button.
    pls tell me how to read the values of the selected row only.
    reds.

    data : lo_nd type ref to if_wd_context_node,
      lo_nd1 type ref to if_wd_context_node,
      lt_temp type wdr_context_element_set,
      wa_temp type ref to if_wd_context_element,
      ls_node1 type sflight,
      lt_node1 type STANDARD TABLE OF sflight.
    lo_nd = wd_context->get_child_node('CN_MAIN').
      CALL METHOD lo_nd->get_selected_elements
       RECEIVING
           set = lt_temp.
      loop at lt_temp INTO wa_temp.
          CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_node1.
        APPEND ls_node1 TO lt_node1.
        CLEAR ls_node1.
      ENDLOOP.
    'CN_MAIN' is the node whose selected values are to be picked and stored in internal table lt_node1.
    Other option by Thomas :
    DATA lo_nd_cn_main TYPE REF TO if_wd_context_node.
      DATA lt_temp TYPE wdr_context_element_set.
      FIELD-SYMBOLS <wa_temp> LIKE LINE OF lt_temp.
      DATA lt_node1 TYPE wd_this->elements_cn_main.
      FIELD-SYMBOLS <ls_node1> LIKE LINE OF lt_node1.
      lo_nd_cn_main = wd_context->get_child_node( name = wd_this->wdctx_cn_main ).
      lt_temp = lo_nd_cn_main->get_selected_elements( ).
      LOOP AT lt_temp ASSIGNING <wa_temp>.
        APPEND INITIAL LINE TO lt_node1 ASSIGNING <ls_node1>.
        <wa_temp>->get_static_attributes( IMPORTING STATIC_ATTRIBUTES = <ls_node1> ).
      ENDLOOP.

  • How to get the parent of a component in fx?

    Here is an example:
    Index.fx:
    Stage {
        title: "Online book library";
        width: 1024
        height: 768
        scene:Scene {
        fill: Color.WHITE
        content: [
           banner ,
           login = Login{translateX:715 translateY:135}
    };Login.fx:
    var logOn : Button = Button {
            translateX:25 translateY: 170
            text: "Log On"
            font: Font {size:11 name: "Verdana Bold"}
            action: function() {
                showHello();
    function showHello(){
       // add a label in index.fx whose text is "welcome!";
        }I want to show something on the index.fx but I don't know how to get the parent from the child component?
    In Flex, we use parent or parentApplication, Is there a similar function in JavaFX?

    Reusing the same Tile example, I had no problems, I suppose I was doing wrong the first time:
    def IMAGES_WIDTH = 100;
    def IMAGES_HEIGHT = 100;
    var COLUMN_NB = 3;
    var ROW_NB = 3;
    var scene: Scene;
    var previews: Container;
    Stage
      title: "Test of Tile layout"
      scene: scene = Scene
        width: 500
        height: 500
        fill: Color.LAVENDER
        content:
          previews = Tile
            hgap: 10
            vgap: 10
            layoutX: bind (scene.width - previews.width) / 2
            layoutY: bind (scene.height - previews.height) / 2
            columns: COLUMN_NB
            content: for (i in [ 1 .. COLUMN_NB * ROW_NB ])
              ImageView
                id: "IV{i}"
                image: Image
                  url: "{__DIR__}clock.gif"
                  width: IMAGES_WIDTH
                  preserveRatio: true
                onMousePressed: Hide
    function Hide(evt: MouseEvent): Void
      println("{evt.node} ({evt.node.id}) - {evt.node.parent}");
      var nm: Node = evt.node.parent.lookup("IV5"); // Middle node
      nm.visible = false;
      var ntl: Node = evt.node.parent.lookup("IV1"); //Top left node
      (ntl as ImageView).viewport = Rectangle2D { height: IMAGES_WIDTH/2, width: IMAGES_WIDTH/2 };
      (evt.node.parent as Tile).hgap = 20; // Strange effect, but works
    }

  • How to get the parent window in sub-child controller class in javafx?

    how to get the parent window in sub-child controller class in javafx?

    You can get the window in which a node is contained with
    Window window = node.getScene().getWindow();Depending when this is invoked, you might want to check the Scene is not null before calling getWindow().
    If the window is a stage that is owned by another window, you can get the "parent" or "owner" window with
    Window owner = null ;
    if (window instanceof Stage) {
      Stage stage = (Stage) window ;
      owner = stage.getOwner();
    }

  • Problem with trees(Duplication of the parent node in creation of  children)

    Hi guys i am experiencing a slight problem with the creation of trees.Here is a clear explanation of my program.I created a program that generates edges from a set of datapoints then use each and every edge that is generated to create multiple trees with the edge as the rootnode for each and every tree.Everything up to so far everything went well but the problem comes when i want the program to pick every single tree and traverse through the set of generated edges to create the children of a tree.What it does at the moment for each tree is returning the a duplication of the parent node as the child nodes and that is a problem.Can anyone related with this problem help.Your help will be appreciated.
    The code
    TreeNode class
    package SPO;
    import java.util.*;
    public class TreeNode
            Edge edge;
            TreeNode node;
         Vector childrens = new Vector();
            public TreeNode(Edge edge)
                    this.edge = edge;
            public synchronized  void insert(Edge edge)
                    if(edge.fromNode == this.edge.toNode)
                            if(node == null )
                                    node = new TreeNode(edge);
                                    childrens.add(node);
                            else
                        node.insert(edge);
                                    childrens.add(node);
    Tree class
    package SPO;
    import java.util.*;
    public class Tree
            TreeNode rootNode;
         public Tree()
                    rootNode = null;
            public Tree[]  createTrees(Vector initTrees,Vector edges)
                   Tree [] trees =  new Tree[initTrees.size()];
                   for(int c = 0;c < trees.length;c++)
                      trees[c] = (Tree)initTrees.elementAt(c);     
                   for(int i = 0;i < trees.length;i++)
                            for(int x = 0;x < edges.size();x++)
                                    Vector temp = (Vector)edges.elementAt(x);
                                    for(int y = 0;y < temp.size();y++)
                                           trees.insertNode((Edge)temp.elementAt(y));
    return trees;
    public void printTree(Tree tree)
    System.out.print("("+tree.rootNode.edge.fromNode.getObjName()+","+tree.rootNode.edge.toNode.getObjName()+")");
    Vector siblings = tree.rootNode.childrens;
    for(int i = 0; i < siblings.size();i++)
    TreeNode node = (TreeNode)siblings.elementAt(i);
    System.out.print("("+node.edge.fromNode.getObjName()+","+node.edge.toNode.getObjName()+")");
    System.out.println();
    public Vector initializeTrees(Vector edges)
    Vector trees = new Vector();
    for(int i = 0;i < edges.size();i++)
    Vector temp = (Vector)edges.elementAt(i);
    for(int j = 0;j < temp.size();j++)
    Tree tree = new Tree();
    tree.insertNode((Edge)temp.elementAt(j));
    trees.add(tree);
    return trees;
    public synchronized void insertNode(Edge edge)
    if(rootNode == null)
    rootNode = new TreeNode(edge);
    else
    rootNode.insert(edge);
    EdgeGenerator class
    package SPO;
    import java.util.*;
    import k_means.*;
    public class EdgeGenerator
         public EdgeGenerator()
    public Vector createEdges(Vector dataPoints)
    //OrderPair orderPair = new OrderPair();
    Vector edges = new Vector();
    for(int i = 0;i < dataPoints.size()-1 ;i++)
    Vector temp = new Vector();
    for(int j = i+1;j < dataPoints.size();j++)
    //Create an order of edges
    Edge edge = new Edge((DataPoint)dataPoints.elementAt(i),(DataPoint)dataPoints.elementAt(j));
    temp.add(edge);
    edges.add(temp);
    return edges;
    Edge class
    package SPO;
    import k_means.*;
    public class Edge
    public DataPoint toNode;
    public DataPoint fromNode;
    public Edge(DataPoint x,DataPoint y)
    if (x.getX() > y.getX())
    this.fromNode = x;
    this.toNode = y;
    else
    this.fromNode=y;
    this.toNode = x;
    Entry Point
    package SPO;
    import java.util.*;
    import k_means.*;
    public class Tester {
         public static void main(String[] args)
              Vector dataPoints = new Vector();
              dataPoints.add(new DataPoint(140, "Orange"));
              dataPoints.add(new DataPoint(114.2, "Lemmon"));
              dataPoints.add(new DataPoint(111.5, "Coke"));
              dataPoints.add(new DataPoint(104.6, "Pine apple"));
              dataPoints.add(new DataPoint(94.1, "W grape"));
              dataPoints.add(new DataPoint(85.2, "Appletizer"));
              dataPoints.add(new DataPoint(84.8, "R Grape"));
              dataPoints.add(new DataPoint(74.2, "Sprite"));
              dataPoints.add(new DataPoint(69.2, "Granadilla"));
              dataPoints.add(new DataPoint(59, "Strawbery"));
              dataPoints.add(new DataPoint(45.5, "Stone"));
              dataPoints.add(new DataPoint(36.3, "Yam"));
              dataPoints.add(new DataPoint(27, "Cocoa"));
              dataPoints.add(new DataPoint(13.8, "Pawpaw"));
    EdgeGenerator eg = new EdgeGenerator();
    Vector edges = eg.createEdges(dataPoints);
    Tree treeMaker = new Tree();
    Vector partialTrees = treeMaker.initializeTrees(edges);
    Tree [] trees = treeMaker.createTrees(partialTrees,edges);
    for(int i = 0;i < trees.length;i++)
    treeMaker.printTree(trees[i]);
    The program output
    Each and every "@" symbol represents the start of a tree
    @(Orange,Lemmon)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)
    @(Orange,Coke)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)
    @(Orange,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Orange,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Orange,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Orange,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Orange,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Orange,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Orange,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Orange,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Orange,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Orange,Cocoa)(Cocoa,Pawpaw)
    @(Orange,Pawpaw)
    @(Lemmon,Coke)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)
    @(Lemmon,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Lemmon,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Lemmon,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Lemmon,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Lemmon,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Lemmon,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Lemmon,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Lemmon,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Lemmon,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Lemmon,Cocoa)(Cocoa,Pawpaw)
    @(Lemmon,Pawpaw)
    @(Coke,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Coke,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Coke,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Coke,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Coke,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Coke,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Coke,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Coke,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Coke,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Coke,Cocoa)(Cocoa,Pawpaw)
    @(Coke,Pawpaw)
    @(Pine apple,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Pine apple,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Pine apple,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Pine apple,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Pine apple,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Pine apple,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Pine apple,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Pine apple,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Pine apple,Cocoa)(Cocoa,Pawpaw)
    @(Pine apple,Pawpaw)
    @(W grape,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(W grape,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(W grape,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(W grape,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(W grape,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(W grape,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(W grape,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(W grape,Cocoa)(Cocoa,Pawpaw)
    @(W grape,Pawpaw)
    @(Appletizer,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Appletizer,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Appletizer,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Appletizer,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Appletizer,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Appletizer,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Appletizer,Cocoa)(Cocoa,Pawpaw)
    @(Appletizer,Pawpaw)
    @(R Grape,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(R Grape,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(R Grape,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(R Grape,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(R Grape,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(R Grape,Cocoa)(Cocoa,Pawpaw)
    @(R Grape,Pawpaw)
    @(Sprite,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Sprite,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Sprite,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Sprite,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Sprite,Cocoa)(Cocoa,Pawpaw)
    @(Sprite,Pawpaw)
    @(Granadilla,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Granadilla,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Granadilla,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Granadilla,Cocoa)(Cocoa,Pawpaw)
    @(Granadilla,Pawpaw)
    @(Strawbery,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Strawbery,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Strawbery,Cocoa)(Cocoa,Pawpaw)
    @(Strawbery,Pawpaw)
    @(Stone,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Stone,Cocoa)(Cocoa,Pawpaw)
    @(Stone,Pawpaw)
    @(Yam,Cocoa)(Cocoa,Pawpaw)
    @(Yam,Pawpaw)
    @(Cocoa,Pawpaw)

    Your program description makes no sense. What exactly is it supposed to do?
    Your errors make no sense. What is it doing wrong?
    Your program output makes no sense. Look up pre-order, in-order, and post-order notation for representing trees. Pick one of those that you think would be best. I would go with pre-order. Because what you are doing isn't understandable.
    By the way, I think your concept of a tree is flawed. A node in a tree has 3 things. it has a reference to its parent, it has references to any of its children, and it has some key value that represents the node (if each node were represented by numbers, the value would be an integer or something). In the case of the root, its reference to its parent is null. I don't know what you are doing with your tree, but it is highly confusing.

  • How to read the files in different directories

    how to read the files in different directories here directory names will change dynamically under root node.
    let me say
    rootnode---->subnode1
    >subnode2
    >subnode3
    >subnode n
    how to specify these in file adapter.

    Hi
    look at this thread your problem is solved here
    File Adapter
    Regards
    Abhishek
    Edited by: Abhishek Agrahari on Dec 16, 2008 11:37 AM

  • How to read the current selection in a table.

    Hello Experts,
    I've this issue with the web dynpro. I have a Adaptive Webservice Model in web dynpro. And I have three tables in the UI. When a row is selected in the first table, the second table is populated with the appropriate data (using a method in the web service.) the same applies to the third table, when the a row is selected in the second table, the third table has to be populated with the appropriate data. The methods in the web service are all working fine. However, in web dynpro, I am not able to figure out on how I read the selected row in a table. Any information on how to resolve this would be really really helpful.
    <
    wdContext.currentGetMailElement().setProfileID("-Should be read from the selected row in the table.");
    wdThis.wdGetMailControllerController().executeGetMail();
    >
    regards,
    Sam.

    Hi Samuel,
    I didnt clearly understood  your problem. When you are selecting a particular row in a table you are executing a web service named Get Mail. Are you passing any input parameter(any selected row data)  while executing a web service. And when you get the response node where you have a attribute in the node getmail. Am I right.
    If this is the case, then first check if the GetMail node is present or not by comparing it will null or checking its size. If the node is null then you will not get attribute as the element itself is null as nothing is retrieved in response. And if the node is not null then the element at 0th position is selected by default. you can retreieve the attribute by directly using the following code
    if(wdContext.nodeGetMail() !=null)
        String profileId= wdContext.currentGetMailElement().getProfileID();
    Check if this works for you.
    Regards,
    Ardhendu Sarkar

  • How to Get the Parent - Child Relationship

    Hi ,
    In my application having 100 tables with parent - child releation ship without using casecade constraints
    i want to delete the parent with child and sub child records
    Example
    Table - 1
    parent1
    child 2
    Table - 2
    Child 1 - Parent 1
    Parent 2
    Table - 3
    Child 1 - Parent 2
    Parent 3
    Table - 4
    Child 1 - Parent 3
    How to delete the parent table ? Is it any scripts available ?
    Regards
    Sudhakar P.

    Hi,
    1) Firstly identify the parent tables using
    SELECT a.table_name, 0
    FROM user_tables a, user_tab_columns b
    WHERE a.table_name = b.table_name
    store these in one table say ID_table
    2) Identify dependent tables and sore in table say table_dependency using
    SELECT LEVEL, parenttable, parentcol, childtable, childcol
    FROM (SELECT UNIQUE parenttable, parentcol, childtable,
    b.column_name childcol
    FROM (SELECT p.table_name parenttable,
    k.column_name parentcol,
    k.POSITION pos,
    c.table_name childtable,
    c.constraint_name CONSTRAINT
    FROM all_constraints p,
    all_constraints c,
    all_cons_columns k
    WHERE p.constraint_name =
    c.r_constraint_name
    AND c.r_constraint_name =
    k.constraint_name
    AND p.constraint_type IN ('P', 'U')
    AND c.constraint_type = 'R'
    AND p.table_name != c.table_name
    ORDER BY p.table_name,
    c.constraint_name,
    k.POSITION) a,
    all_cons_columns b
    WHERE a.CONSTRAINT = b.constraint_name
    AND a.pos = b.POSITION)     
    3)Now using these details find tables without cascade rule as below
    SELECT *
    FROM table_dependency
    WHERE child_table IN (
    SELECT DISTINCT table_name
    FROM user_constraints
    WHERE constraint_type = 'R'
    AND delete_rule <> 'CASCADE'
    AND table_name IN (SELECT child_table
    FROM table_dependency)
    AND r_constraint_name IN (
    SELECT constraint_name
    FROM user_constraints
    WHERE table_name IN (
    SELECT table_name
    FROM id_table
    UNION
    SELECT child_table
    FROM table_dependency))
    AND table_name NOT IN (
    SELECT table_name
    FROM id_table));

  • How to get the parent Frame of a component ?

    Hi,
    I'm wondering how to get the parent JFrame (or JDialog) of a component.
    Thanks for tips

    I'm using this code:
    public Component getFrame(Component comp)
        Component frame = comp;
        while ((frame != null) && !(frame instanceof Frame))
            frame = frame.getParent();
        if (frame == null)
            frame = comp;  // no parent found
        return frame;
    }

  • How to Read the GUID of the current Transaction.

    Hi
    I am writing a new Function Module, which i will use in the Search Help. I need to process the data using this Function Module. For the same, i need to read the data from the current Transaction. I will be using CRM_ORDER_READ for the same. However, i need to READ the "Header_Guid" before.
    Can anyone help. How to read the GUID of the current Transaction?
    Thanks and Regards
    Jaideep

    Hi Jaideep,
    From where you are going to call this FM ? Are you planning to Implement some BADI or from some BSP application ? If from BSP application then code will look something like this.
      DATA: current           TYPE REF TO if_bol_bo_property_access.
      DATA: dref              TYPE REF TO data.
      DATA: lv_guid           TYPE crmt_object_guid.
    FIELD-SYMBOLS: <l_data> TYPE data.
    IF iterator IS BOUND.
        current = iterator->get_current( ).
      ELSE.
        current = collection_wrapper->get_current( ).
      ENDIF.
      TRY.
          dref = current->get_property( 'GUID' ).          
        CATCH cx_sy_ref_is_initial.
          RETURN.
      ENDTRY.
      ASSIGN dref->* TO <l_data>.
      CLEAR: lv_guid.
      lv_guid = <l_data>.
    and you will have the current transaction guid. Since I am not sure at what point of time you are trying to get the guid so I have given you the code at the context node BTADMINH level.
    Hope this will give you some idea.
    Thanks,
    Vikash.

  • BOL: How to read the value of an attribut

    Hiii experts,
    I'm new in ABAP programming.
    My intention is to read the value of a context attribut.
    This attribut ist not in form of a struct attribut. To read an struct attribut, I know to get the value, for example:
    value ?= me->typed_context->BP_ADDR->collection_wrapper->get_current( ).
      CHECK value IS BOUND.
      value->get_property_as_value(
        EXPORTING
          iv_attr_name = 'CITY'
        IMPORTING
          ev_result    = value_city).
    But my problem is, that I have an attribut, which you can not find in the BOL browser, because it is not in form of a struct.
    Can anybody help me, how to read the value of this kind of attributs.
    Thank you very much in advance fpr your help,
    John

    Hii Clemens,
    first of all, my concern deals with WebUI.
    I expect to read the value of an attribut. I know how to read the value of an attribut, which can be found with the same description in the bol browser, as you know you can read it with:
    value ?= me->typed_context->BP_ADDR->collection_wrapper->get_current( ).
      CHECK value IS BOUND.
      value->get_property_as_value(
        EXPORTING
          iv_attr_name = 'CITY'
        IMPORTING
          ev_result    = value_city).
    Now, I have an attribut of an context node which has a different name as in bol browser. If I want to read the value with the code above I get an error message. Thatswhy I referenced a collection of the context node to read this attribut.
    Can anybody say me how the value of the attribut, can I use the methode get_property ?
    greetings,
    J

  • How to check the parent process chain of a meta chain

    Hello Friends,
    Recently I joined a new project, which is of environment BW 3.0. I am trying to find the dependent process chain's parent, but could'nt able to find them. I went through all the process chains manually to check whther the dependent process chain is mentioned in them, but could'nt find any......
    Can any of you help me to know how to find the parent process chain of a meta chain ?
    I really appreciate your time, will be awarding points to any answers.......
    Thanks,

    Hello Radhan,
    thanks for your quick reply. I searched the table based on your advice, but i could'nt get the parent process chain's name. Can you throw some more ideas please..........
    Thanks,

Maybe you are looking for

  • Install windows 8 on an existing arch installation

    Hi Friends, I don't know if this is the correct place to ask but after many hours of googling, I am asking this question. I had two operating systems installed on my computer which I dual booted with grub: Windows 7 and Arch linux (Archlinux is still

  • What is the best way to manage photo's with multiple login accounts?

    There are three people in my household and each has their own login into the computer. I also have and external drive.  Space is becoming short on the computer, so I want to move all my photos and music to the external drive.  I have moved all the mu

  • Oracle DB 11g Release 2 installation error

    Hi, I have download latest Oracle DB 11g R 2 from OTN. While during setup i am getting the below errors 1) Oracle Database Configuration -- "Failed" 2) Oracle Database Configuration Assistant "Failed" I am not able to connect the DB with SQL Develope

  • Zen X Fi 2 Calander

    Does anyone use the Calander/Events part of the X Fi 2? If so, what program do you use to update the Calander on the X Fi?

  • Hotmail and Aol adresses bouncing my newsletters since this month

    Hello, This month, the last newsletter I sent reported hard bounces from some of my customers with hotmail.com and aol.com email adresses. The report says "bad destination system adress (5.1.2. bad destination system: no such domain)" I´m certain tha