Problem in Message Mapping

Hi,
My requirement is filter message based on the condition.
My source structure is like below
Root_Node
    |
  RecordSet (1..Unbounded)
      |_
      |   Header (1..1)
      |      |_ RecordType
      |_
          Detail (1.. Unbounded)
             |_ RecordTypeDetail
Example XSD is given below
Now my requirement is I need to map the iterations to the same type of target structure (but only difference is all elements are non mandatory).
if
1) RecordType does not exists under Header, then map Detail.
2) recordTypeDetails does not exists under Details then map Header.
Now while doing RecordSet Mapping I have written user defined function which adds context if any of the above condition valid.
But while doing the mapping for the Header Record we should map the iteration for which detail is not available, I am not able to associate the above context with the new resultset context.
Any suggestions please.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:group8" targetNamespace="urn:group8">
     <xsd:complexType name="DT_EA_COMPLETE">
          <xsd:annotation>
               <xsd:appinfo source="http://sap.com/xi/TextID">
               e616ab20c08c11d9bb8e001143eb68b9
               </xsd:appinfo>
          </xsd:annotation>
          <xsd:sequence>
               <xsd:element name="DT_EA_HD" type="DT_EA" maxOccurs="unbounded">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         cdea8830bb8e11d98600dd930a770421
                         </xsd:appinfo>
                    </xsd:annotation>
               </xsd:element>
          </xsd:sequence>
     </xsd:complexType>
     <xsd:complexType name="DT_EA">
          <xsd:annotation>
               <xsd:appinfo source="http://sap.com/xi/TextID">
               eab53980c08c11d9ab7d001143eb68b9
               </xsd:appinfo>
          </xsd:annotation>
          <xsd:sequence>
               <xsd:element name="Header">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         9d192f70bb0e11d9afc8fdcd0a770421
                         </xsd:appinfo>
                    </xsd:annotation>
                    <xsd:complexType>
                         <xsd:sequence>
                              <xsd:element name="rec_type_h" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f71bb0e11d9c902fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="Project_estimate_number" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f72bb0e11d998cafdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="Revision_number" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f73bb0e11d9851bfdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="Project_estimate_title" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f74bb0e11d99a04fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="Project_estimate_description" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f75bb0e11d99d6ffdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="purchase_order" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f76bb0e11d9bf5efdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                         </xsd:sequence>
                    </xsd:complexType>
               </xsd:element>
               <xsd:element name="DetailData" maxOccurs="unbounded">
                    <xsd:annotation>
                         <xsd:appinfo source="http://sap.com/xi/TextID">
                         9d192f77bb0e11d9c8b6fdcd0a770421
                         </xsd:appinfo>
                    </xsd:annotation>
                    <xsd:complexType>
                         <xsd:sequence>
                              <xsd:element name="rec_type" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f78bb0e11d9cfa4fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="Price" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f79bb0e11d9c487fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="gl_account" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f7abb0e11d99609fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="Internal_order" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f7bbb0e11d99b5afdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="line_item_description" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f7cbb0e11d9bdf8fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="print_job_indicator" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f7dbb0e11d9cec2fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="impress_project_number" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f7ebb0e11d9af41fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="partner_vendor" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f7fbb0e11d9be5dfdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="time_of_delivery" type="xsd:date">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f80bb0e11d9c353fdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                              <xsd:element name="Vendor_text" type="xsd:string">
                                   <xsd:annotation>
                                        <xsd:appinfo source="http://sap.com/xi/TextID">
                                        9d192f81bb0e11d9b0cdfdcd0a770421
                                        </xsd:appinfo>
                                   </xsd:annotation>
                              </xsd:element>
                         </xsd:sequence>
                    </xsd:complexType>
               </xsd:element>
          </xsd:sequence>
     </xsd:complexType>
</xsd:schema>

HI,
I think there is problem with occurence here. Try to findout run time value in the mapping.. i.e Diplay queue option in the mapping editor. SO that you can check where exactly it is getting error.
Regards,
Moorthy

Similar Messages

  • Problem in message mapping index.

    HI All,
    I am doing idoc to file scenario.
    I have a problem in message mapping.
    Issue is,
    pallet1
      palletheader(here i used counter to increment the value)
      palletline(here i used INDEX to increment the value)
            pallet linenumber1(it should be 1)
            pallet linenumber2(it should be 2)
    so on       )
    so on
    pallet2
      palletheader
      palletline
            pallet linenumber1(here again it should be 1)
            pallet linenumber2(here again it should be 2)
    so on              )
    so on
    In INDEX we have option called reset index in that we have two radio buttons
    one is "reset index to intial value with each new context"
    and next one is "donot reset index to intiak value"
    if i use the first radio button which is working fine in only one pallet and more pallet lines but not more than one pallet.
    If i use the second radio buttton which is working fine in more than one pallet but not satisfying the more pallet lines in one pallet.
    Can you please help me on the issue

    my requirement is like this.
    IF DELVRY05/IDOC/E1EDL20/E1EDL24/POSNR equals to /DELVRY05/IDOC/E1EDL20/E1EDL37/E1EDL44/EXIDV
    then map to 'pallet line' .
    I tried to keep posnr context as E1EDL20 and also IDOC level.
    And at the same way to EXIDV too.
    pallet(1 to unbounded)
       pallet header(1 to 1)
       pallet lines(1 to 1)
            in sub level  pallet line(1 to unbounded) (here i applied the index logic)
    The out put should be pallet line 1,2,3,----- so on
    In the second pallet the pallet lines should be again 1,2,3,4-------so on .
    But when i try to apply thsi logic,
    I am getting only one pallet line instead of two.
    second is not comming .
    please help on this i am facing this problem for the long time back.
    if i solve then i can complete my scenario.

  • Problem with message mapping ...

    Hello,
    I have problem with message mapping. I implemented SOAP-to-RFC scenario. The source message is of type http://sntcz.cz/xmlns/holidays:MT_Holiday, the target message of type urn:sap-com:document:sap:rfc:functions:Z_GET_SUPERIOR. But some error is still generated in Request Message Mapping step:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:Z_GET_SUPERIOR/USR. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:403) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at .....
    This is XSD definition of source message:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sntcz.cz/xmlns/holidays" targetNamespace="http://sntcz.cz/xmlns/holidays">
    <xsd:element name="MT_Holiday" type="DT_Holiday" />
    <xsd:complexType name="DT_Holiday">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    030495e1742f11dd963600301875333b
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="SinceDay" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba049b067aa11dd8be6eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="SinceMounth" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a067aa11dda311eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="SinceYear" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a167aa11dd9b4eeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilDay" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a267aa11ddc352eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilMounth" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a367aa11ddc33aeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilYear" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a467aa11dda8cfeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UserId" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a567aa11dd9698eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    This is XSD definition of target message:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions">
    <xsd:element name="Z_GET_SUPERIOR">
    <xsd:complexType>
    <xsd:all>
    <xsd:element name="USR" type="xsd:string" minOccurs="0" />
    </xsd:all>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    It's strange that if I use Message Mapping Test it works fine. But in pipeline not.
    Do you have any idea where could be the problem?
    Thank you in advance!
    Best regard,
    Zbynek

    Hi,
    To know the correct error Take the Inbound Payload from MONI and Test it in Mapping Test TAB. then u will come to know the exact error.
    Procedure to take the Payload
    goto MONI-Double click on MessageInbound Message ( CENTRAL ) --Payloads ---Double click on MainDocument ( application/xml ) -Just Right Click on the second window-View Source
    then now Copy this and paste it in Mapping Test and Execute.
    REgards
    Seshagiri

  • Problem in message Mapping SAP PI 7.1

    Hi Experts,
    I have a problem in my Message Mapping,
    Design: [Design|http://www.life-4-music.de/prob.jpg]
    Messagemapping: [MappingTest|http://www.life-4-music.de/probII.jpg]
    The Problem is, that ElementC from SourceMessage occours "0 to n" times in Element A, but I need to check every ElementC in ElementA to TargetElementA with a IF Statement.
    I tried a lot of things, like change the CONTEXT of the ELEMENT or use SPLIT BY VALUE but without success.
    Rgds,
    Steffen

    Hello, thanks a lot for the fast awnser. I tried this allready to change the Context of the Elements "system" in this Mapping: Changed Context
    For Example in one field I check for Entry "ERP" in Source Field "system" , if "ERP" is in the first ELEMENT then it will be mapped correctly: Example ERP works
    But If "ERP" is in an element below, then it doesn´t work, so it seems to be, that he only map the first occurrence of the Elements. : Example SCADA don´t work
    Here is the View of the QUEUE from the don´t working Example: Show QUEUE of not working Example
    maybe u have a tip for me again , because I´m allready desperate
    Thanks a lot.
    Rgds,
    Steffen

  • Single Line Data Type to Collection Data type, Problem in Message mapping

    I have a csv file, the file has the following lines
    hdr1
    line1
    line2
    lineN
    hdr2
    line1
    lineN
    I want it to map it to an object with the ff structure
    root object 1..1
    object 1..1
    subobject 0...n
    hdr 1..1
    line 1...n
    How is the mapping of the said data types?  Is it possible?  Please help....thanks in advance

    Hi Raymond,
    as you have two different strutures:
    - HEAD
    - ITEM
    and the occurences of the structures are not fix (say: e.g. HEADER occurs always 3 times), you need a key-field, which identifies each row as HEAR or ITEM.
    If you do not have a key-field, you must design a "generic structure" that fits to both:
    HEAD & ITEM. After the conten-conversion into this generic structure you need a message-mapping that identifies your HEADs and ITEMs.
    File content conversion sites
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Regards Mario

  • Problems with message mapping in XI

    Hi,
    I'm having a problem with my message mapping . I get the error
    "Cannot produce target element /ns0:GovTalkMessage/ns0:Body/ns1:IRenvelope. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd"
    Can you please tell me how I can resolve this error?
    Regards,
    Aditi Naik

    Hi,
    The source structure is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.govtalk.gov.uk/taxation/EOY/08-09/1" xmlns="http://www.govtalk.gov.uk/CM/envelope" targetNamespace="http://www.govtalk.gov.uk/CM/envelope">
    <xsd:import namespace="http://www.govtalk.gov.uk/taxation/EOY/08-09/1" />
    <xsd:element name="IDAuthentication">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="SenderID" type="xsd:string" minOccurs="0" form="qualified" />
    <xsd:element name="Authentication" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Method" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="clear" />
    <xsd:enumeration value="MD5" />
    <xsd:enumeration value="W3Csigned" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Role" type="xsd:string" minOccurs="0" form="qualified" />
    <xsd:element name="Value" type="xsd:string" minOccurs="0" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GovTalkMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="EnvelopeVersion" type="xsd:string" form="qualified" />
    <xsd:element name="Header" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="MessageDetails" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Class" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="UnicodeNameString">
    <xsd:maxLength value="32" />
    <xsd:minLength value="4" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Qualifier" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="request" />
    <xsd:enumeration value="acknowledgement" />
    <xsd:enumeration value="response" />
    <xsd:enumeration value="poll" />
    <xsd:enumeration value="error" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Function" minOccurs="0" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="list" />
    <xsd:enumeration value="read" />
    <xsd:enumeration value="delete" />
    <xsd:enumeration value="add" />
    <xsd:enumeration value="submit" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="TransactionID" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:maxLength value="32" />
    <xsd:pattern value="[0-9A-F]{0,32}" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="AuditID" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:maxLength value="32" />
    <xsd:pattern value="[A-F0-9]{0,32}" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="CorrelationID" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:maxLength value="32" />
    <xsd:pattern value="[0-9A-F]{0,32}" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ResponseEndPoint" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:string">
    <xsd:attribute name="PollInterval" type="xsd:integer" default="2" />
    </xsd:extension>
    </xsd:simpleContent>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Transformation" minOccurs="0" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="XML" />
    <xsd:enumeration value="HTML" />
    <xsd:enumeration value="text" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="GatewayTest" type="xsd:integer" minOccurs="0" form="qualified" />
    <xsd:element name="GatewayTimestamp" type="xsd:dateTime" minOccurs="0" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="SenderDetails" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="IDAuthentication" minOccurs="0" />
    <xsd:element name="X509Certificate" minOccurs="0" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:base64Binary" />
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="EmailAddress" minOccurs="0" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="129" />
    <xsd:minLength value="3" />
    <xsd:pattern value="[A-Za-z0-9\.\-_]{1,64}@[A-Za-z0-9\.\-_]{1,64}" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GovTalkDetails" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Keys" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Key" minOccurs="0" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:token">
    <xsd:attribute name="Type" type="UnicodeNameString" use="required" />
    </xsd:extension>
    </xsd:simpleContent>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="TargetDetails" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Organisation" minOccurs="0" maxOccurs="unbounded" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:maxLength value="64" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GatewayValidation" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Processed" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="no" />
    <xsd:enumeration value="yes" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Result" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="pass" />
    <xsd:enumeration value="fail" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ChannelRouting" minOccurs="0" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Channel" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="URI" type="xsd:anyURI" minOccurs="0" form="qualified" />
    <xsd:element name="Name" type="xsd:string" minOccurs="0" form="qualified" />
    <xsd:element name="Product" type="xsd:string" minOccurs="0" form="qualified" />
    <xsd:element name="Version" type="xsd:string" minOccurs="0" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ID" minOccurs="0" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:string">
    <xsd:attribute name="Type" type="xsd:string" use="required" />
    </xsd:extension>
    </xsd:simpleContent>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Timestamp" type="xsd:dateTime" minOccurs="0" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GovTalkErrors" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Error" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="RaisedBy" type="xsd:string" form="qualified" />
    <xsd:element name="Number" type="xsd:integer" minOccurs="0" form="qualified" />
    <xsd:element name="Type" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="fatal" />
    <xsd:enumeration value="recoverable" />
    <xsd:enumeration value="business" />
    <xsd:enumeration value="warning" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Text" type="xsd:string" minOccurs="0" maxOccurs="unbounded" form="qualified" />
    <xsd:element name="Location" type="xsd:string" minOccurs="0" maxOccurs="unbounded" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GatewayAdditions" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:any namespace="##local" processContents="strict" />
    </xsd:sequence>
    <xsd:anyAttribute namespace="##local" processContents="strict" />
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Body" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="ns1:IRenvelope" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:simpleType name="UnicodeNameString">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[\p\p_\-\(\)\{\}]*" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>
    The target structure is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.govtalk.gov.uk/taxation/EOY/08-09/1" xmlns="http://www.govtalk.gov.uk/CM/envelope" targetNamespace="http://www.govtalk.gov.uk/CM/envelope">
    <xsd:import namespace="http://www.govtalk.gov.uk/taxation/EOY/08-09/1" />
    <xsd:element name="IDAuthentication">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="SenderID" type="xsd:string" minOccurs="0" form="qualified" />
    <xsd:element name="Authentication" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Method" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="clear" />
    <xsd:enumeration value="MD5" />
    <xsd:enumeration value="W3Csigned" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Role" type="xsd:string" minOccurs="0" form="qualified" />
    <xsd:element name="Value" type="xsd:string" minOccurs="0" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GovTalkMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="EnvelopeVersion" type="xsd:string" form="qualified" />
    <xsd:element name="Header" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="MessageDetails" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Class" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="UnicodeNameString">
    <xsd:maxLength value="32" />
    <xsd:minLength value="4" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Qualifier" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="request" />
    <xsd:enumeration value="acknowledgement" />
    <xsd:enumeration value="response" />
    <xsd:enumeration value="poll" />
    <xsd:enumeration value="error" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Function" minOccurs="0" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="list" />
    <xsd:enumeration value="read" />
    <xsd:enumeration value="delete" />
    <xsd:enumeration value="add" />
    <xsd:enumeration value="submit" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="TransactionID" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:maxLength value="32" />
    <xsd:pattern value="[0-9A-F]{0,32}" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="AuditID" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:maxLength value="32" />
    <xsd:pattern value="[A-F0-9]{0,32}" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="CorrelationID" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="0" />
    <xsd:maxLength value="32" />
    <xsd:pattern value="[0-9A-F]{0,32}" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ResponseEndPoint" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:string">
    <xsd:attribute name="PollInterval" type="xsd:integer" default="2" />
    </xsd:extension>
    </xsd:simpleContent>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Transformation" minOccurs="0" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="XML" />
    <xsd:enumeration value="HTML" />
    <xsd:enumeration value="text" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="GatewayTest" type="xsd:integer" minOccurs="0" form="qualified" />
    <xsd:element name="GatewayTimestamp" type="xsd:dateTime" minOccurs="0" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="SenderDetails" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="IDAuthentication" minOccurs="0" />
    <xsd:element name="X509Certificate" minOccurs="0" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:base64Binary" />
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="EmailAddress" minOccurs="0" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="129" />
    <xsd:minLength value="3" />
    <xsd:pattern value="[A-Za-z0-9\.\-_]{1,64}@[A-Za-z0-9\.\-_]{1,64}" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GovTalkDetails" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Keys" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Key" minOccurs="0" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:token">
    <xsd:attribute name="Type" type="UnicodeNameString" use="required" />
    </xsd:extension>
    </xsd:simpleContent>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="TargetDetails" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Organisation" minOccurs="0" maxOccurs="unbounded" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1" />
    <xsd:maxLength value="64" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GatewayValidation" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Processed" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="no" />
    <xsd:enumeration value="yes" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Result" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="pass" />
    <xsd:enumeration value="fail" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ChannelRouting" minOccurs="0" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Channel" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="URI" type="xsd:anyURI" minOccurs="0" form="qualified" />
    <xsd:element name="Name" type="xsd:string" minOccurs="0" form="qualified" />
    <xsd:element name="Product" type="xsd:string" minOccurs="0" form="qualified" />
    <xsd:element name="Version" type="xsd:string" minOccurs="0" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ID" minOccurs="0" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:string">
    <xsd:attribute name="Type" type="xsd:string" use="required" />
    </xsd:extension>
    </xsd:simpleContent>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Timestamp" type="xsd:dateTime" minOccurs="0" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GovTalkErrors" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Error" maxOccurs="unbounded" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="RaisedBy" type="xsd:string" form="qualified" />
    <xsd:element name="Number" type="xsd:integer" minOccurs="0" form="qualified" />
    <xsd:element name="Type" form="qualified">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="fatal" />
    <xsd:enumeration value="recoverable" />
    <xsd:enumeration value="business" />
    <xsd:enumeration value="warning" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Text" type="xsd:string" minOccurs="0" maxOccurs="unbounded" form="qualified" />
    <xsd:element name="Location" type="xsd:string" minOccurs="0" maxOccurs="unbounded" form="qualified" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GatewayAdditions" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:any namespace="##local" processContents="strict" />
    </xsd:sequence>
    <xsd:anyAttribute namespace="##local" processContents="strict" />
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Body" minOccurs="0" form="qualified">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="ns1:IRenvelope" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:simpleType name="UnicodeNameString">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[\p\p_\-\(\)\{\}]*" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>

  • 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.

  • Severe Problem With Message Mapping

    Hi,
    I have got a message mapping which results in the following XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns14:expost_generation xmlns:ns14="http://mywebsite.xsd">
      <timeStamp>2006-03-15T15:27:16</timeStamp>
      <source name="xyz">
        <generation date="abc" value="def" />
        <generation date="abc" value="def" />
        <generation date="abc" value="def" />
      </source>
    </ns14:expost_generation>
    My problem is that I have to suppres the ns14 prefix. The opening tag should be: <expost_generation xmlns="http://mywebsite.xsd">
    The closing tag: </expost_generation>
    Does anybody know how to achieve this?
    Kind regards,
    Heiko

    Hi Heiko,
    on the level of the expost_generation-Tag the two definitions you gave are logically equivalent. Hence, no software consuming the XMLs should prefer one style.
    However, when we look at the subelements there is a great difference.
    In the xml you posted first all subelements (timeStamp, source,...) lie in no namespace.
    On the other hand when you declare the tag expost_generation as you described afterwards (with a default namespace declaration) and then proceed as in the first example, then all the subelements will lie in this namespace, too (unless you again reset the default namespace in all these elements).
    I assume that the Schema you use in the Message Mapping describes a document with only the root being namespace qualified but the service consuming the document expects a document with all tags being namespace qualified.
    Greetings
    Stephan

  • UDF Problem in message mapping

    Hi,
    I have proxy to file scenario where i am getting mapping error
    Runtime exception during processing target field mapping /ns0:DataManagement/payrollArea. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._DataManagement_to_DataManagementM4_ method SetFileName$[, com.sap.aii.mappingtool.tf3.rt.Context@1861efad].
    There is one UDF Set file Namewhich t is throwing  error.
    UDF Setfilename
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    String targetFileName="DMS_" + a + ".dat";
    conf.put(key,targetFileName);
    return a;
    Please help me in this issue.
    Thanks in Advance

    Hi,
    This error will not come while actual run of scenario.
    During Testing Message mapping, this might be coming to you, but while actual run scenario will work fine.
    and one more thing ...
    please your code inside try .. catch block of java code
    try
    /* your actual code */
    catch(Exception e)
    String exception = e.toString();
    return exception;
    Hope this will help you.
    Regards
    Prabhat Sharma.

  • Problem in message mapping file to xml

    Hi all,
    I´m new to XI and need to do a mapping from a file like structure to a nested xml structure.
    The weblog (splitbyvalue----
    >formatbyexample->
    ......................................................Constant(1)----
    >equalsS->createif->tk
    Is that right?
    How can I map for ? I don´t get the correct itens to the correct tk...
    Thanks,
    Marco Galhardi.

    Sorry,
    I´ve only written a model like in Integration Builder Design Message Mapping.
    Here is the expected xml result:
    Thanks again

  • CSV to XML problem in message mapping

    Hi,
        I am trying for a CSV to XML scenario. But i am confused with the message mapping.
    Can anybody please help me by giving demo example of this???
        Thank you.
    Regards,
    Atul

    Hi
    Kindly have a look at this SDN TVdemo VALUE MAPPING REPLCIATION for all answers,
    https://www.sdn.sap.com/irj/sdn/developerareas/xi?rid=/webcontent/uuid/a680445e-0501-0010-1c94-a8c4a60619f8 [original link is broken]
    http://help.sap.com/saphelp_nw04/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    IR: Message Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
    hope this helps!
    best regards,
    Thangesh

  • Conversion condition problem in message mapping

    Dear Friends,
    I am sending the ORDERDS02 Idoc from one ECC to another ECC using PI7.0.
    In receiver system my condittion is:
    1) IF E1EDK01-BSART = DVBFand E1EDKA1-PAORG = MF20  then E1EDKA1 PARTN = 50057 & A59991
    2) IF E1EDK01-BSART = DNBFand E1EDKA1-PAORG = MG20 then E1EDKA1 PARTN = 50055 & A59990
    In first condtion I am receiving the result as per the requirement(50057 &  A59991)
    but in second condition I am getting only 50055 , I am not getting A59990 .
    I am checking the Queues in message mapping it is showing 50055 & A59990, but it is updating  only 50055.
    In queues it is showing like:
    sender:                target:
    50055                 50055
    A59990              SUPPRESS
    Please suugest me any thing I  have to do in message mapping.

    Hi,
    Can you tell me how it has been mapped now.  Since you are using header segment, it should contain only one value. So, I would not suspect that it might not be an issue with context.

  • Problem with Message-Mapping: Loop over Elements possible?

    Hi all,
    I want do create a Message-Mapping for an IDoc-to-File Scenario. In the Source Structure there are some Elements which can appear more than once (1..unbounded). I need a mechanism which loops over these elements and search for specified values. From the Element which contains an element with this specified value the mapping should write a value in the target structure.
    Here a simple example (source structure) for better understanding:
    <root>
       <invoice>
          <number> 10 </number>
          <sum> 200.00 </sum>
       </invoice>
       <invoice>
          <number> 20 </number>
          <sum> 150.00 </sum>
       </invoice>
       <invoice>
          <number> 30 </number>
          <sum> 120.00 </sum>
       </invoice>
    </root>
    Now the duty of the Mapping should be to search in the elements <invoice> for the number 30. And then the sum of the invoice with the number 30 should be written in a field of the target structure.
    I tried it out with a constant togehter with an equalsS-function and an ifWithoutElse-function, but it is working only then, if the invoice with the number 30 has the first position in the root context.
    Can anybody help me? Thanks
    With kind regards
    Christopher

    Hi,
    Write a UDF to sum the required values and map to target node.
    See while writing the UDF select the type as queue.
    number -- removecontext-UDF targetnode
    sum----removecontext--/
    number abd sum or the two inputs
    in UDF
    int nsum = 0;
    for(int i;i < number.length;i++){
      if number(i).equals("30") then
         nsum = nsum + valueOf(sum(i));
    result.addValue(nsum); // convert the nsum into string
    Regsrds
    Chilla

  • Problem in message mapping (outbound IDOC ORDERS05 from SAP R/3)

    Hi to all,
    I have an outbound interface from sap r3
    sap r3 --> XI --> ftp server
    idoc --> XI --> text file
    Using IDOC orders05
    The problem is in segment E1EDP01/E1EDP19
    Segment E1EDP01 is unbounded and i map it well. If it contains E1EDP19, works fine. But in some cases, E1EDP19 not appears at E1EDP01segments. So then XI fails at mapping:
    IDOC OUTPUT (OK)
    1-E1EDP01/E1EDP19
    2-E1EDP01
    3-E1EDP01/E1EDP19
    4-E1EDP01
    XI WRITES (FAILURE)
    1-E1EDP01/E1EDP19
    2-E1EDP01/E1EDP19 (INFORMATION FROM LINE 3)
    3-E1EDP01 (WRONG)
    4-E1EDP01 (WRONG)
    You can take a look of Mapping mode here:
    <a href="http://img505.imageshack.us/my.php?image=orders05mappingcj8.jpg">[IMG]http://img505.imageshack.us/img505/1536/orders05mappingcj8.th.jpg[/IMG]</a>
    We don't use BPM and wanna use a solution without it.
    Pls ask me for more information if necessary.
    Thanks a lot for your help; Regards

    Hi all,
    The mapping function includes an exists and a mapwithdefault.
    Now the creation of the segment is handled ok, but not as well its fields. Its unable to determine the write of the second E1EDP19 segment and it does:
    1- OK
    2- OK
    3- Writes E1EDP20 but not the 19
    4- OK
    Thanks for your interesting

  • Problem in message mapping while generating multiple record

    Hi experts,
                     I am doing an idoc to file scenario in which E1FISEG SEGMENT is coming multiple time and if it contains two field ebeln & sgtxt then only it has to create corresponding data record I used following logic ..............
    eibeln[change context to one level upper] --->Exist
    > AND-> Createif Target
    sgtxt[change context to one level upper] -
    >Exist
    and achived creation of data record but the problem is that if EIFISEG occurs five time and only two time it contains eibeln& sgtxt then its creating only two data record but its taking data from first and second E1FISEG segment instead of corresponding E1FISEG which satisfy the condition......Plz help its bit urgent
    Regards
    Neha

    First take out the Context Change for each element EIBELN and SGTEXT and do the maping . Before the Createif Use the remove context node function. It will work fine.
    So EIBELn and SGTXT exist pass after If condition it will pass the elements with context change inside. Now use the remove context method to combined those values then definetly it wil work out
    Warm Regards,
    Vijay
    Message was edited by:
            Gangisetty Vijaya Bhaskarudu

Maybe you are looking for

  • IPhone 4s - Charges in Dock but not with Charger...help!?

    Hi, I just got an iPhone 4s around a month ago and its behaving quite strangely when it comes to charging. Initially charging worked fine when I used the wall charger that came with the phone, but about a week later it began to stop charging (it woul

  • Wrong posting key in fb60

    hi, I have this problem , which has to solved quickly. In tcode fb60 the posting key is 31 ...resulting in some error pop up message. it has to be 39. may be some body has done some changes . how wil i know who has changed it and where he has changed

  • Functions of DMS

    Hi all, Our company is planned to implement DMS, but actually, I myself do not much about DMS. I just would like to know whether DMS can fulfill the following requirements or not. I Highly appreciate DMS experts for your support. Please help me on an

  • Compose Message problem using Verizon webmail

    On my Windows 7 machine, using either Chrome or Explorer to access the Verizon webmail page,  I unable to compose a message.   The compose message window will not open after clicking GO.   Yet when I use my Vista machine there is no problem.    Any s

  • Computational search in hashtable

    Hi experts, I have the following situation. I have 25 apples and want to give away these apples to a list of people who need them stored in hashtable. Each of these people has indicated the quantity which they need. How to do give away exactly 25 app