How to Split messages to other messages using a value as a split-key?

Hi ,
Let's assume that the message is:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:ZXI_IDOCFI_DOCUMENT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
- <XI>
- <item>
<BKTXT>O-244</BKTXT>
<LIFNR>999003</LIFNR>
</item>
- <item>
<BUKRS />
<BKTXT>O-244</BKTXT>
<LIFNR>999003</LIFNR>
</item>
- <item>
<BUKRS />
<BKTXT>O-245</BKTXT>
<LIFNR>999004</LIFNR>
</item>
- <item>
<BUKRS />
<BKTXT>O-245</BKTXT>
<LIFNR>999004</LIFNR>
</item>
- </XI>
</ns0:ZXI_IDOCFI_DOCUMENT
I would like to split it into two messages as the <BKTXT> element is changed(2 times
<BKTXT>O-244</BKTXT> and <BKTXT>O-245</BKTXT> .
The target messages must be
1)
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:ZXI_IDOCFI_DOCUMENT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
- <XI>
- <item>
<BKTXT>O-244</BKTXT>
<LIFNR>999003</LIFNR>
</item>
- <item>
<BUKRS />
<BKTXT>O-244</BKTXT>
<LIFNR>999003</LIFNR>
</item>
</XI>
</ns0:ZXI_IDOCFI_DOCUMENT
and 2)
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:ZXI_IDOCFI_DOCUMENT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
- <XI>
- <item>
<BUKRS />
<BKTXT>O-245</BKTXT>
<LIFNR>999004</LIFNR>
</item>
- <item>
<BUKRS />
<BKTXT>O-245</BKTXT>
<LIFNR>999004</LIFNR>
</item>
- </XI>
</ns0:ZXI_IDOCFI_DOCUMENT
How is it possible to be implemented ?
Is it possible to solved in BPM or in a Mapping program;
Thanks in advance.
Best regards.

Dear  Kumar ,
Thank for your nice blog ,
But Let me underline which is my point,
As XI retrieve rows through JDBC from an oracle table
at the end there is an XML message with N items
as:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:ZXI_IDOCFI_DOCUMENT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
- <XI>
- <item>
<BKTXT>O-244</BKTXT>
<ACCOUNT>999003</ACCOUNT>
</item>
- <item> 
<BKTXT>O-244</BKTXT>
<ACCOUNT>999004</ACCOUNT>
</item>
- <item>
<BUKRS />
<BKTXT>O-245</BKTXT>
<ACCOUNT>999006</ACCOUNT>
</item>
...N items...
- </XI>
</ns0:ZXI_IDOCFI_DOCUM
I have to break this xml into N xml messages according to element <BKTXT> in order to send them to Sap sequentially.  Keep in mind that the <element> is just as the element <ACCOUNT>( is not a root element ).
I guess this is not an easy excercise but i need to solve it urgently.
Best Regards,
Antonis.
Message was edited by: antonis konstantindis

Similar Messages

  • How to assign Tasks to other users using Exchange Web Service.

    How to assign Tasks to other users using Exchange Web Service.
    Any workaround also would help

    Hi Glen,
    I am trying to use ExtendedPropertyType and put in UpdaterItemType as in this code as below. Although it is not updating the Owner
    field.
    I have tried it both by Propertyname and PropertyID. Although new custom property's canbe
    added but to change an existing one like 'Owner' ? Would this be the right method.
    2. And Is ProprertyID a fixed value as 0x811f or does it need to be calculated.
    3. Is 'Owner' the right propertname for assigning a task ?
    Thanks a lot.
    Please see code below for reference.
     PathToExtendedFieldType pathExtended = new PathToExtendedFieldType();
                //pathExtended.DistinguishedPropertySetId = DistinguishedPropertySetType.PublicStrings;
                pathExtended.DistinguishedPropertySetId = DistinguishedPropertySetType.Task;
                pathExtended.DistinguishedPropertySetIdSpecified = true;
                pathExtended.PropertyId = 0x811f;
                pathExtended.PropertyIdSpecified = true;
                //pathExtended.PropertyName = "Owner";
                pathExtended.PropertyType = MapiPropertyTypeType.String;
                ciSetAT.ExtendedProperty = new ExtendedPropertyType[1];
                ciSetAT.ExtendedProperty[0] = new ExtendedPropertyType();
                ciSetAT.ExtendedProperty[0].ExtendedFieldURI = pathExtended;
                ciSetAT.ExtendedProperty[0].Item = "[email protected]";
                SetItemFieldType set1 = new SetItemFieldType();
                set1.Item = pathExtended;
                set1.Item1 = ciSetAT;
                UpdateItemType request = new UpdateItemType();
                request.ItemChanges = new ItemChangeType[1] { new ItemChangeType() };
                request.ItemChanges[0].Item = itemId;
                request.ItemChanges[0].Updates = new ItemChangeDescriptionType[2];
                request.ItemChanges[0].Updates[0] = setstart;
                request.ItemChanges[0].Updates[1] = set1;

  • How to monitor messages using CIDX Communication Channel

    I created a CIDX Communication Channel. XI failed to get a message from the source. How to monitor the messages using CIDX communication channel.

    Not sure about the monitoring but u may recheck the communication channel settings as shown:
    Sender
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0a/512041cfb7f423e10000000a155106/content.htm
    Receiver
    http://help.sap.com/saphelp_nw2004s/helpdata/en/68/1b20410e91f523e10000000a155106/content.htm
    Regards,
    Prateek

  • How to fetch messages using IMAPFolder ?

    Dear Friends,
    Anybody knows how to show messages with IMAPFolder ?
    Thank u.
    Chirag Patel

    I have never seen the class IMAPFolder. Here is a class I wrote that returns a table row that has message information from a folder.
    Use the messagelist method and pass in the folder you want along with the connection url to your server.
    =======================================================================
    =======================================================================
    import java.util.*;
    import java.util.Properties;
    import java.net.*;
    import java.io.*;
    import java.lang.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class EmailListMessages {
         static String outputString = "";
         public String timeoutVal = "5000";
         public String messagelist(String mbox, String url, int timeout) throws Exception {
              timeoutVal = timeout + "";
              return messagelist(mbox,url);
         public String messagelist(String mbox, String url) throws Exception{
              int optind;
         int port = -1;
         boolean verbose = false;
         boolean debug = false;
         boolean showStructure = false;
              Store store = null;
              outputString = "";
              try {
              // Get a Properties object
              Properties props = System.getProperties();
                   props.put("mail.imap.connectiontimeout",timeoutVal);
                   props.put("mail.imap.timeout",timeoutVal);
              // Get a Session object
              Session session = Session.getDefaultInstance(props, null);
              session.setDebug(debug);
              // Get a Store object
                   URLName urln = new URLName(url);
                   store = session.getStore(urln);
                   store.connect();
         } catch (Exception e) {outputString = "Error:Host Connection";}
              // Open the Folder
              Folder folder = store.getDefaultFolder();
              if (folder == null) {
         outputString = "No default folder error";
                   return outputString;
         folder = folder.getFolder(mbox);
         if (folder == null) {
         outputString = "Invalid folder error";
                   return outputString;
         // try to open read/write and if that fails try read-only
         try {
                   folder.open(Folder.READ_WRITE);
         } catch (MessagingException ex) {folder.open(Folder.READ_ONLY);}
         int totalMessages = folder.getMessageCount();
         if (totalMessages == 0) {
                   outputString = "(No Messages)";
                   folder.close(true);
                   store.close();
                   return outputString;
              // Attributes & Flags for all messages ..
              Message[] msgs = folder.getMessages();
              // Use a suitable FetchProfile
              FetchProfile fp = new FetchProfile();
              fp.add(FetchProfile.Item.ENVELOPE);
              fp.add(FetchProfile.Item.FLAGS);
              fp.add("X-Mailer");
              folder.fetch(msgs, fp);
              for (int i = 0; i < msgs.length; i++) {
              dumpEnvelope(msgs,mbox);
              folder.close(false);
              store.close();
              return outputString;
         public static void dumpEnvelope(Message m, String mbox) throws Exception {
              String fromString = "";
              String subjectString = "";
              String dtString = "";
              String flagString = "";
              Address[] a;
              int msgNumber = m.getMessageNumber();
              if (mbox.equals("Sent"))
                   // TO
                   if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
                   for (int j = 0; j < a.length; j++)
                        fromString = a[j].toString();
                   fromString = ("<td><a href='EmailViewMessage.jsp?messageNumber=" + msgNumber + "&folderName=" + mbox + "'>" + fromString + "</a></td>");     
              else
                   // FROM
                   if ((a = m.getFrom()) != null) {
                   for (int j = 0; j < a.length; j++)
                        fromString = a[j].toString();
                   fromString = ("<td><a href='EmailViewMessage.jsp?messageNumber=" + msgNumber + "&folderName=" + mbox + "'>" + fromString + "</a></td>");     
              // SUBJECT
              subjectString = m.getSubject();
              subjectString = ("<td>" + subjectString + "</td>");
              // DATE
              Date d = m.getSentDate();
              dtString = "UNKNOWN";
              if (d != null) dtString = d.toString();
              dtString = ("<td>" + dtString + "</td>");
              // FLAGS
              Flags flags = m.getFlags();
              StringBuffer sb = new StringBuffer();
              Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
              boolean first = true;
              for (int i = 0; i < sf.length; i++) {
              String s;
              Flags.Flag f = sf[i];
              if (f == Flags.Flag.ANSWERED)
                   s = "\\Answered";
              else if (f == Flags.Flag.DELETED)
                   s = "\\Deleted";
              else if (f == Flags.Flag.DRAFT)
                   s = "\\Draft";
              else if (f == Flags.Flag.FLAGGED)
                   s = "\\Flagged";
              else if (f == Flags.Flag.RECENT)
                   s = "\\Recent";
              else if (f == Flags.Flag.SEEN)
                   s = "\\Seen";
              else
                   continue;     // skip it
              if (first)
                   first = false;
              else
                   sb.append(' ');
              sb.append(s);
              String[] uf = flags.getUserFlags(); // get the user flag strings
              for (int i = 0; i < uf.length; i++) {
              if (first)
                   first = false;
              else
                   sb.append(' ');
              sb.append(uf[i]);
              flagString = sb.toString();
              String testString = "\\Seen";
              if (!flagString.equals(testString))
                   flagString = ("<td>New</td>");
              else
                   flagString = ("<td> </td>");
              outputString = (outputString + "<tr bgcolor='#a9a9a9'>" + fromString + subjectString + dtString + flagString + "</tr>");

  • How to raise message using the attributes created in Theme

    Hi,
    I have created an attribute in the theme of the internet service.
    I want to raise a message using alert, how can i use this attribute in the javascript method?
    Regards
    Sohit

    Hi,
    try
    <script language="javascript">
    alert('Attribute:' + `yourAttribute`);
    </script>
    mind the backtics `` !!!
    kind regards,
    ralph

  • How to receive messages using my iPad number than receiving messages from email

    HOw do I receive messages using my iPad number not my email address

    You are probably going to have to sign out of/turn off Messages on the phone and the iPad and then start all over again and enable messages on the phone first so that the number is accessible again to use on the iPad in Settings>Messages>Send and Receive at>You can be reached by iMessages at. You need to be able to select your phone number in there.
    This kb article explains it in detail.
    http://support.apple.com/kb/HT5538

  • Can I use multiple values for a rollup key on the same Endeca record?

    We have a business need to to aggregate our records using different criteria, based on user navigation. We are thinking of using a rollup key with multiple values to help with the aggregation, but we are running into some issues.
    Here is a made-up xample of what we want to do: assume we have a group of products and these products can be organized into groups using parent-child relationships. We would like to create an aggregate record for each parent, and we want the aggregate record for each parent to include all the children for the parent. To achieve this, we use a field called "parent_rec_spec" that holds the parent record spec and we set the same value on the field for the parent and its children. When we do rollup using the parent_rec_spec as the rollup key, we are able to see one aggregate record for each parent (with its children).
    The previous setup worked perfectly for us so far. But now we are getting a business requirement that allows children nodes to be linked to multiple parents at the same time. We were hoping of using another dimension to limit the records based on user roles/characteristics , so that only applicable parents/children are displayed (for example, we can use "market" as an additional filtering property, and we decide to show all parents/children for "North America", while hiding the parents/children for other markets).
    This caused an odd behavior when children are linked to multiple parents. For example, assume that SKUs A and B were linked to parents in "North America" and "Europe" at the same time, and assume that the user chose the "North America" market. The navigation state would eliminate the parents/children that are no in North America, and will also cause the parents/children that are labeled for North America to show up and be aggregated correctly. This however will lead to the creation of additional aggregate records for the A and B using the parent_rec_spec values that would have linked them to the Europe parents (even though the parents are hidden away).
    Here is an example index file that we used to load the test data:
    Update||1
    Market||North America
    Record Type||Product
    Name||Parent 1
    rec_spec||P1
    parent_rec_spec||P1
    EOR
    Update||1
    Market||Europe
    Record Type||Product
    Name||Parent 2
    rec_spec||P2
    parent_rec_spec||P2
    EOR
    Update||1
    Market||North America
    Record Type||Product
    Name||Child A
    rec_spec||A
    parent_rec_spec||P1
    EOR
    Update||1
    Market||North America
    Market||Europe
    Record Type||Product
    Name||Child B
    rec_spec||B
    parent_rec_spec||P1
    parent_rec_spec||P2
    EOR
    Update||1
    Market||North America
    Market||Europe
    Record Type||Product
    Name||Child C
    rec_spec||C
    parent_rec_spec||P1
    parent_rec_spec||P2
    EOR
    Update||1
    Market||Europe
    Record Type||Product
    Name||Child D
    rec_spec||D
    parent_rec_spec||P2
    EOR
    In this setup, we have parent P1 marked for North America with children A, B and C, and parent P2 marked for Europe with B, C and D as children. When we use North America as a filter in the navigation state, and parent_rec_spec as the rollup key, then we will see an aggregate record for P1, A, B and C. But we will also see an aggregate record for B and C by itself (presumably because of the other parent_rec_spec value on these records).
    The actual data that we are testing with is more complicated, but the end result is similar. We also noticed that the additional aggregate records would not be created always, depending on the ordering of the records.
    The question that I need help with is this: is there a way to fine tune the rollup logic so that it can only include certain records (in the example above, we can change the rec_spec from PA and PB to PA_North_America and PB_Europe and then we would be interested in rolling up using values that end with NorthAmerica).
    By the way, we considered using separate rollup keys for each context (like parent_rec_spec_north_america and parent_rec_spec_europe), but the number of contexts is dynamic, and might grow large. So it is not easy for us to create the additional properties on the fly, and we are concerned about the possible large number of dimensions.

    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=2&threadid=1157850

  • How to display message using default lock in ORACLE 9i?

    I am using ORACLE 9i I am inserting a same record in a same table (which is having primary key) of same user with different sql editor (or from different machines).
    with same time.
    One person is able to insert the record..
    But other one is in processing state, once the inserted person give commit,then only other person got the message "Primary key constraint voilated".
    This is bcoz of concurrency in oracle. For this purpose Oracle uses default lock.
    Is it possible to give message to other person like "One user is using this table..", after a record is inserted and before commit is get issued by the inserted user?
    how can i do this?
    Thanks a lot for your help

    [url http://forums.oracle.com/forums/thread.jspa?threadID=543335&tstart=0]duplicate thread

  • How to send message using Head,PUT,DELETE method

    we can use Get,Post method in a form, but how to use Head,Put,DELETE method to submit. I try to use "method=head" in form tag, and write some code in doHead() method in servlet, but after I submit the form, the doHead() is not called by the servlet.

    In HTML there is no Tag that support HEAD or PUT. You might create your own HTTP Client and implement HEAD and PUT Requests. Have a look at the HTTP Protocol to learn what they are used for and how they are to be implemented.

  • How to create links to other solutions using C# MVC?

    I am creating a project with multiple solutions. I used MVC Framework. I have a problem on creating a link  for other solutions I added in the project. I'd like to include each solution to be executed in each tab that when I click one tab one solution
    will open. Is it possible? If possible, how can i create a link to access and execute other solutions?
    @rch13

    Hello,
    Specifically, this should be asked in the
    ASP.Net MVC forum on forums.asp.net.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • How to Change Messages inline attribute value Dinamically

    Hi
    I'm using Jdev 11.3
    Our requirement is if the facesmesage having onlly one message it should come like inline message
    else it should come as a popup.
    i tried EL for inline attribute but the problem is the method is calling only when submition
    public boolean isInline()
    boolean flag = true;
    Iterator it = FacesContext.getCurrentInstance().getMessages();
    if (it.hasNext())
    flag = false;
    return flag;
    regards Abhilash

    duplicate

  • How to activate JMenu from other frame using accelerator key

    Hi.
    I'm developing an application for my final year project.
    i set up my application to have multiple frame open at the same time (like sunone studio in SDI mode). only one JFrame contains the JMenuBar.
    i can activate this menu bar using the accelerator key when the containing JFrame has focus. however, i donot know how to make the Menu activate when the accelerator key is pressed on other frame. press help, thanks in advance.

    does any one have some idea.
    the solution i found seem not suit my need.
    i want to be able to pull down (and get the focus transfered to) the jmenu in menubar of another frame using the menu's mnemonics. using InputMap does not seem to fit since i need to the menmonic of menu is not in the input map.

  • How to video call with other phone using Iphone 4??

    Hii
    Anant Patel here.
    How to use iphone 4 for video call to other phone like nokia or others.??

    Skype, if the other phones support skype.

  • How to completely remove Aperture other than using CleanApp

    so i wanted to uninstall the current Aperture of mine, because i want to install the Aperture2
    but i feel that removing the current Aperture and then install the Aperture 2 is the best way to avoid any error or unwanted problems
    but i seems to not able to find the Uninstaller package for Aperture, or is there?
    if Aperture got it's very own Uninstaller, where is it located?
    if it doesn't have, is using CleanApp is the best way to fully remove Aperture COMPLETELY from my MBP?
    because sometimes i wonder if CleanApp remove a software as clean as the Uninstaller?
    thanks alot =)

    If you bought an upgrade to Aperture 1.5, Aperture 1.5. has to be on your computer and Aperture 2 installer has to find it there. Otherwise you cannot load Aperture 2. But, perhaps, this does not answer your question. Just a guess: If you want to uninstlall Aperture 1.x you might have to load the original CD and start install and go into customize.

  • How to Populate a drop down list using the values of a text field?

    Hi,
    I wanted to Populate the items of my drop down list according to the value entered in the textfield above it?
    also the value of list remains consistent in other rows also where i am using the drop down list field.
    Please Try to help me in this query.
    Thanks in Advance!!!
    I am using Javascript in adobe version ES 8.2.

    Part II:
    If you have other items for your droplist(s) that are to appear in addition to the "variable language" entered by a user you can add that to the script.  For example in addition to the Party1 and Party2 name appearing in my droplist I also want the list to have an option for a user to select: The parties jointly.  I add this to the script:
    this.addItem(Party1.rawValue);
    this.addItem(Party2.rawValue);
    this.addItem ("The parties jointly");
    If you have trouble making it work, post a bit of your actual form requirements.

Maybe you are looking for