JAVA Mapping--Multi Mapping

I have a source message below structure
Purchaseorder
*ProduletLineItem
If suppose 2 product line items occur
the target message should occur 2 times
Purchaseorder
ProductLineItem
Purchaseorder
ProductLineiItem
i have to see 2 messages in SXMB_MONI.
Using JAVA SAX Parsing mechanism i have to implement, its little bit tricky...
anybody help me..
Regards,
Raja Sekhar

You can write some loop for it..
the logic would be...
startElement code...
if startTag.equals("ProduleLineItem") {
       printPurchaseOrder();  // call method
printPurchaseOrder() { // method definition
<Purchaseorder>
<ProductLineItem>
print the value for ProductLineItem
</ProductLineItem>
<Purchaseorder>

Similar Messages

  • Issue with java mapping in a multi-mapping scenario

    Hi
        We have  a 1:n multiple mapping scenario in XI and the source is R3 proxy and target side is files. So, creating multiple file from a single message from R3 .
    R3 --> XI --> Multiple files
    Structure of the output of the multi-mapping is
    - <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    - <ns0:Message1>
    <Transaction>
    </Transaction>
    <Transaction>
    </Transaction></ns0:Message1>
    </ns0:Messages>
    wherein each Transaction node represents a file.
    Now, we need to introduce a constant /string like
    <!DOCTYPE Transaction PUBLIC \"-//XXXXXX//DTD BatchReceiptAuthorization//EN\" \"http://dtd.XXXXXXX.com/dtds/ReceiptAuthorization.dtd\">
    on each of the files at the very beginning - i.e within each transaction node , in the above structure, we need the above DTD string to be written.  To do this, we added a java mapping as the second mapping after the message mapping that creates this string. Is this the right approach and would it produce what we are expecting ?
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.DynamicConfiguration;
    import com.sap.aii.mapping.api.AbstractTrace;
    public class ModifyRootAndDelay implements StreamTransformation {
         AbstractTrace myTrace;
    public void execute(InputStream input, OutputStream output) throws StreamTransformationException {
              try{
                   BufferedReader reader = new BufferedReader(new InputStreamReader(input));
                   String NameSpacePrefix = "<!DOCTYPE Transaction PUBLIC \"-//innotrac//DTD BatchReceiptAuthorization//EN\" \"http://dtd.innotrac.com/dtds/ReceiptAuthorization.dtd\">";
                   String sLine = null;
                   StringBuffer XmlMsg= new StringBuffer();
                   String Result,PayloadBody;
                   int indexOfFirst;
                   while ((sLine = reader.readLine()) != null) {
                        XmlMsg.append(sLine);
                   String StartingTag = XmlMsg.toString();
                   indexOfFirst = StartingTag.indexOf("<MerchantID>") ;
                   PayloadBody=new String(XmlMsg.substring(indexOfFirst));
                   Result=NameSpacePrefix.concat(PayloadBody);
                   output.write(Result.getBytes());
              /*     Thread.sleep(200000); */
              }catch(Exception e){
                   myTrace.addWarning("Exception raised in the JavaMapping:modifyNamespace.java""\n The Exception Message: " e.getMessage());
                   throw new RuntimeException(e.getMessage()) ;
            }     public void setParameter(Map param) {
              myTrace = (AbstractTrace) param
                        .get(StreamTransformationConstants.MAPPING_TRACE);

    Hi XI Gurus
                       In my scenario, I sent the inputstream that is being passed to the Java execute method - to trace and I see that the whole of the xml file - as shown below  - which is the output of message mapping ( from the first mapping step ) in sent to the execute method of the java mapping a single call
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <Transaction> </Transaction>
    <Transaction> </Transaction>
    </ns0:Message1>
    <ns0:Messages>
    So, I modified Java mapping program to look for multiple occurences of <Transaction> tag and prefix them with my constant DTD Literal - which is the primary reason , why I had to use Java mappings after the message mapping.
    Now, I get an error is XI- SXMB_MONI
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING" />
      <SAP:P1>unexpected symbol; expected '<', '</', entity refe</SAP:P1>
      <SAP:P2>rence, character data, CDATA section, processing i</SAP:P2>
      <SAP:P3>0</SAP:P3>
      <SAP:P4>113</SAP:P4>
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>The exception occurred (program: CL_XMS_MAIN===================CP, include CL_XMS_MAIN===================CM00A, line: 609)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Should I create multiple outputs - as many as the numberof target split files ( of type outputstream ) from the execute method in the java program ?

  • How to achieve Java Multi-mapping in PI 7.31?

    Hi,
         I have a simple file to file scenario. Want to do 1:n transformation using java mapping.
         Followed this link  Multi-Mapping using Java Mapping - Process Integration - SCN Wiki . But the result was a single message with three root segments. where as the requirement is to get three messages each having one root segment. Please suggest how can we achieve this.
    PS: Please suggest a solution specifically using java mapping.
    Thanks

    Hi Nisar,
    I had the same issue when I was trying to achieve this. I am able to create the target structure with multiple subsegments but unable to get them in individual multiple messages.
    Sumit

  • Multi Mapping using JAVA Mapping 1:n Transformation--Urgent??

    Hi,
    I have to make a 1:n Mapping with the JAVA Mapping. The situation is as follows:
    I have 1 ORDER with n positions and I have to convert this order to n ORDERS with 1 position in each order. My problem is, that I have to use the header-data of the input-order for each of the output orders and I have to use the first position of the input-order for the frist output-order the second postition for the second order and so on. Which mapping-steps do I have to use. I think this is an ordnary problem, but I could not find anything in the XI-help about this. Maybe anyon has got an idea.
    Regards,
    Raj

    hi
    The output from java mapping must look like
    <Messages>
    <Message1>
    <Your Traget Order>....
    </Message1>
    <Your Traget Order>....
    </Message1>
    </Messages>
    Create a Graphical mapping sample (1:N) to get an idea about this structure.
    refer this also
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    rgds,
    Arun

  • Multi Mapping error

    Hi,
    I am required to have a IP recieve 3 IDOC types triggered from BD10 . It can trigger 3 or more IDOCs. For Eg.
    1 ARTMAS (only 1) , 2 INFRECs and 1 LIKOND.
    If anyone IDOC has come then after a waiting period of 1 minute it should come out of FORK.
    My IP is like this.
    In a FORK there are 4 branches.
    1) ARTMAS receiver
    2) Loop(infinite) with INFREC Receiver and a Container Operation to collect all IDOCs
    3) Loop(infinite) with LIKOND Receiver and a Container Operation to collect all IDOCs
    4) A wait Step with a container operation to initialize endtime variable
    necesary branches: 4
    The Fork Comes out when the end condition is met ie the End variable is Set or if all the IDOCS have  come.
    Corelation on MATNR.
    Next I have the transormation and send step.
    In the MM i have 3 Source and 1 Target.
    Artmas 0-1 occurance
    INFREC 0 - unbounded
    LINKND 0-unbounded
    I have created the Target with External Definition and have set the correct occurance in the XSD file
    I have mapped the neceessary Segments from INFREC and LIKOND and all the Segments of ARTMAS to the Target structure.
    In SXMBMONI it says error on Outbound side and
    I see Mapping Exception  when I seen in WORKFLOW.
    Is my design Correct?
    I have tested the Interface & Message Mapping they are correct
    Request your help.
    John Rajesh
    <?xml version="1.0" encoding="utf-8" ?>
    - <MappingTrace>
      <Trace level="1" type="T">Mapping-Namespace:http://test.com/usa/SapRetail/ARTICLE_CLASSIFY/TESTDEMO</Trace>
      <Trace level="1" type="T">Mapping-Name:IM_ARTMAS04_TO_ZARTMAS04_PUB01</Trace>
      <Trace level="1" type="T">Mapping-SWCV:00000000000000000000000000000000</Trace>
      <Trace level="1" type="T">Mapping-Type:JAVA</Trace>
      <Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_</Trace>
      <Trace level="3" type="T">Multi mapping required.</Trace>
      <Trace level="3" type="T">Creating Java mapping com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_.</Trace>
      <Trace level="3" type="T">Load b8f12d30-2c45-11da-90af-ef160a892024, http://test.com/usa/SapRetail/ARTICLE_CLASSIFY/TESTDEMO, -1, com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_.class.</Trace>
      <Trace level="3" type="T">Search com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_.class (http://test.com/usa/SapRetail/ARTICLE_CLASSIFY/TESTDEMO, -1) in swcv b8f12d30-2c45-11da-90af-ef160a892024.</Trace>
      <Trace level="3" type="T">Loaded class com.sap.xi.tf._MM_ARTMAS04_TO_ZARTMAS04_PUB_</Trace>
      <Trace level="2" type="T">Call method execute of the application Java mapping com.sap.xi.tf._MM_ARTMAS04_TO_ZARTMAS04_PUB_</Trace>
      <Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_</Trace>
      <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns4:Messages/ns4:Message1/ZARTMAS04_PUB/IDOC. 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:292) at

    Check the following
    1. Have u mapped the root level element?
    2. Inside interface mapping, when u say read interface, is it diplaying both the interface.
    Also check ur input
    may be u r not providing proper input
    Regards,
    Prateek

  • SAP PI 7.3 AEX Multi mapping: Mapping failed with exception

    Hi
    I am encountering an issue with the multi mapping in SAP PI 7.3 AEX system.
    Requirement for my interface is to pull a single file which has multiple records from the file directory.
    Interface need to split the single file to multiple files.
    For this I have implemented multi mapping in SAP PI 7.3(Stand alone Java) to split the single file to multiple files just like the way it is done in SAP PI 7.1. Tried this interface in SAP PI 7.1 system and works fine end to end.
    I have done the testing in mapping(Test tab) in operational mapping, I could see response is getting generated successfully.
    But when testing end to end,
    I could see message is getting failed during mapping with the exception "failed to execute: ArrayIndexOutOfBoundsException: 1” .
    Note:
    Occurrence has been changed to 0..unbounded in the Signature tab of the message mapping & same interface works fine in SAP PI 7.1
    Our system is currently on SAP PI 7.31 (AEX) SP05 Patch "0".
    Kindly let me know if someone has any idea on this particular exception in SAP PI 7.31 multi mapping Interface.
    Thanks & Regards
    Ram

    Hi Jegathees,
    Thanks for your reply.
    In PI 7.31:
    As we are doing 1:n mapping, I have maintained the source side occurrence as "1" and target side occurrence as "0..unbounded" in the signature tab of message mapping.
    Even in PI 7.11 Occurrences were maintained in the same way.
    Can you please give me more details of how exactly multimapping in PI 7.31 is different with respect to PI 7.1
    Thanks & Regards
    Ram

  • Java Mapping, XSLT Mapping, ABAP Mapping

    Hi Experts,
                     Could any one explain what is the main features of the following Mapping. How to pick the mapping?
    Java Mapping - When to use and what is the advantage.
    ABAP Mapping - When to use and what is the advantage.
    XSLT Mapping - When to use and what is the advantage.
    Graphical Mapping - When to use and what is the advantage.
    cheers,
    Sunee

    There are 4 types of mapping in XI
    1. Graphical Mapping
    2. XSLT Mapping
    3. JAVA Mapping
    4. ABAP Mapping
    When to use Message mapping
    1 When the logic for your mapping is simple and straight forward, you can use
    Advantages of message mapping
    1)Easy to use.
    2) has GUI drag and drop.
    3) used for simple mapping cases
    4) it does not involve any complex logic
    Disadvantages of message mapping
    1)has limitation in terms of complex hierarchy
    When to use Java mapping
    1) Java mapping are used when graphical mapping cannot help you.
    Advantages of Java Mapping
    1)you can use Java APIs and Classes in it.
    2) file look up or a DB lookup is possible
    3) DOM is easier to use with lots of classes to help you create nodes and elements.
    Disadvantages of Java mapping
    1)SAX parser is not easy to develop
    2)DOM parser is intensive
    3) Java knowledge is required
    4) bit complexer
    XSLT Mapping - When to use
    1)When the required output is other than XML like Text, Html or XHTML (html displayed as XML )
    2)When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
    3)When data is to be filtered based on certain fields (considering File as source)
    4)When data is to be sorted based on certain field (considering File as source)
    5)When data is to be grouped based on certain field (considering File as source)
    Advantages of using XSLT mapping
    1)XSLT program itself defines its own target structure.
    2)XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.
    3)XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.
    4)File content conversion at receiver side can be avoided in case of text or html output.
    5)Multiple occurrences of node within tree (source XML) can be handled easily.
    6)XSLT can be used in combination with graphical mapping.
    7)Multi-mapping is also possible using xslt.
    8)XSLT can be used with ABAP and JAVA Extensions
    Disadvantages of using XSLT mapping
    1)Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
    2)Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.
    3)XSLT mapping requires more memory than mapping classes generated in Java.
    4)XSLT program become lengthier as source structure fields grows in numbers.
    5)XSLT program sometimes become complex to meet desired functionality.
    6)Some XSL functions are dependent on version of browser.
    Advantages of Abap Mapping
    1) A person comfortable with OOABAP can go for ABAP mapping instead.
    Disadvantages of Abap Mapping
    1) Abap knowledge is required
    2) bit compexer
    For further info on each of the mapping, refer to these links,
    Graphical Mapping,
    http://help.sap.com/saphelp_nw04/helpdata/en/6d/aadd3e6ecb1f39e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    XSLT Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    http://www.w3.org/TR/xslt20/
    Java Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    DOM parser API
    http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
    Check this blog on Mapping:
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    Also, check this thread for more info,
    Different types of Mapping in XI

  • Need help in Multi mapping

    Hi experts,
    we have a scenario need to send an EDI text file to 2 different receivers. We are receving the EDI file using the JMS adapter as Sender and File/FTP adapter as a receiver.
    We are using Multi mapping (includes Java mapping and Graphical ) to send the Messages to receivers, While sending we are getting the Error In Moni as "Error in creating Multi XML Document".
    In Java Mapping we are Converting the EDI text to EDI xml with <ns0:Messages1> and the output of Java mapping to Graphical Mapping,
    While testing in Interface Mapping Test it works fine.
    Please provide your Valuable inputs.
    Thanks,
    Ramg

    HI
    The below is the output im getting from Interface mapping
    =====
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1><ns2:MT_Req xmlns:ns2="http://test.com/CommonServices"><DataConversionArea><SapQtySign>P</SapQtySign><Filler>                                                              </Filler></DataConversionArea><DataElement><RspShipToLoc>000000</RspShipToLoc><Filler>                                                                       </Filler></DataElement></ns2:MT_Req></ns0:Message1>
    <ns0:Message2><ns2:MT_In_Req xmlns:ns2="http://test.com/CommonServices"><DataElements><ProdSchedNbr>             </ProdSchedNbr><Filler>0030</Filler></DataElements></ns2:MT_In_Req></ns0:Message2></ns0:Messages>
    =====
    Thanks
    Ramg

  • Multi-Mapping and Message Split using BPM UDFs Error

    hi
    As per the below blog
    Illustration of Multi-Mapping and Message Split using BPM in SAP Exchange Infrastructure
    I have just modified the UDFs(1.selectnodeifA 2.selectNodeifB)
    1.selectnodeifA
    for(int i=0;i<=n;i++)
    if(Name<i>.equals("A"))
    result.addValue(Node<i>);
    2.selectNodeifB
    for(int i=0;i<=n;i++)
    if(Name<i>.equals("B"))
    result.addValue(Node<i>);
    while checking I am getting the following errors
    Source code has syntax error: 
    D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapdc8fa4d0896011dd907d001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:132: cannot resolve symbol
    symbol : variable n
    location: class com.sap.xi.tf._bpm_mm_
    for(int i=0;i<=n;i++)
    ^
    D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapdc8fa4d0896011dd907d001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:140: cannot resolve symbol symbol : variable n
    location: class com.sap.xi.tf._bpm_mm_
    for(int i=0;i<=n;i++)
    ^
    2 errors
    The source code given in the blog is correct ? I thought for loop has not completed
    pls help
    manian

    Hi manian,
    I was having a look to Illustration of Multi-Mapping and Message Split using BPM in SAP Exchange Infrastructure blog.
    The functions are not the same. I mean, yours and blogs functions.
    Each function has two parameters, Name and node. Furtheremore, in the blogs' functions is using arrays and you don't.
    So, the right code will be
    1.selectnodeifA
    for(int i=0;i<=node.length();i++)
    if(Name<i>.equals("A"))
    result.addValue(Node<i>);
    However, if you don't need an advance user defined function as you want to process just one element of the node's queue, you will not need to use for sentence.
    Something like:
    1.selectnodeifA
    // for(int i=0;i<=n;i++)
    if(Name.equals("A"))
    result.addValue(Node);
    Hope it is usefull for you.
    Carlos

  • Multi mapping.. is it possible File to Idoc & FIle .. its urgent?????

    Hi All,
    File to Idoc & File.
    I need to pick the file and i need to do multi mapping, so that from the file we can generate
    one idoc which has to go to SAP and
    one acknowledgment's file and sent back to partner.
    Based on the below blog, looks like we can't use Idoc adapter when the target message is Idoc using Multi mapping.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Can anyone suggest me how i can achieve this scenario without using BPM.??
    Regards
    Seema.

    Hi,
    The Multi mapping is possible without BPM but not for IDOC as its not part of Java Stack. IDOC adapter is on ABAP stack.
    As Raj have suggested,
    You could create two different Mappings one for file to IDOC and another for file to file as an acknowledgment.
    In Receiver determination you need to use multiple receivers as IDOC --R/3 receiver and the File receiver system.
    It will create the IDOC as well as push the acknowledgment to file also.
    But incase if you get any problem with sending the IDOC then also you will get successful acknowledgment via file. So directly there will not be any relation between these IDOC and File receivers as an delivery recipt of IDOC.
    Here either you have to use the IDOC acknowledgment feature or BPM or Alert notification to get the exact notification about the IDOC posting to receiver system.
    Please refer below links
    1. IDOC acknowledgment
    This Feature is Available under SP 18 and we are on SP16
    http://help.sap.com/saphelp_nw04/helpdata/en/42/c8f66bc7a56bb0e10000000a1553f6/frameset.htm
    Check this document on handling IDOC acknowledgements. This might give you some pointers.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f6d2d790-0201-0010-9382-b50b499b3fbe
    This Feature is Available under SP 18 and we are on SP16
    http://help.sap.com/saphelp_nw04/helpdata/en/42/c8f66bc7a56bb0e10000000a1553f6/frameset.htm
    Check this document on handling IDOC acknowledgements. This might give you some pointers.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f6d2d790-0201-0010-9382-b50b499b3fbe
    How to Handle Acknowledgments for IDoc (NW7.0)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/903a0abc-e56e-2910-51a8-9dc616df56eb
    IDOC acknowledgements
    2. BPM
    File to IDOC with BPM
    File to idoc with BPM
    Problem in BPM implementation
    Use Aleaud in BPM
    /people/udo.martens/blog/2005/09/30/one-logical-system-name-for-serveral-bpm-acknowledgements
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
    3. Alert Notification
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step - Alert Configuration
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide - Trouble shoot alert config
    Thanks
    Swarup

  • Question with multi-mapping 1:n split scenario

    Hi
        I have a scenario with the following requirement
    R3 --> XI --> Multiple files
    I used a multi-mapping scenario  using message mapping. to get the following output
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <Transaction> </Transaction>
    <Transaction> </Transaction>
    </ns0:Message1>
    <ns0:Messages>
    Each  <Transaction> </Transaction>  produces a file in runtime. So far so good.
    Now, there was a new requirement to introduce a dtd line as the first line  in each of the target files created  - that looks like follows :
    <!DOCTYPE Transaction PUBLIC \"-//XXXXX//DTD BatchReceiptAuthorization//EN\" \"http://dtd.XXXXX.com/dtds/ReceiptAuthorization.dtd\">
    How do I go about introducing this header line above the <Transaction> node in each and every target file - that is created by multi-mapping  ? This header line is not a part of the target schema and hence cannot be mapped to as an constant element in the target.
    Any suggestions/ideas as to how this can be done ?

    Hi Gautam
        I did use a java mapping , as a second step after the message mapping - so that the dtd line can be introduced as a header for each target message/file written by the muti-mapping in the first step.
         In my scenario, I sent the inputstream that is being passed to the Java execute method  - to trace and I see that the whole of the xml file - as shown below - which is the output of message mapping ( from the first mapping step ) in sent to the execute method of the java mapping a single call
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <Transaction> </Transaction>
    <Transaction> </Transaction>
    </ns0:Message1>
    <ns0:Messages>
    So, I modified Java mapping program to look for multiple occurences of <Transaction> tag and prefix them with my constant DTD Literal - which is the primary reason , why I had to use Java mappings after the message mapping.
    Now, I get an error is XI- SXMB_MONI
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
    <SAP:Category>XIServer</SAP:Category>
    <SAP:Code area="MAPPING" />
    <SAP:P1>unexpected symbol; expected '<'</', entity refe</SAP:P1>
    <SAP:P2>rence, character data, CDATA section, processing i</SAP:P2>
    <SAP:P3>0</SAP:P3>
    <SAP:P4>113</SAP:P4>
    <SAP:AdditionalText />
    <SAP:ApplicationFaultMessage namespace="" />
    <SAP:Stack>The exception occurred (program: CL_XMS_MAIN===================CP, include CL_XMS_MAIN===================CM00A, line: 609)</SAP:Stack>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    Can you help me out here ?

  • Multi-Mapping runtime issue

    Hi, Friend:
    We are using BPM to collect two type of message (Msg1 and Msg2) and map to target message (Msg3),
                              ------Receive1-------
    Start --Fork(start)                            Fork(stop) ---Transformation--Send
                              ------Receive2-------
    When we created all the messages from scratch, the process works, the process worked.
    After we use external definition (xsd), it always fails on transformation step.
    However,if we put the payload to test in message mapping, it success.
    Any thoughts ?
    Thanks
    Liang

    Hi, Praba:
    We have tested in both multi-mapping, and also interface mapping by using the same payload the causes error in runtime, they are all fine.
    The error happens on tranformation step: some nodes have very simple mapping like one to one, it can not create target node (see attached part of trace).
    Once we change the complained node mapping from a constant value, the next test shows next target node can not be produced.
    If the node is attribute, only required attribute complains, if the node is element, the node with min occurence of 1 complains
    <?xml version="1.0" encoding="utf-8" ?>
    - <MappingTrace>
      <Trace level="1" type="T">Mapping-Namespace:http://xmlfile2xmlfile</Trace>
      <Trace level="1" type="T">Mapping-Name:Im_PBC_Audit</Trace>
      <Trace level="1" type="T">Mapping-SWCV:64968F80768C11DCC184FCEB0A01071F</Trace>
      <Trace level="1" type="T">Mapping-Step:1</Trace>
      <Trace level="1" type="T">Mapping-Type:JAVA</Trace>
      <Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_PBC_Request_Response_AuditMapping_</Trace>
      <Trace level="3" type="T">Multi mapping required.</Trace>
      <Trace level="3" type="T">Creating Java mapping com/sap/xi/tf/_PBC_Request_Response_AuditMapping_.</Trace>
      <Trace level="3" type="T">Load 64968f80-768c-11dc-c184-fceb0a01071f, http://xmlfile2xmlfile, -1, com/sap/xi/tf/_PBC_Request_Response_AuditMapping_.class.</Trace>
      <Trace level="3" type="T">Search com/sap/xi/tf/_PBC_Request_Response_AuditMapping_.class (http://xmlfile2xmlfile, -1) in swcv 64968f80-768c-11dc-c184-fceb0a01071f.</Trace>
      <Trace level="3" type="T">Loaded class com.sap.xi.tf._PBC_Request_Response_AuditMapping_</Trace>
      <Trace level="2" type="T">Call method execute of the application Java mapping com.sap.xi.tf._PBC_Request_Response_AuditMapping_</Trace>
      <Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_PBC_Request_Response_AuditMapping_</Trace>
      <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages/ns0:Message1/ns1:BenefitEnrollment. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    Thanks
    Liang

  • Multi mapping in proxy

    Hi all,
              I am Trying to do file to RFC Scenario where i have to post multiple invoices in a single bapi. I am using proxy in my scenario In such case can i do multi mapping and post the data to R/3 could you please suggest.
    Thanks in advance,
    Kalam.

    I am using proxy in my scenario In such case can i do multi mapping and post the data to R/3
    You have to use BPM for this because ABAP proxy uses the abap stack and multimapping without BPM requires java stack.
    Regards,
    Prateek

  • Multi Mapping

    Hi all,
    I need a help on how to go about the following scenerio.
    XI first performs a multi-mapping that creates two output messages:
    One is the target message in Flat File Format. The mapping also generates the filename for the output message which should follow the format 11_<Unique ID>.txt. This filename is written into the XML Payload of the message. The File Adapter later does a flat file conversion on the message. In this step, the filename is not written into the flat file. Instead, it is used by the file adapter as the target filename.
    The file should be placed in a specified directory. 
    The mapping also creates a second message, which only contains the same filename in the payload. This message goes to a second File Adapter, which also does a flat file conversion. Its output only contains the filename that was created by the mapping, followed by a line break. The output of this File Adapter is written into the same directory as the first file. The name of the output file is 11.catlg. If the file already exists in the target directory, the output needs to be appended to this file.
    Thankyou.

    Shruthi,
    It seems the payload contains the filename and this filename as to be used in the Communication Channel of file adapter.If my understanding is correct the problem can be solved by the Variable substitution. Refer the below link:[http://****************/Tutorials/XI/Variable/substitution.htm]
    Regards,
    Kiran Bobbala

  • ABAP , JAVA And XSLT Mapping Doc's

    Hi,
    I am new to SAP XI Any body please send me the Doc's Related to ABAP, JAVA And XSLT Mappings. Thanks in Advance.
    Regards
    Kiran.B

    Hi
    Refer to
    ABAP mapping:
    How to Use ABAP Mapping in XI 3.0
    JAVA mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/bd/c91241c738f423e10000000a155106/frameset.htm (Java mapping)
    XSLT mapping:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    XSLT - /people/dirk.roeckmann/blog/2006/07/26/grouping-xml-with-xslt--from-muenchian-method-to-xslt-20
    Regards,
    Kumar.
    Reward points if helpful!!

Maybe you are looking for