Abap mapping: remove a parent or child node.

Hi all,
I will trying to remove a parent node (and all childs related to it) or a specific child (field) om my XML input message to obtain a new output message.
Reading the meaning of the methods remove_node and remove child (if_ixml_node) I can not find a solution in writing the right Abap code.
My ouput document is so defined:
data: outcode type ref to if_ixml_node.
I receive the following error message when I try to find all possibilities.
Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED_NO
If someone can give me a simple code for solving my issue, I will appreciate this.
Thanks,
Regards,
   Giovanni

Hi,
this link explain the signature that is how to use all the methods  including the method u want
[http://help.sap.com/saphelp_nw04/helpdata/en/bb/57669ddca511d4990b00508b6b8b11/frameset.htm]
and this for complete library for ABAP mapping[http://help.sap.com/saphelp_nw04/helpdata/en/bb/57669ddca511d4990b00508b6b8b11/frameset.htm]
Thanks and regards,
Kubra Fatima.

Similar Messages

  • Programmatic, using bean add Parent and child nodes in af:tree dynamically

    Hi All,
    i have to add parent and child nodes dynamically in tree .
    Example :
    i have created a tree like below.On click of button i will get value A ,from pl/sql function i will A1 and A 2 values.which i have to show in pop as tree.
    A
    |-----A1
    |-----A2
    If user clicks on A2.I have to catch A2 value and pass to pl/sql function which gives A2.01 and A2.02 values.
    A
    |-----A1
    |-----A2
    |------A2.01
    |------A2.02.
    A, A1 ,A2,A2.01 ...........values comes from pl/sql funchtion .
    thanks in advance ......... any suggestion will greatly helps

    no use ......................

  • How to differentiate parent and child node in af:treeTable ?

    Greetings,
    I have a requirement, I display master child view objects using <af:treeTable> component, When user expands a parent row, I have to make parent row is in read only and expanded(child) row in editable. To accomplish this I have to identify the 'node' whether it belongs to parent or child view object. In this example Tree table binds with EmpVO, There is a view link beteween EmpVO and DepartmentVO.
    <af:treeTable value="#{bindings.EmpVO.treeModel}"
    var="node"
    rowSelection="single" id="tEqSum"
    summary="Employee Summary"
    <af:column sortProperty="#{bindings.EmpVO.hints.LocCity.name}"
    filterable="true" sortable="true" width="90"
    headerText="#{bindings.EmpVO.hints.LocCity.label}"
    id="c3">
    <af:outputText value="#{node.LocCity}" id="ot21"/>
    expandAllEnabled="false">
    </af:treeTable>
    Thanks in Advance,

    Hi,
    You can find out the node depth by using
    #{bindings.<your_tree_binding>.treeModel.depth}Based on the depth, you can decide whether its a parent node or child node (for a 1 level tree- say dept and emp, the depth for parent would be 0 and for the child it would be 1).
    -Arun

  • How to test ABAP mapping used in a Integration Process node

    Hi,
    anyone can suggest me how to debug an ABAP mapping used into a transformation node belonging to an Integration Process ?
    Thanks.
    Francesco

    Hi, Francesco.
    I've debugged ABAP Mapping with SXI_MAPPING_TEST transaction.
    If you have creted a scenario including your ABAP Mapping, you only hace to put the correct sender/sender interface and receiver/receiver interface. You have to put some XML document as an input.
    I wrote in my code the Break-point instruction an debugged the process without problems.
    regards,
    Francisco

  • Find the grand parent of child node

    Hi gurus,
    I have a table with the following structure
    Supp_Num     Parent_Num      Inidicator
         1                  Null                    0
         2                    1                      1
         3                    2                      1
         4                  Null                    0
         5                     4                     1
    For all the parent Nodes the indicator will have '0'
    For all the child Nodes the indicator will have '1'.
    I want to write a sQL code where i provide a child name and it traces back to its root parent . For eg if i provide the procedure with Supp_Num=3 it should traverse back to 1 and give 1 as output
    Thanks in advance

    9ba2a86d-5f7e-4e53-99ee-d675435c2efd wrote:
    Thanks for the reply but i'm expecting Supp_Num =4 as well since its parent for Supp_num=5 . Also i want to write it in a Stored Proc form where i just provide the
    Supp_num as input and i get the root parent node as output.
    Thanks in advance
    You wrote in your original post
    I want to write a sQL code where i provide a child name and it traces back to its root parent . For eg if i provide the procedure with Supp_Num=3 it should traverse back to 1 and give 1 as output
    And my solution did exactly the same. Now if you want the Root details for SUPP_NUM=5, it will provide the root node for same. See below:
    with data as
      select 1 supp_num, null par_num, 0 ind from dual union all
      select 2 supp_num, 1 par_num, 1 ind from dual union all
      select 3 supp_num, 2 par_num, 1 ind from dual union all
      select 4 supp_num, null par_num, 0 ind from dual union all
      select 5 supp_num, 4 par_num, 1 ind from dual
    select *
      from (
            select supp_num, par_num, ind
              from data
             start with supp_num = 5
            connect by supp_num = prior par_num
    where par_num is null;
    SUPP_NUM               PAR_NUM                IND                   
    4                                             0
    You just need to set the START WITH clause with appropriate SUPP_NUM.

  • Problem while handling Parent and child nodes in CE

    Hi all
    I am facing a problem with handling Child and Parent nodes in CE.
    I have a Table in which I have drop downs. On selecting a value in the drop down, I have to take that value and do some action.
    I am trying to access the value in the following ways
    wdContext.nodeParent().currentParentElement().nodeChild().currentChildElement().getVaActivity();
    wdContext.nodeChild ().currentChildElement().getVaActivity();
    When I select the drop down from the first row of the Table the code works fine.
    But when I select other rows, it returns the current value of the first row.
    The lead selection of the parent always returns u20180u2019 even though you have done some action in row 2,3 etc.
    The same code gives the required values in EP 7.0; I.e.: it returns the values form selected row in the table.
    Basic problem is that the current value of parent always returns the first row.
    Following are the Properties of the nodes
    Parent
    Collection Cardinality: 0-n
    Singletone: true
    Child:
    Collection Cardinality: 0-n
    Singletone: false
    Please help
    Regards
    Deepu

    Hi,
       In CE changing dropdown selections doesn't fire table leadselection events. If you want to use a dropdown in a context-driven UI element like a Table, you need to use of event parameter mappings. So here are the steps:
    1. Create a new action for the onSelect event of the dropdown (I will write the code for DropDownByIndex), let's call it Select.
    2. Add a parameter parentElement whose type is same as the type of the parent node element. So from your example it would be IParentElement. Select the chek-box for "Adapt event-handler parameter". This will add a new parameter to the event-handler method onActionSelect called parentElement.
    3. Write this inside wdDoModifyView :
    if (firstTime) {
        IWDAbstractDropDownByIndex ddi = (IWDAbstractDropDownByIndex) view.getElement("<id of DropDownByIndex>");
        ddi.mappingOfOnSelect().addSourceMapping(IWDAbstractDropDownByIndex.IWDOnSelect.NODE_ELEMENT,"parentElement");
    3. If you want to set the lead selection of the table to the row where the dropdown is write this inside the event-handler:
    wdContext.nodeParent().setLeadSelection(parentElement.index()); //parentElement is the event handler parameter added through the action.
    Note that the event parameter IWDOnSelect.NODE_ELEMENT points to the node element that defines the data mapping for the containing row and not the node element of the source for the dropdown. This has been specfically  added for such a scenario. All this is well documented [here|http://help.sap.com/javadocs/nwce/current/wdr/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDAbstractDropDownByIndex.IWDOnSelect.html#NODE_ELEMENT].
    Regards,
    Satyajit.

  • Don't see parent and child nodes in tree control with switcher, enclose xml

    Hi, i.m a novice for jdev 11.1.1.2,
    i need to create a tree menu, but when i put the switcher + n°2 face whith link object, inside the tree and
    run my application i don't see the node, but i see the bookmarks that collapease and expand Why ????
    Thanks for your help
    Gio
    enclose xml for better clarification:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:panelStretchLayout id="psl1">
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl4">
    <af:panelSplitter id="ps1" splitterPosition="156"
    inlineStyle="width:534px;">
    <f:facet name="first">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl3">
    <af:panelHeader text="panelHeader 1" id="ph1">
    <f:facet name="context"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    <f:facet name="legend"/>
    <f:facet name="info"/>
    <af:tree value="#{bindings.DepartmentsViewTree.treeModel}"
    selectionListener="#{bindings.DepartmentsViewTree.treeModel.makeCurrent}"
    rowSelection="single" id="t1" var="node">
    <f:facet name="nodeStamp">
    <af:switcher id="s1"
    facetName="#{node.hierType.viewDefName}">
    <f:facet name="DepartmentsView">
    <af:panelGroupLayout id="pgl1">
    <af:commandLink text="#{node}"
    action="#{MainPageBean.departmentRegionLayout}"
    id="cl1">
    <af:setActionListener from="#{node.DepartmentId}"
    to="#{pageFlowScope.TreeKey}"/>
    </af:commandLink>
    <af:commandLink text=" (Edit)"
    action="createEdit" id="cl2">
    <af:setActionListener from="#{node.DepartmentId}"
    to="#{pageFlowScope.DeptTreeKey}"/>
    </af:commandLink>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="EmployeesView">
    <af:commandLink text="#{node}"
    action="#{MainPageBean.employeeRegionLayout}"
    id="cl3">
    <af:setActionListener from="#{node.EmployeeId}"
    to="#{pageFlowScope.TreeKey}"/>
    </af:commandLink>
    </f:facet>
    </af:switcher>
    </f:facet>
    </af:tree>
    </af:panelHeader>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="second">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl2">
    <af:region value="#{bindings.dynamicRegion1.regionModel}"
    id="dynam1" partialTriggers="::t1"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    </af:panelGroupLayout>
    <!-- id="af_one_column_stretched" -->
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Edited by: user595664 on 5-dic-2009 2.54
    Edited by: user595664 on 5-dic-2009 2.57

    Hi,
    you need to provide the full naming for the facet names. So instead of DepartmentsView you provide mypackage.DepartmentsView where you replace mypackage with the package structure of the the ViewObject
    Frank

  • Moving child node's parent in JTree

    hi guys.
    What i have is a Jtree dynamically generated, im trying to re-arrange the nodes inside.
    each nodes and their parents have their own values and been built with DefaultMutableTreeNode.
    So im thinking, to do so i first need to analyse which child node i want to move, then remove it from its current parent, then set the new parent to this node.
    I been thinking of using the values and compare them to do the parent-node matching, however, i have been looking at the APIs without luck, for methods to possible retrieve the values of the childs/parents.
    Or perhaps there is a simpler way,
    Does anybody have a clue where i could find some answers to this problem?
    Cheers, Eric.

    aiwick wrote:
    hi guys.
    What i have is a Jtree dynamically generated, im trying to re-arrange the nodes inside.
    each nodes and their parents have their own values and been built with DefaultMutableTreeNode.
    So im thinking, to do so i first need to analyse which child node i want to move, then remove it from its current parent, then set the new parent to this node.
    I been thinking of using the values and compare them to do the parent-node matching, however, i have been looking at the APIs without luck, for methods to possible retrieve the values of the childs/parents.
    Or perhaps there is a simpler way,
    Does anybody have a clue where i could find some answers to this problem?
    Cheers, Eric.Not sure what the problem is exactly. DefaultMutableTreeNode has methods for retrieving it's parent and child nodes: which is all you need to move nodes in your tree.

  • How to identify the current lead selection is child or parent in rec node

    Hi
    I am using a recursive node to populate a table with TreeByNestingTableColumn as master column. Now my problem is how do I identify if the current selected row in the table is a child or parent? When I get the lead selection value, I find that its the same for the parent and the child. I am setting the isLeaf and hasChildren boolean properties appropriately as false and true for parent and true and false for child. But since the lead selection is returning the same the below rsTableElement always gives me the parent, I always get those parameter values as that of parent. I am writing this inside the onleadSelect event of the table.
    IRsTableElement rsTableElement = (IRsTableElement) wdContext.nodeRsTable().getElementAt(wdContext.nodeRsTable().getLeadSelection());
    In this scenario how do I know if the current selection is made on a child?
    Appreciate for all help and any code snippets.
    Thanks,
    KN.

    Hi KN,
    I guess you want to check if the node that you selected is parent or child.. This can be achieved by using getTreeSelection() method of IWDNode.
    If you write following code in your lead selection action, you can determine the if it is a parent or child node.
    wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeRsTable().getTreeSelection() +"");
    the output will be something like
    <ViewName>.RsTable.0.ChildRsTable.1.ChildRsTable.0.. depending upon which node you have selected.
    That way you can find out if it is a parent or child node.
    Abhinav

  • Reg:abap mapping

    Hi Gurus,
    Can any one help me in abap mapping ,
    where the source and destination nodes and the source and destination structure different and with multiple nodes.
    Thanks & Regards
    Shiva

    Hi,
    Blog -- /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    SDN TV demo to create and test ABAP mapiing - https://media.sdn.sap.com/SDNTV/main.asp?mediaId=128
    How to guide for ABAP mapping.
    https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&
    pdf for ABAP mapping.
    *https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    *https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
    testing ABAP Mapping- Testing ABAP Mapping
    Thanks,
    Shweta

  • Context Mapping: child-nodes of non-mapped parent nodes

    I am somewhat curious about Context Mapping in WebDynpro.
    Which parents nodes need to be mapped in order to map child nodes ? Does a child node has more than one parent node (e.g. grandparent - two steps above) ?
    A.1  -
    MAPPED----
    >    B.1
      - A1.1   NOT MAPPED
      - A1.2   NOT MAPPED
            - A.1.2.1     MAPPED TO>    B.1.2.4
            - A.1.2.2   NOT MAPPED
      - A1.3   NOT MAPPED
    Is it sufficient that only one of these parent nodes (e.g. direct parent node not mapped, but parent node of this parent node is mapped) need to be mapped so that the child node can be mapped ?
    Is this assumption true or not ?
    The SAP library states:
    "Conversely, child nodes of non-mapped parent nodes cannot be mapped, otherwise this would result in irresolvable conflicts at runtime with respect to the parent-child relation in the context and the mapping relation." (http://help.sap.com/saphelp_nw04/helpdata/de/51/a3384162316532e10000000a1550b0/content.htm)
    This statement is not absolutely clear on this issue.

    Let me put it this way
    You have a node vehicle and you have a child node for that the car. The car node have parameters car1, car2.
    Let the vehicle node have parameters veh1 and veh2
    Then if you map vehicle node one to any other node (say in the comp. controller) you have the option of mapping its children i.e veh1,veh2 and carnode.
    You can have that veh1 is mapped and veh2 is not mapped.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car node(may or may not be mapped)
    If instead you try to map only the car node the vehicle node will also get mapped automatically but not it's child parameters like veh1 and veh2.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car nodemapped)
    car1(may or may not be mapped)
    car2(may or may not be mapped)
    Hope this would help.
    Do revert for further clarification
    Regards
    Noufal

  • Abap mapping - get_value from child node

    Hi experts,
    I'm doing an abap mapping, but i have some problems extracting data from XML message.
    I have:
      child = element->get_first_child( ).
      while not child is initial.
           wa_reg-registro = child->get_value( ).
           insert  ZTABLE from wa_reg.
          child = child->get_next( ).
      endwhile
    I can see in my table ZTABLE the expected result, but consecutive blanks are all replaced by exactly one space character .
    Why?
    How can I solve this problem?
    Thanks
    Carme

    Any imput, please

  • IDOC mapping issue (calculation using parent and child fields)

    We are mapping an IDOC to a file for output to a third party.  The IDOC has many segments, some of which are embedded.  This is where I'm having the issue.  I am trying to perform a calculation on a field from the parent node (E1EDP01-MENGE) with the field from the child node (E1EDP05-KRATE) to determine the total tax for that line (qty X rate). 
    <b>Issue:</b> The mapping that is in place is using the same MENGE value for all calculations, even where the E1EDP01 segment is not a parent of the E1EDP05 segment. 
    Please review the screen prints and explain how I can correctly group the E1EDP05 child segments rate field (KRATE) with the corresponding parent segment E1EDP01 quantity (MENGE).
    <b>Example:</b>
    Parent segment, E1EDP01 / Child segment E1EDP05 (There are many E1EDP05 segments for 1 E1EDP01 segment)
    E1EDP01 (parent node)
      E1EDP05 (child node)
    <b>Target structure</b>
    ITEM (parent) --->E1EDP01 is mapped at node level
      -->ITEM_DATA --->E1EDP01 is mapped at node level
      -->ITEM_TAX --->E1EDP01 is mapped at node level
           -->(fields for item_tax)
           -->Record type
           -->Invoice number
           -->Line total
           -->etc...
    I am mapping (E1EDP01-MENGE) for calculation with (E1EDP05-KRATE) to determine tax at the line item level. I have the context set at each Node, E1EDP01 for MENGE and E1EDP05 for KRATE.  I was using CopyValue, but this was using the frist occurence of MENGE for all line items.
    <b>mapping example</b>
    <u><b>*I am using MENGE (Copy_Value) then multiplying by KRATE to get the line item total.  This was causing the same MENGE (because of Copy_Value) for all line items.</b></u>
    E1EDP01-MENGE|Copy_Value|MULT--->TAX_ITEM-LINE_TOTAL
    E1EDP05-KRATE|
    I removed the CopyValue and now I'm getting the following error:
    Cannot produce target element /ns0:MT_DTN_INVOICE1/INVOICE/ITEM/ITEM_TAX[3]/LINE_TOTAL. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    How can I map this so the child records (E1EDP05) are grouped with the correct parent records (E1EDP01)?
    Thanks in advance!
    Michael

    Check this blog:
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    Regards
    Stefan

  • Problem with childs nodes and automatic key mapping in a Data Object

    Hi experts!
    I'm doing the service order tutorial from the mobile help at [this link|http://help.sap.com/saphelp_nwmobile71/helpdata/en/21/9b5b924c3b434fba4767731794b029/frameset.htm] and I have a problem...
    In the topic "Modeling the Equipment Data Object", says you have to mark the "Automatic Key Mapping" checkbox. So when I had to create a third child node ( the location node ) the system raised an exception with the message "Deselect automatic key mapping flag for more than two-level nodes". I'm trying deselecting the flag and creating the location node, but when I want mark again the automatic key mapping flag, this is disabled.
    What can I do to solve this and create the three child nodes with the flag marked? It's a configuration thing?
    Any help it's very welcome. Thanks in advance.
    Best regards,
    Simon.

    The thing is: Its not allowed to use automatic keymapping if you have more than two levels. This is why the message showed up, and this is why its been disabled.
    What automatic keymapping does: Figures out automatically which child node belongs to which parent (by guessing from the field name and type, which fields in the child correspond to which key fields of the parent).
    On three levels, this becomes more complicated => Its disabled.
    How to do keymapping yourself instead of having the DOE do it automatically: Do 'Explicit keymapping' from each child to its parent. Explicit keymapping is done by clicking on the corresponding menu button in the child node. Here you need to associate child node fields (they need not be key fields of the child, but they are allowed to be that as well) to each of its parent nodes key fields (so that each child can be associated to its parent).
    Cheers

  • ABAP MAPPING Querry - How to create Different Target NODE NAME as of Source

    Hi,
    In abap Mapping
    <b>DATA READ FROM SOURCE XML NODE into <u>incode</u></b> ******
    data: incode type ref to if_ixml_node_collection.
    incode = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
    <b>CREATE OUTPUT XML NODE WITH SAME NAME AS <u>'BUSINESS_DAY'</u></b> **
    data: outcode type ref to if_ixml_node.
    outcode = incode->get_item( index = 0 ).
    data irc type i.
    irc = msgtype->append_child( outcode ).
    *<b>BUT TO CREATE OUTPUT XML NODE WITH <u>DIFFERENT NAME AS 'BUSS_DAY'</u></b>*
    data: ws_val type string VALUE 'xyz'.
    data: elementsender type ref to if_ixml_element.
    elementsender = odocument->create_simple_element(
    name = 'BUSS_DAY'
    value = ws_val
    parent = msgtype ).
    <b>Please guide me how I can assign <u>incode</u> value to ws_val.
    So that I can generate <u>OUTPUT XML NODE with different name as of SOURCE XML NODE</u></b>
    i.e. How to create Different Target NODE NAME as of
    Source with same Data
    <Note>: I am using "How to... Use ABAP Mapping in XI 3.0 ver.1.00" and to create different NODE name as of source
    is not given in it.
    Thanks & Regards.

    Hi ABAPers,
    Please Guide Me .....
    <u>This is ABAP Mapping problem in XI.</u>
    <b>How can I read data from incode into ws_val.</b>
    data: <b>ws_val</b> type string
    data: <b>incode</b> type ref to if_ixml_node_collection.
    <b>incode</b> = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
    Best Regards

Maybe you are looking for

  • Select query help for Sales order

    Hi Experts, I have to write a select query to fetch sales orders which are open along with the quantities which are open ( not delivered). What would the best approach for this? Any help is appreciated. Expecting code samples....Thanks Thanks Ricky

  • Error on HP 5610 message

    Error on HP 5610: 0xd05d010d, Reset Power how?

  • Want hp laserjet pro 400 color to print in black by default

    Hi, I recently installed a Laserjet Pro 400 color printer. I know each person can print in B&W by changing the properties at print time but is there a way to default all printing to B&W and if a colour print is required, we change that in the propert

  • Java mapping for EDI order document

    hi, My project is to convert a EDI-850 Purchase Order Document using XI into an R/3 system.I planned t use java mapping So,I had got the java code necessary for the mapping from a tool called ALTOVA XML MAPRFORCE. I have converted the code into a .ja

  • Redirect to another site in business catalyst

    Hello - I have a site that I would like to point my domain name to within business catalyst .  Not sure how to do this without creating an issue with my partner site.  So when people enter in www.mysite.com I want the other site to come up - not the