Multi Mapping to multi receiver

Hello all,
I having a req that incoming IDoc hac multiple files say,
<IDoc Name>
     <IDoc>
          <Field1>
          <Field2>
     <IDoc>
          <Field1>
          <Field2>
     <IDoc>
          <Field1>
          <Field2>
Based on field 2 i need to send multiple receiver. For ex if my field2 is 10 i need to send receiver 1, if my field2 is 20 i need to send receiver 2, if my field2 is 30 i need to send receiver 3 and so on..
I searched google and unable to get solution. Please help out of this. This is in high priority.
Regards
Amar

Hi Amarnath,
You can achieve your requirement in two ways.
1)Multi mapping
2)Enhanced receiver determination , (map b/w sender structure,receiver1 structure),(map b/w sender structure,receiver2 structure),...
I personally prefer 2nd option because it looks very clean design and efficient than multi mapping.
2)In enhanced receiver determination use the below udf.
field2-->mapwithdefault-->remove context-->sort-->splitbyvalue (valuechange)-->collapsecontest-->udf-->receiver1,service1,receiver2,service2..............
for(int i=0;i<n;i++){
     if(input[i].equals("10")){
          receiver1.addValue("");
          service1.addvalue("BSNAME");
else if(input[i].equals("20")){
          receiver2.addValue("");
          service2.addvalue("BSNAME");
In individual mappings just send those respective records
field2-->mapwithdefault-->remove context-->equals("10")-->if-->mt_receiver1
field2-->mapwithdefault-->remove context-->equals("20")-->if-->mt_receiver2
NOTE:We need to go for either of the above approach because we need to check record in sender structure .
Regards
Venkat

Similar Messages

  • Interface Mapping for enhanced Receiver Determ. in Integration Scenario

    Hi guys,
    Defining Integration scenario is a pleasant way working with XI.
    But how to define the step "enhanced receiver determination" via message mapping in a scenario?
    has anybody come along to this issue?
    Kind regards
    Jochen

    hi,
       You use an enhanced receiver determination to have a mapping program determine the receivers of the message dynamically at runtime. Instead of creating the receivers in the receiver determination manually, you assign a mapping to the receiver determination and this returns a list of receivers at runtime.
    A typical usage case is if you do not yet know the names of the receivers at configuration time. In this case, you can define a mapping program, for example, which reads a list of receivers from a table or from the payload of the message at runtime.
    http://www.****************/Tutorials/XI/RecvDetermination/Enhancement.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm
    Edited by: murali krishna on Sep 1, 2008 5:49 PM
    Edited by: murali krishna on Sep 1, 2008 6:03 PM

  • SP14 Multi-mapping - error in receiver idoc adapter

    Hi,
    I have a scenario where a business service should send some XML to SAP CRM. I get the file via a sender JMS adapter and try to post it to CRM via a receiver IDOC adapter.
    I have created a multimapping (1:N - 1 XML file to many Idocs) as should in the repository.
    In the configuration under Interface Determination, I have chosen 'RB_SPLIT' and selected the interface multimapping.
    It should be pointed out, that when testing both interface and message mapping i get no error. All idocs seem to be created as they should.
    When testing the setup 'real life' the message fails. The error message in the monitor says:
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_WRONG_INTF</SAP:Code>
      <SAP:P1>InterfaceCollection</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Unable to interpret IDoc interface InterfaceCollection</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Notice that the above error is when trying to send only 1 record, which in turn then should result in only 1 idoc.
    If trying to send multiple XML records, i get the following error:
    - <!--  Technical Routing
      -->
    - <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="OUTBINDING">MMF_ENGINETYPE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>A system error occurred in the outbound binding</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    In the monitor in the payload of 'Request message mapping' I see as many Maindocument, Submaindocument pairs as should be Idocs.
    Now i really don't know how to interpret the error messages in both cases, so I'm a little lost here...
    It should be pointed out that the idoc being used everywhere in this scenario, has not been modified - from all places it is being used (and only exists) in the 'Imported objects | Idocs' place.
    Also the Idoc is also being used as Inbound interface - so no mistakes here either.
    I really hope someone can help me here, as I'm otherwise pretty stuck in this case.
    Best regards,
    Daniel

    Hi Daniel,
    I have exactly the same type of scenario (under SPS14 and now also SPS15), sending an XML message over JMS to XI and trying a multi-mapping to many IDocs (actually a list of orders in XML is mapped to n ORDERS Idocs).
    I also face problems doing so, when I use the IDoc Adapter as outbound in the Receiver Agreement. I receive the following error:
    <i>CO_TXT_MMF_ENGINETYPE
    Messages in multi message format can be sent to one adapter engine only</i>
    However, I tested the same scenario by just changing the Receiver Agreement to a File Communication Channel and - surprise, surprise - it works. One file per IDoc is created.
    Of course, this is not what we want to accomplish, but when I checked this piece of documentation (sorry another link
    http://help.sap.com/saphelp_nw04/helpdata/en/42/ed364cf8593eebe10000000a1553f7/content.htm
    the IDoc adapter is not listed in the list of Adapters that are supported. Does that mean, that this feature is not supported for generating IDocs? Maybe that's a question for a SAP OSS Message?
    I hope that helped you a little further - if you find out more I'd be happy to learn about it.
    regards,
    Peter

  • Multi Mapping for JDBC Receiver JDBC Adapter

    Hi All,
        I'm trying an IDoc to JDBC (canonical XML) scenario using multi mapping (single IDoc as source and two different JDBC messages in receiver end). But, this is failing in RWB with some parser error. So, am not sure whether multi mapping is allowed for JDBC Canonical XML format. Please clarify.
    Thanks,
    Hussain.

    Hi ,
    JDBC Adapter supports multi mapping,so you can implement the same,but what do you mean by Canonical XML format??
    Regards,
    Raj

  • Message Split - Multi receiver - Different mappings

    Hello Friends,
    we get different mapping results in integration Repository Mapping tool and Integration Directory test configuration. 
    Mapping is working fine with mapping test tool in Integration Repository.
    Link:[Screenshot1|http://koekce.com/XI/pics/IR.PNG]
    In the receiver Determination we use the condition editor.
    Link:[Screenshot2|http://koekce.com/XI/pics/id2.PNG]
    Test configuration in the ID displays no errors but the mapping result itu2019s different.
    Link:[Screenshot3|http://koekce.com/XI/pics/id4.PNG]
    Please suggest me in this regard.
    Thanks in advance.

    Message mapping in IR working fine but when we load the test data into config test tool in Integration Directory then we get this message below;
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    payload needed
    </ns0:Message1>
    </ns0:Messages>
    [Screenshot3|http://koekce.com/XI/pics/id4.PNG]

  • Help help.i will crazy,about multi receiver

    Hi  Expert:
    i  have a scenaria  of one sender and two receiver, (JDBC< ->PI <->JDBC), because i need the status of data items deliverry to receiver database, so i must use bpm , the interface of bpm which communicate with the muti-database is synchronize and abstract.  i have do all the step , but failed, may the the bpm'interface (synchronize )can not have muti receiver. how can i do ,anyone have some idea,
    for example, my input message is :
    <root>
    <item>
    <country>china</country>
    </item>
    <item>
    <country>American</country>
    </item>
    </root>
    because i want send the message to different country accord the country element, so the message must split into two messages like this:
    message1:
    <root>
    <item>
    <country>china</country>
    </item>
    </root>
    message2:
    <root>
    <item>
    <country>American</country>
    </item>
    </root>
    does pi can finish this solution,if pi can, how can i do?
    thanks 
      best regards

    does pi can finish this solution,if pi can, how can i do?
    Yes PI/XI can handle it....Use Multicast....go through the below link and make your design accordingly.....
    http://help.sap.com/saphelp_nw70/helpdata/EN/11/13283fd0ca8443e10000000a114084/frameset.htm
    Regards,
    Abhishek.

  • Issue with Mapping Spaces for Receiver Flat File Fixed Length

    Hi Mapping experts,
    my scenario is receiver FILE (fixed length)
    so if a validation applied on a target field returns false then I need to pass the spaces having the number of characters defined for that field
    example
    targetField length = 8
    using "IF" function to perform validation,   if validation is true  THEN = FIELD
    if validation is false ELSE = "________"    (underscore to represent 8 spaces)
    the problem is the validation is of multiple occurences in one queue and if the "true" statement is on the 6th row, I get _________ which is the value of the 1st row (which is correct because rows 1 to 5 are all false therefore having the value of ELSE which is _______ mapped to it)
    How can I get the value of the TRUE row regardless of what row it is located?
    e.g. IF = input is 5 rows of validation,     TRUE is in the 3rd row,   i will get the 3rd row value
           IF = input is 5 rows of validation,     NO TRUE Value,   return 8 spaces
    right now when i Display Queue values are
    iF:in0          iF:in1          iF:in2          iF:out
    1111          false          [_________]     [_________]
    2222          false                    [_________]
    3333          true                    3333
    4444          false                    [_________]
    5555          false                    [_________]
    In above Queue i only get the value of the 1st row which is ________   --> because my target field occurrences definition in Data Type is 0....1
    if I change Data Type occurrences to 1...unbounded I get 5 target fields generated --> WRONG because target file is fixed field, so only one occurence of that target field is required

    Can you give me the idea of what validation are you using so that anyone can help you with the UDF straightaway
    because you need to have a UDf in place which will iterate the number of times the field occurs and then it will check the entire queue first ,where validation is true and only at the instant it will return the value
    if the entire queue is value it will return the  8 underscores
    I hope this is what you wanted
    regards
    ninad

  • XSLT Mapping Error while receiving Base64Binary content

    Dear Experts,
    I am new to SAP PI and working on PI 7.11. In our project we had a requirement to receive PDF file content in Base64 format from third party system by consuming the service provided by third party system with synchronous communication. The adapter we need to use is SOAP
    The reason to use XSLT mapping is as our third party system used some tokens in both the request and response header, I used XSLT mapping to add the required details in request header after receiving the request from ECC system and skip the details in response to send the response to ECC system.
    I have build two XSL files with XSLT mapping programs one for request and another for response using Oxygen XML editor tool. Both are checked, validated without any errors and also tested in ESB – Operation mapping which is successfully executed without errors.
    The third party is sending the PDF content in Base64Binaryformat. I have also tested the WSDL from Oxygen to check the whether the service is working fine, which also successfully receiving the response from third party system. 
    The thing I do not understand and not able to figure out the problem is, when executing the service from ECC by sending a sample request, there is no response coming back and receiving an error saying
    “TransformerException occurred during XSLT mapping Response_03 (URN:COM.XYZ_GET_ABSENCE_DETAILS, aa3a6491-e318-11e2-c1d7-c14948250cb4, -1)”
    I have checked the Communication Channel which working fine. And also the message status in message monitoring wherein Request message has “Cancelled with errors” status and Response has “To Be Delivered” Status.
    Could you please any of you help to figure out the issue and resolve the same.
    Thank you in advance.....
    Regards,
    Govardhan Duvva.

    The response am receiving is like below
    <!-- XML Validation Inbound Channel Response -->
    <html><head><title>Apache Tomcat/6.0.18 - Error report</title><style>
    <!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
    H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
    H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
    B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
    P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
    A {color : black;}A.name {color : black;}HR {color : #525D76;}-->
    </style> </head><body>
    <h1>HTTP Status 415 - </h1>
    <HR size="1" noshade="noshade"><p>
    <b>type</b> Status report</p><p><b>message</b>
    <u></u></p><p><b>description</b>
    <u>The server refused this request because the request entity is in a format not supported
    by the requested resource for the requested method ().</u>
    </p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
    And also in SXMB_MONI, there are two call adaptor nodes as in below picture, which means our request is going to the third party system ?

  • Message Mapping: Constants 'Sender' / 'Receiver'

    Hallo
    Can anyone of you tell me there I can find some information about the constants 'sender' and 'receiver' which can be found when designing the message mapping?
    Kind regards,
    Mathias

    Satish, thanks for that link!
    @Hemant:
    I have an asynchronous message A call scenario (SOAP->XI->RFC). In our scenario multiple clients can send SOAP messages to one service provider. Once the service provider has processed a request, it sends another asynchronous message B to XI containing response messages. But how can XI now handle the correct recipient at runtime?
    Therefore I thought to enhance the initial message A from XI->RFC with sender information (sender constant?). So that the "response message" B also contains the original sender information and XI can use this information as context object to determine the correct receiving system.
    Can this approach work?
    Regards, Mathias

  • ABAP Mapping :: for multi files

    Dear Experts,
    We are doing an Idoc to file interface, using ABAP mapping.
    This is 1:n mapping i.e receiver message interface is 0..unbounded.
    We have achieved the mapping for 1:1. But when I test for multi, i get an error in moni saying
    Parsing error after multi mapping.Expected Message<i> instead of Item
    Item is the name of the node that has to be created multiple times.
    Has anyone done multi mapping in ABAP?? Any idea why this error....may be we are missing something.
    Any idea as to how we can progress???
    Thanks in advance
    Regards
    Shobha

    Hi,
    Surely u can use an ABAP mapping for this.
    Sounds like your problem is your not using correct output structure for multi mapping.
    As with any type of multi mapping your structure should reflect this. Your target payload must thus have the following structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
         <ns0:Message1>
              <unboundedPayload/>
         </ns0:Message1>
    </ns0:Messages>
    The <unboundedPayload> element in above should of course be replaced with your actual payload - I believe 'Item' in your case, if that is in fact the root node of your actual payload.
    Regards,
    Daniel

  • Mapping condition in multi mapping

    Hi Experts,
    I have a 1:n multimapping where I have a mapping condition such that
    If the field is empty ith should throw an error.
    At the same time the n-1 records should be processed...
    The UDF i have used is
    if (a == "")
    throw new RuntimeException();
    else
    return a;
    As of now the entire interface fails ...
    Any idea on what I should do???

    Hi Ravi,
    What i understood your requirement is suppose if you have 100 records in one file you are sending as a individual BAPIs messages ,if there is no value for certain filed you need to stop the process and with alert email.
    my solution for this read one record at a time from CSV,set record set per message value in sender file adapter is 1,it reads one record at a time,then check the condition in mapping,use enhanced receiver determination to check the condition.
    Create one service for sending an email,use mail adapter,one bussines system for RFC.
    if your condition fails(no value)then cal service to send an email,if condition succes then sal bussiness system in and develope interface mapping for the same.
    You need to check the every record ,i think you can use my approach,any clarifications needed let me know.
    Regards,
    raj

  • Multi Message Mapping without BPM: Limitaions

    Hi Crew,
    I have done this one(without BPM)
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3115. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    I understood that there cannot be multiple receiver services.
    This message splitting can be done only with one sender and one receiver business services (with many communication channels) without BPM.
    Am I right?
    Are there anymore limitations than this?
    Regards,
    Karthik kaveriselvan.

    <i>select multiple receivers using the + button.</i>
    one sender service.
    two receiver service referring to one target interface each with one communicaiton channel each.
    Two interface determination for two business services and they both are refering to the same enhanced interface mapping.
    Created receiver determination and added the two receiver service to it, but when looking at the configuration overview for receiver determinaiton, for each service, both the target interfaces used in interface mapping are listed and the reciever determination shows "Does not exist".
    When I run the scenario, I get "No receiver agreement found" error.
    Please calrify how many receiver agreements have to be configured and how?
    Thanks
    karthik

  • Oracle Multi-Bytes vs Single-Byte

    Hi,
    We have to add japanese to our application, i had succesfully add japanese data in our single-byte database,
    so why should we use a Multi-byte DB?
    what is the gain to use a Multi byte DB vs a Single Byte?
    does intermedia work with japanese in Single Bytes?
    Is utf8 the best way to have an international DB?
    We will have to add a lot of other char-set in the future.
    Thanks

    so why should we use a Multi-byte DB?
    what is the gain to use a Multi byte DB vs a Single Byte? What you are doing is storing invalid multibyte characters into a single byte database. So each double byte Japanese characters are being treated as 2 separate single byte characters. You are using an unsupported but common garbage in garbage out approach, so in that sense you are using Oracle as a garbage container. :)
    Let's look at some of the issues that you are going to have :-
    All SQL Functions are based on the property of the single byte database character set WE8ISO8859P1. So LENGTH(), SUBSTR (), INSTR (), UPPER(), NLS_UPPER etc .. will yield incorrect results . For example a column with one Japanese character and one ASCII character will return a length of 3 characters rather than 2 characters. And if you want to locate a specific character in a mix ASCII and Japanese string using the SUBSTR() it will be very difficult, because to Oracle the string consists of all single byte characters, it will not skip 2 bytes for a Japanese character. Even if you don't have mix strings, you will need to write one routine for handling ASCII only and another for Japanese strings.
    Invalid Data conversion , if your need to talk to another db using dblink say ,all the character conversion will be based on the single byte character set to the target database character set mapping, so the receiver will lose all the source Japanses characters and will get 2 single byte characters for each Japanese char instead .
    Export and Import will have identical problems, character set conversion are performed during these operations, so all Japanese characters will be lost. This also means that you can not load correctly encoded Japanese data into your current single byte DB using IMPORT or SQLLOADER without data corruption ...
    does intermedia work with japanese in Single Bytes?No
    Is utf8 the best way to have an international DB?Yes
    null

  • Dynamically change Receiver Business system in message mapping

    Dear all,
    I would like to change the receiver business system in the message mapping that is used in the interface determination. I do understand there is an enhanced receiver determination where I can use a mapping but that is not what I am looking for.
    I think this should be possible if we can change the appropriate value in the SOAP(message) header.
    Possible candidates I can think of by looking at the SOAP header in SXMB_MONI are
    1. SOAP:Header- SAP:Main- SAP:Receiver- SAP:Service
    2. SOAP:Header- SAP:OutboundBinding - SAP:OutboundBindingEntry - SAP:ToServiceName
    Q1. Which one of the above is relevant while identifying the receiver agreement ?
    Q2. What is the best way to access them from the mapping(preferably from a UDF) ?
    Thanks in advance.
    Cheers
    danus
    PS: I have tried to set "http://sap.com/xi/XI/System","ReceiverService" in Dynamic config & ReceiverService, BusinessSystemReceiver and ReceiverSystem in the Container’s Transformation Parameters, but didn't get the expected result.

    Chidambaram,
    You use an enhanced receiver determination to have a mapping program determine the receivers of the message dynamically at runtime. Instead of creating the receivers in the receiver determination manually, you assign a mapping to the receiver determination and this returns a list of receivers at runtime.
    A typical usage case is if you do not yet know the names of the receivers at configuration time. In this case, you can define a mapping program, for example, which reads a list of receivers from a table or from the payload of the message at runtime.
    Go through the following link:
    [Receiver Determination enhancement|http://www.****************/Tutorials/XI/RecvDetermination/Enhancement.htm]
    Hope your problem gets resolved.
    Regards,
    Kiran Bobbala
    Edited by: kiran Bobbala on May 7, 2008 5:47 PM

  • Multiple Message Mapping with same Idoc, Sender and Receiver

    Hi,
    We have one Interface sending INVOIC02 Idoc from SAP R3 4.6C to SAP R3 4.6C through XI 3.0.
    On Inbound side we are using SAP standard configuring one Partner Profile with inbound INVOIC MM process code INVL.
    In customizing, we have defined one invoic type for the EDI partner.
    Now we have to integrate another type of inbound invoic, but in customizing it's not possible to assign more than one invoic type to the same Partner EDI.
    So, we have a restriction in SAP 4.6C inbound standard. On the other hand, we can't desing two Integration Scenarios in XI 3.0 with the same idoc INVOIC02, for the same sender service and receiver service because Integration Directory doesn't allow to create two interface determination for them.
    We are thinking on using header mapping in XI (receiver agreement to avoid use the same EDI partner profile for the inbound invoic, but we can't assign the same client and technical system with the same ALE Logical System in SLD for two different business systems.
    Does anybody have any solution for this problem, SAP side or XI side?.
    Thank you
    Best regards
    Luis

    Hi!
    In XI configuration  - interface determination, you can specify more than one Inbound interface. If you identify more than one, you get a new column where you specify condition (xpath) for selecting between the different inbound interfaces.
    In 4.6c, you can have more than one inbound invoic for the same EDI partner profile, if you separate between them using message function. Just add a new inbound parameter with a different message function, or copy the one you have and specify another message function, i,e. "DIFF".
    Hope this helps.
    Regards,
    Oeystein

Maybe you are looking for

  • Large XML files, how to split and read them in PI

    Hi, For a specific requirement, we have a 60 MB-90 MB XML file being generated by a legacy application. This file has to be processed by PI 7.31 Sender File Adapter and should be posted as a ABAP proxy to SAP ECC system. To address any performance is

  • Order BOM Cost Estimate

    I am working in an MTO environment i run order bom cost estimate immediately after creation of sales order. When I save the estimate, value against condition type EK02 gets update in sales order. As far I know EK02 is a statistical condition, value i

  • You speak spanish ?? i need help with my accourt

    you speak spanish ?? i need help with my accourt

  • Can't find anywhere, is this a Bug? (javac.v8.code.ClassReader NPE)

    Have a developer on my team seeing this issue. It has repeated multiple times in his environment, but none of my other developers are having this issue. Could this be an environment issue or is it a bug? I have not found any other posts or bug with t

  • Open Source API for Flat Files?

    I did some searches on SourceForge for a flat-file serializer and deserializer. I know flat files are simple, but I did want to find something that allowed schema-like validations to be declared and enforced. The projects I saw were either abandoned