Structure Mapping Question Selected node copying

Dear experts,
I would like to know the following. I have an Idoc to xml-file scenario. The xml is provided. There are for each row in the idoc a number of similar segments (1..unbounded). I want to copy only those segments if they have a particular value, this is always one segment from this header, can never be more with the same value in VAL. Like this:
Source:
<HEADER>
  <SEGMENT>
    <XAL>555</XAL>
    <VAL>name one</VAL>
  </SEGMENT>
  <SEGMENT>
    <XAL>666</XAL>
  </SEGMENT>
  <SEGMENT>
    <XAL>777</XAL>
    <VAL>name three</VAL>
  </SEGMENT> 
</HEADER>
As a result I want to map only the value from VAL where in that same segment XAL=777
So:
<TARGETHEADER>
   <VAL>name three</VAL>
</TARGETHEADER>
How do I accomplish this?
Kind regards.

Auke,
As said by patrick use IF Without ELSE.
Do the logic,
XAL & Constant(777) -
>equals----->IF Without else -
>Target
Choose equals function under Text category.
raj.

Similar Messages

  • Mapping Question - Two Nodes

    Hi PI Cracks,
    I'm working on PI 7.1 and got a problem due a grafical message mapping.
    I have a source message with 2 nodes one holds header information:
    <header> Occurrences 1:1
    <head_field1>
    <head_field2>
    </header>
    <position> Occurrences 0:unbounded
    <position_field1>
    <position_field2>
    <position_field3>
    <position_field4>
    </position>
    In my target structure I have:
    <target> Occurrences 1:1
    <item> Occurrences 0:unbounded
    <field1>
    <field2>
    <field3>
    </item>
    </target>
    So now my problem is, I need to get a value from header structure in every
    item line on target side. Currently it's every time only in the first target item
    not in all that follows.
    How to solve this within graphical mapping?
    Regards Matt

    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/b9af5e71-0701-0010-d0b8-f612fb6593dd
    http://help.sap.com/saphelp_nw04/helpdata/en/03/398c4024d26e1de10000000a1550b0/content.htm
    /people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool

  • Structured mapping

    Hi
    Is there anything like structure mapping in xi ?? or otherwise whatever the mappings that we use like ABAP, XSLT, JAVA etc .......will be called as structure mapping ?? If I got to choose out of these which XI supports
    a. Structure Mapping
    b. Node mapping
    c. Value Mapping
    d. Functional Mapping
    then I believe value mapping is the only one that XI supports. plz correct  me if I am wrong.
    thanks
    kumar

    Kumar,
    As far as my references and understanding the answer to your question is
    <b>Structure Mapping</b>  & <b>Value Mapping</b>.
    <b><i><b>SAP Definition:</b></i></b>
    Define Mapping rules to assign fields that are semantically identical - <b>Structure Mapping</b>
    Conversion rules to transfer the field content to target format -<b>Value Mapping</b>.
    Best regards,
    raj.
    Message was edited by:
            Raj

  • Right click select node in tree (for a standalone Air app)?

    For the sake of userfriendliness (in regard to a context menu) I wold like to "move" the selected node in a tree to the node that currently has the focus when right clicking it - like how the context menu access in windows file explorer works (focus and selected item are always the same  when right clicking).
    In worst case scenario I would like to disable a created context menu if the selected node and the node that currently has the focus are not the same).
    Now users can get confused when right clicking to access my context menu, in the tree structure, if the selected node and the node they are currently hovering over (and thus are in focus) are different.
    I was thinking of finding which node currently has the focus and then making that node the selected node - but I cant get it to work:-).
    Please, help a beginner.

    Hi,
    Duplicate thread of
    http://swforum.sun.com/jive/thread.jspa?threadID=64518
    MJ

  • Value mapping,Structure mapping

    Hi GURUs,
    I need inforamtion regarding structure mapping.
    conversion rules,Node , boolean,constant etc example.
    I will give points to every one.

    Hi ,
    The following websites wil provide u with required solution:
    Excellent PDF Document on Mapping
    http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf
    Mapping Development with the ABAP Workbench
    http://help.sap.com/saphelp_nw04/helpdata/en/10/5abb2d9df242f6a62e22e027a6c382/content.htm
    ABAP Mappings
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm
    how to create a flat file out of an IDoc-XML by means of an ABAP mapping program and the J2EE File Adapter.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    How to Use ABAP Mapping in XI 3.0
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    cheers!
    gyanaraj
    ****Pls reward points if u find this helpful

  • Apply XSLT  while importing the xml to the selected node in structure view

    Hi All,
    I would like to apply XSLT while importing the xml file to the selected node in the structure view.
    How to go about it?
    Thanks
    Sakthi

    Hi All,
       Got the solution,
                    UIDRef documentUIDRef = ::GetUIDRef(activeContext->GetContextDocument());
                InterfacePtr<IDocument> document(documentUIDRef, UseDefaultIID());
                InterfacePtr<IXMLImportOptionsPool> prefsPool( document->GetDocWorkSpace(), UseDefaultIID() );
                InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());
                InterfacePtr<IK2ServiceProvider> serviceProvider(serviceRegistry->QueryServiceProviderByClassID(kXMLImportMatchMakerSignal Service,     kXMLThrowAwayUnmatchedRightMatchMakerServiceBoss));
                InterfacePtr<IXMLImportPreferences> prefs(serviceProvider, IID_IXMLIMPORTPREFERENCES);
                XMLImportPreferencesInitializer initializer(prefs, prefsPool);
                bool16 prefBool = prefs->GetNthPrefAsBool(0);
                prefs->SetNthPref(0, kTrue);
    The above code set the import option "Delete elements, frames, and content that do not match imported XML"
    Thanks
    Sakthi

  • JTree and selected node question

    Hello
    Is it possible to convert the selected node to an int?
    I guess I'm looking for something llike this.
    int nodeNumber = node.getSelectedIndex();
    There is nothing like that in the API, and it would help greatly if I could find a way do this.
    Thanks
    Have a good holiday
    Jim

    From the API for JTree
    public int getMinSelectionRow()
    Gets the first selected row.
    Returns:
    an integer designating the first selected row, where 0 is the first row in the display
    But I think this is based on how many rows are displayed at the present time and might change if the tree is opened above it.

  • Can I Create a New Structured App that's a Copy of a Current One?

    Here's the situation:  I am new to using Dita in Framemaker, but have become competent with the authoring process. I do not understand the development end of things very well, however. What I want to do is to have a second dita structured application that is identical to the first in every way except that in topic.template.fm, the page size will be set to 11x17, not 8.5x11.  And I want to be able to apply that structured application to some of my DITA documents, but not all of them.
    I tried to create such a situation, first by copying and then renaming the DITA folder (I called the new one DITA-BIG) in Adobe FrameMaker 8\structure\xml\ and, within DITA-BIG, making that small change to topic.template.fm.
    I then added the renamed structured app to structuredapps.fm (again, I did a copy and paste of the DITA-Topic-FM element already there), changing the name of the element to Dita-TopicBig-FM and the URLs to point to those in the DITA-BIG directory.
    The new structured application appears in Framemaker when I select StructureTools --> Set Structured Application, and I can select/apply it to one of my documents. However, the document's page size doesn't change. I tried saving the document, closing and reopening the document, closing and reopening Framemaker. The new, larger page size set in topic.template.fm in the DITA-BIG structured app. is ignored.
    If I change the page size in the original topic.template.fm file, the document that is supposedly using the new structured app changes size to correspond to the template in the old structured app.  But I need that original template to stay at its original 8.5x11 page size.
    I am new to working with such files so I don't know if I missed something or if what I am attempting cannot be done.
    Any advice?

    Ok, it worked.
    Thank you very much for your help and patience with my followup questions.
    I want to describe one more thing that was not obvious to me.  When I got all of this done and tried to get a help topic to use the new template, I did it wrong at first. What I tried was to open the xml file, then open the StructureTools menu and select "Set StructuredApplication."  From the long list of applications that appears, I chose Dita-Topic-Bigpage-Fm (my applicaiton clone that contained the modified template).  Then I saved the file, but didn't notice any changes in my page size. Even closing and reopening the file and closing and reopening Framemaker, didn't seem to have an effect. When I chose any other structured application (do not try this at home!) I got pretty spectacular results: many error messages, and one time it crashed Framemaker. But nothing happened when I chose my "bigpage" clone application.
    Eventually I tried to set the structured application when I opened up the xml file. At File - Open, a little window always appears that lets you select a few structured application choices among the many available.When I did this, the file finally opened with the large page size specified in my cloned application.
    Keywords:
    clone a template
    clone a structured template
    cloning a template
    copy a template
    copying a template
    use a different structured template
    use two structured templates
    use another template
    apply another structured template
    copy a structured application
    clone structured application
    apply my own structured application
    use two structured templates
    use two structured applications
    dita structured applications

  • Join differend source node structures to one destination node

    Hello world,
    I am currently struggling with a mapping where I try to create destination structures from different source structures. In the following xml I tried to illustrate my target:
    <sourceMessage>
    <part1>
    <struct1>
    <key>1</key>
    <value>hello</value>
    </struct1>
    <struct1>
    <key>2</key>
    <value>hello</value>
    </struct1>
    <struct1>
    <key>3</key>
    <value>hello</value>
    </struct1>
    </part1>
    <part2>
    <struct2>
    <id>4</id>
    <content>world</content>
    </struct2>
    <struct2>
    <id>5</id>
    <content>world</content>
    </struct2>
    </part2>
    </sourceMessage>
    <destinationMessage>
    <struct>
    <key>1</key>
    <value>hello</value>
    <source>struct1</source>
    </struct>
    <struct>
    <key>2</key>
    <value>hello</value>
    <source>struct1</source>
    </struct>
    <struct>
    <key>3</key>
    <value>hello</value>
    <source>struct1</source>
    </struct>
    <struct>
    <key>4</key>
    <value>world</value>
    <source>struct2</source>
    </struct>
    <struct>
    <key>5</key>
    <value>world</value>
    <source>struct2</source>
    </struct>
    </destinationMessage>
    I tried to solve this by using a Table Loop Functoid: First input is <Struct1>, second is the number of lines I need, namely 3, next input values are <key> and <value> of <Struct1> ,<Struct2> , <id> and <content>
    and constant values for the destination message to declare the <source> value, "struct1" and "struct2"
    next I declared the table looping grid:
    first row: key, value, "struct1", second row: id, content, "struct2"
    When extracting the result with a Table Extractor Funtoid to the destination schema I am facing the problem that I always get a pair of <struct1> and <struct2> depending on the count of <struct1> in the source message. the values from <struct1>
    are correct, the values from <struct2> are always repeating the first <struct2>...
    so this is what I get as result:
    <destinationMessage>
    <struct>
    <key>1</key>
    <value>hello</value>
    <source>struct1</source>
    </struct>
    <struct>
    <key>4</key>
    <value>world</value>
    <source>struct2</source>
    </struct>
    <struct>
    <key>2</key>
    <value>hello</value>
    <source>struct1</source>
    </struct>
    <struct>
    <key>4</key>
    <value>world</value>
    <source>struct2</source>
    </struct>
    <struct>
    <key>3</key>
    <value>hello</value>
    <source>struct1</source>
    </struct>
    <struct>
    <key>4</key>
    <value>world</value>
    <source>struct2</source>
    </struct>
    </destinationMessage>
    Any ideas of what I am doing wrong here? Any other ideas how to solve this?
    Thanks in advance

    Hi,
    You can just use the Looping Functoid with the first parameter as "struct1" and second parameter as "struct2" and the output mapped to "struct". Rest of the links mapped one to one.
    Map the struct1 node & struct2 node one by one to source in the destination schema with Source Link property as "Copy Name" for both links.
    Hope this will help.
    HTH,
    Sumit
    Sumit Verma - MCTS BizTalk 2006/2010 - Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

  • Mapping debug - target node not being created

    Hi Gurus,
    I have an issue in my mapping. Let's say I have a source structure:
    ><body>
    >  <maintag>
    >    <value>1</value>
    >  </maintag>
    >  <maintag>
    >    <value>2</value>
    >  </maintag>
    ><body>
    I need to map maintag->target node but only in case if value eq 2. I used a Ifw/oElse function which creates target queue
    SUPPRESS(grey)
    SUPPRESS(cyan)
    SUPPRESS(grey)
    [] (dark grey)
    which is fine, because only 2nd context matches the condition. But no target node is being created!
    Why? How to resolve this?
    Thnak you!
    Olian

    Hi Olian,
    Changing the context to one level up is working for me.
    Please refer to the following links:
    http://farm4.static.flickr.com/3055/2828227942_e71da4a823_o.jpg
    http://farm4.static.flickr.com/3134/2828228398_92f5ba41e0_o.jpg
    Here the context of value was set to body in the sample DT i created.
    regards,
    venkat.

  • Problem selecting and copying items

    I use my iPad Air to work on groups in the photo sharing site, flickr.  Since installing IOS8 I am having extreme difficulty in selecting and copying awards.  Selection is done by dragging through the html, and then clicking on a blue icon "COPY"  Sometimes the code saves correctly, sometimes it doesn't, sometimes it changes to code previously saved  It is driving me nuts.  Can anyone help.
    I have tried restarting the iPad, but that didn't help.

    Thanks Mark, but you answered what I already included within my question. I wrote "So it's that, or disabling the hyperlink, move the object normally, and putting the hyperlink on again"
    With that, to "Uncheck the "Make hyperlinks active" you need to first select the object, and you end up back to the first and second problem I wrote.

  • How to select node in JTree without firing event?

    I have got standard situation. JTree in the left panel, and several edit boxes in right panel. Certainly, I have TreeSelectionListener, which on every tree node selection shows corresponding model values in edit boxes.
    I'd like to implement next logic:
    1. Something was changed in any edit box in right panel. Model has been changed.
    2. User clicks on different node in tree.
    3. Dialog "Message was not saved. Save?" with Yes/No/Cancel buttons are shown.
    Yes/No buttons are easy to handle.
    Question is about Cancel. I'd like on Cancel button left all edit boxes in their present state (do not restore values from saved model) and select back node, which wasn't saved.
    Problem is next. If I select node by setSelectionPath or smth like that, but... JTree fires event and my listener receives onTreeItemSelected back, which checks that node wasn't saved and ......
    Who does have any idea, or have done similar tasks? How can I select node and do not allow tree fire event this time?
    Thanks in advance.

    First, as soon as the model changes (when editing any
    combo box) some flag will be set. Now the logic which
    updates the combo boxes will do it only on a change of
    the current node and (this is new) if the flag wasn't
    set. You should have some flag anyway because somehow
    you must determine when to show the dialog, shouldn't
    you?Yes, I have got this logic implemented. But it's only the half :)
    I know exactly when my model has been changed, but if it was changed, i'd like to ask user what to do next - svae/loose changes/cancel
    And on cancel i'd like to select last edited tree node and do not get event from tree at that moment.
    >
    Second way, prevent selecting a new node if that flag
    has been set. You could do this by subclassing
    DefaultTreeSelectionModel and overriding some methods
    (setSelectionPath() et al).Ok. I'll investigate this.
    >
    MichaelThanks.

  • Dbms_xslprocessor return node copy

    Recently I converted my code from sys.xmldom and sys.xslprocessor packages to xdb.dbms_xmldom and xdb.dbms_xslprocessor packages. And what supprised me is that dbms_xslprocessor.selectSingleNode() returns a copy of the selected node not a reference. My code was able to modify the xml tree before now failed. Is there a fix to this bug? I am using 9.2.0.5 patch. Thanks.

    Hi,
    Even I tried with variable based indexing
    But for me its returing all nodes irrespective of index varible value

  • Handeling mapping with multiple nodes

    Hi,
                We are doing an IDOC to SOAP scenario, in which we have multiple nodes in source structure. In destination structure we have one node having multiple occurences (1..99). We are trying to do the mapping in such a way that on the basis of no. of nodes at source side, nodes at destination side should be created.
                                  Any idea how to perform this mapping? Is it necessary to use BPM for this?

    1. Node 1 -> count ->
    2. Node 2 -> count ->
    3. Use ADD(std function) 1 and 2
    4. then after step 3 use UDF given below and then mapp to target node
    create advance UDF function and click on radio button "Queue".
    in the imports section enter java.lang.;java.util.;java.lang.reflect.;java.io.;
       //write your code here
    String e = a[0];
      int b = Integer.parseInt(e);
    for(int i=0;i<b;i++)
    result.addValue("1");
    result.addContextChange();
    This is working for me...
    suppose node1 occurs 3 times and node2 occurs 2 times the target node will occur 3 + 2 = 5 times
    Giving points is another way to say thanks
    Edited by: Tarang Shah on Mar 4, 2009 2:06 PM

  • Htree-Value of the parent's selected node

    Hi all!
    I have an htree in oracle forms10g and I would like to have the value of the parent selected node. There is a function to trap the value of the selected node but I also need the parent's value too.
    My tree is structured like this
    company--> department--> service-->service_status.
    the service_status can be active or no_active. If I click on let's say "active"
    I would like to have all the records where service_status is equal to "active" for the service located above the "active" selected

    I would like to have all the records where service_status is equal to "active"
    for the service located above the "active" selectedI'm not sure what you mean by that, but try "ftree.get_tree_node_parent(my_tree, my_node);" for getting the parent.

Maybe you are looking for

  • Plant wise stock report

    Dear All, I want get a report from Apr to March of a fiscal year. The report should contain plant wise purchase, consumption, opening stock and closing stock values. How can I get the report. Regards, Venkat

  • Major heat problem. should i be able to hear the fans?

    my black macbook with 1gb ram is getting very hot when i use front row to play videos at full screen. after about 30-40 mins the left corner of the macbook is so hot i can only touch it for a second or so. then without warning the video just freezes.

  • ABAP Proxy Activsation Error

    Hi: I am tryign to activate an ABAP Proxy in an ECC backend, and I get an error 'No Vendor Specified' with no further details, and the activation is terminated. Has anyone seen this, and what needs to be done to fix this. BTW:I am using SAP PI 7.0(SP

  • Merge table indexes fill factor

    Shouldn't indexes such as MSmerge_current_partition_mappings.ncMSmerge_current_partition_mappings have a fill factor other than 0? I am getting many page splits on this and other merge table indexes. My server has many of the indexes set to 0. Using

  • I need to format my T60 because I want to clean it out.

        The message that comes up is Setup did not find any hard disk drives installed in your computer, even though I have a hard drive in it and when Im on the computer it makes a sound and the hard drive stops to stop it from shocking. I have to have