Query related message mapping: Play with queue.

Hi
i have a text file which i converting using File Content Conversion of file sender adapter. My file was very nested so i couldn't convert it the way i wanted i.e.
<Header></Header>
<Detail>
    <Weights></Weights>
</Detail>
<Trailer></Trailer>
So now I m left with this kind of source xml:
<ns: MT_REQ>
<header>
</header>
<Detail>
</Detail>
<Weight>
</Weight>
<Weight>
</Weight>
<Detail>
</Detail>
<Weight>
</Weight>
<Weight>
</Weight>
<trailer>
</trailer>
And i want to map it to the same message type <ns: MT_REQ> but due to queuing of data it gives the following result:
<ns: MT_REQ>
<header>
<Identifier>H</Identifier>
</header>
<Detail>
<Identifier>D</Identifier>
Identifier>
</Detail>
<Detail>
<Identifier>D</Identifier>
</Detail>
<Weight>
<Identifier>W</Identifier>
</Weight>
<Weight>
<Identifier>W</Identifier>
</Weight>
<Weight>
<Identifier>W</Identifier>
</Weight>
<Weight>
<Identifier>W</Identifier>
</Weight>
<trailer>
<Identifier>T</Identifier>
</trailer>
i.e. all detail together then weights and header trailer on top and bottom. Now the problem is there is no relation between the weights and detail except that in the monitoring it comes like
1. First detail tag opens and closes with its data
2  then weights which are the heirarchy  detail 1 open and closes
3  then second detail opens and closes and then weights of second detail comes under it before any third detail tag opens
So i was wondering if with the help of functions provided in the message mapping it will generate exact mirror image of my source  <ns: MT_REQ>  into the target  <ns: MT_REQ1> which is the exact replica of the former.
I tried it with FormatByExample but dd not work. Is there any Userdefined function or something foe my problem.
Please help !!
Naina

Stefen
My Inbound file was coming correctly like this :
record
- detail
- weight
- weight
record
- detail
- weight
but when mapping to the target in same style it was going this way
- detail
- detail
- weight
- weight
- weight
so what i did...i asked the portal people to add an identifier to the details and weights so that i can read it and write a UD to finally map it correctly:
- 1detail
- 2detail
- 1weight
- 1weight
- 2weight
- 2weight
it is working properly now....thanks to you all.....have given the points

Similar Messages

  • Message Mapping Problem with UTF-16LE Encoded XML

    Hello,
    we have the following scenario:
    IDoc > BPM > HTTP Sync Call > BPM > IDoc
    Resonse message of the HTTP call is a XML file with UTF-16LE processing instruction. This response should then be mapped to a SYSTAT IDoc. However the message mapping fails "...XML Parser: No data allowed here ...".
    So obviously the XML is not considered as well-formed.
    When taking a look at SXMB_MONI the following message appears: "Switch from current encoding to specific encoding not supported.....".
    Strange thing however is if I save the response file as XML and use the same XML file in the test tab message mapping is executed successfully.
    I also tried to use a Java Mapping to switch encodings before executing message mapping, but the error remains.
    Could the problem be, that the codepage UTF-16LE is not installed on the PI system ? Any idea on that ?
    Thank you!
    Edited by: Florian Guppenberger on Feb 2, 2010 2:29 PM
    Edited by: Florian Guppenberger on Feb 2, 2010 2:29 PM

    Hi,
    thank your for your answer.
    This is what I have tried to achieve. I apply the java conversion mapping when receiving the response message - i tried to convert the response to UTF-16, UTF-8 but none of them has helped to solve the problem.
    I guess that using adapter modules is not an option either as it would modify the request message, but not the response, right?

  • Message Mapping Issue with data without namespace

    Hi,
    I have a common xsd imported which has its own target namespace into my SWC namespace. Based on this xsd I have generated a Message Interface and webservice and given the wsdl to third party system for invoking my webservice.
    The problem is I have done the message mapping based on xsd which has namespace but whereas the third party system which is consuming my webservice is sending the xml data without any namespace and because of which my mapping is failing (target structure is not getting generated as expected). I have tested the mapping with namespace and without namespace from IR already. I have explained this below with example.
    I cannot change the xsd as it is a common and even cannot ask the end system to change the data format they are sending as they are sending the same data to some other systems also, which are not complaining.
    How to resolve this issue in XI?
    Actual xml data generated from my imported xsd (with namespace)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Root xmlns:ns0="http://employee/types">
       <ns0:EmployeeDetails>
          <ns0:EmployeeId>12</ns0:EmployeeId>
            <ns0:EmployeeName>XYZ</ns0:EmployeeName>
    </ns0:EmployeeDetails>
    </ns0:Root>
    Actual Data coming from third party system (without namespace)
    <?xml version="1.0" encoding="UTF-8"?>
    <Root>
       <EmployeeDetails>
          <EmployeeId>12</EmployeeId>
            <EmployeeName>XYZ</EmployeeName>
    </EmployeeDetails>
    </Root>
    Thanks
    Amit

    Just  wild guess:)
    I am not 100% sure but i guess XSLT mapping does not checks the incoming payload against the sender message type.Within XSLT mapping you can add/remove namespace as you would like,use this XSLT mapping before your actual message mapping in interface mapping.
    I am saying this coz recently i was able to generate XSLT mapping(in altova Map Transform) without even specifying any sender or receiver Message type and it worked just fine.
    Thanx
    Aamir

  • RFC Lookup's in message mapping fail with RuntimeException for no reason

    Hi guys,
    We have developed interfaces that execute a lot of RFC's from Message Mapping, by making use of RFC Lookup API.
    In ID, in the corresponding RFC Receiver Communication Channel we have set the number of maximum connections to 100.
    However, when a big number of Idocs with lots of items is sent to XI some messages fail in XI because mapping fails with a runtime exception that is not correct, since there is a return value found from the execution of the RFC function. And when I am testing the mapping in Test mode of XI IR, the mapping is executed successfully.
    Do you think that by increasing the maximum number of connections in Communication Channel, it will take effect?
    Evaggelos

    Hi Evaggelos,
    DECREASE, may be til 10.
    Regards,
    Udo

  • Message-Mapping Problem with empty queue while testing

    Hello,
    I want to develope an mapping to an BMEcat-structure. This mapping should be an filter.
    My problem is, that everytime I want to check, if my mapping works correct, the queues for the proccessing steps keeps empty.
    I filled a test case with all data I needed for the step I want to test (not the whole mapping is ready, but for this step, it is). Now I go to my mapping step an check the queue for the parameters and the queue comes up and displays the correct values. In next step I want to display the queue of an "equalsS"-Step, but this queue keeps empty as all following queues too. Sometimes there is coming up an empty "Processing log"-window.
    The problem only comes up, if the target-message is a BMEcat-Structure.
    Have you any solution for this behaviour? Or do you need more informations?
    Here you can find some Screenshots:
    http://www.gothsite.de/sapscreen/ScreenShot00113.jpg
    http://www.gothsite.de/sapscreen/ScreenShot00114.jpg
    http://www.gothsite.de/sapscreen/ScreenShot00115.jpg
    http://www.gothsite.de/sapscreen/ScreenShot00116.jpg
    http://www.gothsite.de/sapscreen/ScreenShot00117.jpg
    Edited by: Dirk Koch on Feb 6, 2008 12:00 PM

    Hello,
    thank you for your tip, but the main problem is still existing. As you can see in the next screenshots, I build in your code and I'm sure it normally works fine. Also I filled the "have to"-Fields in the strukture, so that the check-function (F7) delivers an all right.
    But still I get no queue results.
    http://www.gothsite.de/sapscreen/ScreenShot00118.jpg
    http://www.gothsite.de/sapscreen/ScreenShot00119.jpg
    For tests you can take these informations:
    http://www.gothsite.de/sapscreen/Z_RFC_EAN_CHECK_resp.xsd
    http://www.gothsite.de/sapscreen/bmecat_2005_XSDs.zip
    Edited by: Dirk Koch on Feb 6, 2008 12:56 PM

  • Music Play with Queue Built Into Player

    With my Sonos player I can add music while a song is playing by simply touching the song I want, It then ask if I want to add it to my queue.  The advantage is that I don't accidentally stop the song I was playing and the one I'm trying to add to the queue starts playing.
    I know Sonos only works with wifi, but is there any available player for an iPad that would allow me to add songs while another is still play that has a queue feature.  I know most have a playlist feature, but that's not what I am looking for. 
    I have an iPad Air Operating System is 7.0.4

    Stefen
    My Inbound file was coming correctly like this :
    record
    - detail
    - weight
    - weight
    record
    - detail
    - weight
    but when mapping to the target in same style it was going this way
    - detail
    - detail
    - weight
    - weight
    - weight
    so what i did...i asked the portal people to add an identifier to the details and weights so that i can read it and write a UD to finally map it correctly:
    - 1detail
    - 2detail
    - 1weight
    - 1weight
    - 2weight
    - 2weight
    it is working properly now....thanks to you all.....have given the points

  • Message-mapping: sort  with subnodes

    Hello everybody,
    as far as i know (and tested) the SORT-function sorts just the node. The subnodes are not sorted.
    Sample:
    <B>
    <BField_1>
    <BField_2>
    <A>
    <AField_1>
    <AField_2>
    <u>after using the SORT:</u>
    <A>
    <<b>B</b>Field_1>
    <<b>B</b>Field_2>
    <B>
    <<b>A</b>Field_1>
    <<b>A</b>Field_2>
    <u>what I want:</u>
    <A>
    <AField_1>
    <AField_2>
    <B>
    <BField_1>
    <BField_2>
    Thanks, Regards
    Mario

    Hi Mario
    xml -> xml: take xsl:stylesheet subelement "xsl:output" for control (method="xml")
    xsd -> xsd: not possible. You need a instance for a mapping (should be clear as you dont have field values)
    map all source fields to target fields 1:1: take xsl:copy-of. Use attribute select. Put there a X-Path expression, for example '/', what means everything (but why do you use a mapping at all??)
    The copy-of command is very strong as you can copy well selected parts of your source message with very less code, just a little bit X-Path.
    Regards,
    Udo

  • Message Mapping - problem with target sequence

    Hi, I hope somebody can help:
    I have already read lots of blog entries and help articles to find a solution but all the tricks with node functions and special conditions didn't help yet.
    I would like the sequence of A and B nodes just as is. In the source structure they are on the same level and in the target structure B is subnode of A.
    Thank you very much in advance.
    Source structure:
    Node A
    - source fields A
    Node A
    - source fields A
    Node A
    - source fields A
    Node B
    - source fields B
    Node A
    - source fields A
    Node B
    - source fields B
    Node B
    - source fields B
    Target structure (desired):
    A
    - fields A
    A
    - fields A
    A
    - fields A
       B
       - fields B
    A
    - fields A
       B
       - fields B
       B
       - fields B
    However, what I get is:
    A
    - fields A
       B
       - fields B
       B
       - fields B
       B
       - fields B
       B
       - fields B
    A
    - fields A
    A
    - fields A
    A
    - fields A

    Hi,
    Can u try like this.
    Map one to one.
    Dont use  any node function also dont change any conexts also af any node or element.
    But in target,make node B is under node A, and both are 0..unbounded occurence.
    Try with this....
    Let us know the result.
    Babu

  • Query related to mapping

    Hi,
    I have a requirement in mapping
    On the Source side (04/26/2011 17:13:50 , 1000 , 90 , Business) data is coming into one field.
    Sample Source Data is coming as :     04/26/2011 17:13:50 , 1000 , 90 , Business
    In the source structure mentioned above
    first field is Date which will be in the format "MM/dd/yyyy HH:mm:ss" and will be 20 characters.
    second field is Batch id which will be of variable length
    third field is submission id which will be of variable length
    fourth field is task type which will be of variable length
    Target Should look like as shown below
    <ns2:requestContent>
    <ns2:creationDate>04/26/2011 17:13:50</ns2:creationDate>
    <ns2:batchId>1000</ns2:batchId>
    <ns2:submissionId>90</ns2:submissionId>
    <ns2:taskType>Business</ns2:taskType>
    </ns2:requestContent>
    Can anyone tell me how to acheive it in mapping?
    Any answers will be much appreciated.
    Thanks & Regards
    Prabhat

    Use string.split method and delimiter is ","  (comma)
    example     
    String input="04/26/2011 17:13:50 , 1000 , 90 , Business";
    String delimiter =",";
    String[] field =  input.split(delimiter);
    Since field length is not fixed, you might want to use java mapping and parse the values as above and set  it in target elements.
    the above field array has substring of all the 4 values. you might have to use for loop and extract each and set in target elements
    code sample for loop .. instead system println you can set value for target xml tag elements.
    for (int i=0; i< field.length; i++){
      System.out.println(field<i>);
    Edited by: Baskar Gopal on Apr 27, 2011 1:28 PM

  • Functions at Message Mapping - Concatenate with If

    Dear SAP Masters, please kindly help me to solve this case.
    Please guide me how to achieve this :
    Column1 = Sales Order number
    Column2 = Sales Order Item number
    Column3 = Sales Order Type
    Column4 =
    For each line, if Column3 start with "ZOR" then column 4 = concatenate Column 1 (SO No) with Column2 (SO Item No), else then Column4 = <blank>
    Please kindly give me an idea.
    Thanks,
    GJ

    Hi GJ,
    what about something like this:
    Let me know if it works.
    Regards!

  • Delete Related Messages

    In Mail, when I click on a message, other messages in the same conversion, which Apple calls "related messages" are highlighted with green. Is there a way to delete all these messages at once by clicking on a single related message? Or what could a workaround be?
    Thanks!

    If you choose *View > Organize by Thread*, the messages will be listed together. You can collapse the thread into a single line. Select that line and hit delete.

  • Upgrading from XI/PI7.0 to 7.1 having problems with message mapping

    Hello,
    We are in the process over the past week of testing our XI/PI functionality after upgrading our 7.0 XI/PI environment to PI7.1; in particular several maps that were accessible in 7.0 will not open or diaplay in 7.1 complaining of a missing node in the mapping structure. Currently working with SAP on a possible fix but wanted to know if anyone else has done a true migration on top of an existing XI/PI7.0 system and experiencing similar issues (note: the maps can execute in the runtime environment but we can't display the maps source within message mapping; this also does not occur for all maps and there is no clear consistant theme to those that can be displayed and those that can't).
    The lattest issue just encountered related to message mapping is that in test mode of a map (that can be displayed) attempting to display the data queue for the mapped elements are blank no data being displayed giving an error noting that the source text of object message mapping: name of the map; has syntax errors, java area import line x, package ibm.com.xi.mapping does not exist/ import ibm.com.xi.mapping UDF:
    Has anyone upgraded from PI7.0 to 7.1 and experienced errors with existing maps that worked ok (ans still work in our QX/PRD systems) in their 7.0 envirinment but encountereing strange errors once upgrated to 7.1?
    Thanks
    Dereck Purnell
    NewellRubbermaid

    Here is the solution we received from SAP to address the issue, there were several mapping related issues we started havng from maps that worked in our 7.0 system prior to the upgrade to PI 7.1. I will try to encorporate the solutions in this response.
    a) From Customer to SAP
    1. We are unable to open some massage mapping, it is throwing
    exception
    2. Number Format functions throw exception.
    But following issue is still unresolved:
    3. When we display message queue, it throws exception
    ***) 05.02.2009 - 12:34:33 CET - Reply by SAP     
    The patch has been released at the Service Marketplace.
    Please update the scas described in the note 1264871.
    The "FormatNum" function issue has also been taken care in this patch.
    Please go through the Note 1264871 for other behaviour changes after
    upgrade. Let us know if you need any further help.
    Regards,
    B) From Customer to SAP
    04.02.2009 - 00:23:44 CET - Info for SAP
    We discovered another issue with mapping.
    For some of the mappings, we are unable to display mapping queue. When
    we execute, Interface mapping and Massage mapping, it works fine. But
    display queue throws exception. Itu2019s not able to recognize libraries
    used from dependent software component.
    Please find document "Display Mapping Queue Issue" providing example
    problem.
    25.02.2009 - 07:05:28 CET - *Reply by SAP*     
    Thank you for your update. I wanted to check with "CopyValue"
    function's index. It has to take an input integer and the problem that
    found while debugging the opening of your mapping is that the input
    was empty thus causing the exception.
    I was going to suggest the intended use of "CopyValue" function.
    When the input to "copyValue" is a constant, "copyValue" is totally
    not necessary. Thus constant can be directly mapped to other function.
    When the input is a node with values in context, you can treat one of
    values say input[0] to used in mapping by using CopyValue[0].
    But please make sure that input[0] will always produce a value.
    Note 877964 will describe in detail on Copyvalue usage.
    I am marking this Message as complete. Please confirm.

  • Query Error in Message Mapping

    Hi everyone
    I am working on a BPM, that BPM has a  Message Mapping that makes a Query to a DB.
    When I send a message with multiple details its working in the following way:
    1.- If the first detail makes a query of a catalogue that exists on the DB, and the second detail makes a query to a cataloge that does not exists on the DB it finishes with error.
    2.- If the first detail has the query of an unexisting catalogue on the DB, and the second detail has the query that exists on the DB it finishes correctly.
    Can someone give me some light on whats happenning here?
    Thanks in advanced

    Ended message

  • Message mapping with dynamic node

    Hi,
    I am doing message mapping where my source structure is
    <root>
         <EmpCount>2</EmpCount>
         <Emp>
              <item>
                   <code>1</code>
                   <name>ABC</name>
              </item>
                                     <item>
                   <code>2</code>
                   <name>PQR</name>
              </item>
         </Emp>
    <root>
    If EmpCount is having value 2 then Emp node will have only 2 items
    Target structure is flat structure like (something like fix file format)
    <root>
         <EmpData>EmpDetails</EmpData>      occurrences 0...unbounded
    </root>
    With above sources data following is expected target sturcure…
    <root>
         <EmpData>2ABC</EmpData>
         <EmpData>3PQR</EmpData>
    </root>
    Here my query is how I can create more than one node to target structure with employee details.
    I already tried with following Re: how to create target node a constant number of times
    This help to get all 2 nodes of EmpData in target structure but it is showing only First value in both nodes. Following is output I am getting…
    <root>
         <EmpData>2ABC</EmpData>
         <EmpData>2ABC</EmpData>
    </root>

    Sunil,
    Please see the sample i/p and o/p payload. Also please let me know , is this the same u are looking for
    I/P
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Check xmlns:ns0="urn:hdmc:samplescenarios">
       <EmpCount>2</EmpCount>
       <Emp>
          <Item>
             <Code>1</Code>
             <Name>A</Name>
          </Item>
          <Item>
             <Code>1</Code>
             <Name>B</Name>
          </Item>
       </Emp>
    </ns0:MT_Check>
    O/P
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Check_Out xmlns:ns0="urn:hdmc:samplescenarios">
       <Root>
          <EmpData>2A</EmpData>
          <EmpData>2B</EmpData>
       </Root>
    </ns0:MT_Check_Out>
    Best regards,
    raj.

  • Need Help with Message Mapping in PI 7.1 - JDBC to IDOC

    I have an outgoing SQL function that sends multiple rows of data for use in creating an IDOC in ECC. I am trying to key the creation of new IDOCs (already did the maxOccurs trick to the IDOC definition) based on a field in the JDBC return data...
    JDBC Message Format...
    SEGNAM - TRANS_ID - MATERIAL - VKORG...ETC
    MARA -  00001 - 1234 - <space> - ...
    MARC -  00001 - 1234 - VK01 - ...
    MARA - 00002 - 9876 - <space> - ...
    MAKT - 00002 - 9876 - <space> - material description - ...
    Each time there is a new TRANS_ID, I need to indicate a new IDOC in the message mapping. I have tried all kinds of combinations of TRANS_ID --> dropContext --> splitValue and TRANS_ID --> collapseContext --> splitValue, but nothing has worked.
    Has anyone done this kind of message map (without any BPM please)?
    Thanks,
    Nathan

    Hello Nathan,
    For this one, you have to play with contexts.
    row 1 SEGNAM = MARA, TRANS_ID = 1, MATNR = 123...
    row 2 SEGNAM = MARC, TRANS_ID = 1, MATNR = 123, WERKS = PL01...
    row 3 SEGNAM = MARA, TRANS_ID = 2, MATNR = 987
    This also depends on the occurrence of the parent node. example, if I want MATNR to be populated, the logic would be like
    ex:
    IDOC1..unbounded) (The logic is the already provided in an earlier response)
    -->MATNR (1..1)
    MATNR --------> removeContext ----------------> FormatByExample --> MATNR
    TRANS_ID --> removeContext --> splitByValue:ValueChange --> /
    If the rows are not in order of trans_id, then you need to incorporate sorting into the logic above.
    Hope this helps,
    Mark

Maybe you are looking for