N:1 Mapping and Matching Lines of Message 1 to Message 2

Hi Everyone,
I have an n:1 mapping and I need to match up the lines of message 1 to the lines of message 2 to map the target.  For example:
Source 1
Key1 = A, Key2 = A, Key3 = A, Field1 = Red
Key1 = A, Key2 = B, Key3 = B, Field1 = Blue
Source 2
Key1 = A, Key2 = A, Key3 = A, Field1 = Wagon
Key1 = A, Key2 = B, Key3 = B, Field1 = Sky
Target:
Key1 = A, Key2 = A, Key3 = A, Field1 = Red Wagon
Key1 = A, Key2 = B, Key3 = B, Field1 = Blue Sky
I think that this is possible in a user defined function that basically loops over the Source 2 for each value in Source 1, and I even think I saw a solution to this common problem posted before, but I have searched and can not find it.  Any help is greatly appreciated!
Thanks
Peter

Hi Peter,
From the example that you have given, mapping between the two source messages has been
done only for the fields("Field1"). Infact, you are combining the values of the fields
in the both the source messages-to show in the target message.
I think this can be done by creating one source message type which stores both the source
messages (n:1) and then you can map both the field1s of the source messages to field1 of target
message <b>by using the concat function</b>.
Hope this was helpful.
Regards
Sushumna

Similar Messages

  • I have a scenario,  ECC-PI-Message broker. ECC sending IDOC to  PI, PI execute mapping and  sending data to Message borker.(with almost one to one mapping)., IDOC(AAE)-PI-JMS. Now my requirement is., from PI  after mapping we need to save file in SAP fold

    I have a scenario,  ECC-PI-Message broker. ECC sending IDOC to  PI, PI execute mapping and  sends data to Message borker(thru JMS channel).(with almost one to one mapping)., IDOC(AAE)-PI-JMS. Now my requirement is., from PI  after mapping we need to create file with same data what ever send to Message broker and put the file in SAP folder without touching mapping. Is it possible? Please advise with the steps. We are using the ICO for this senario. Quick response is appriciated.

    Hi Pratik,
         http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42?quicklink=index&overridelayout=true
    This link might help.
    regards
    Anupam

  • Multi-Message-split with ABAP mapping and adapter specific attributes

    Hi all,
    With <b>ABAP-Mapping I split 1 message to n messages</b>.
    So many files are generated in <b>file-Adapter</b>.
    Everything fine.
    But now I want the file names different using adapter specific attributes.
    It is not possible to use variable substitution and write the file name in payload because of receiver restrictions.
    I tried this with following similar coding in ABAP-Mapping:
    data: lt_records TYPE MPP_DYNAMIC_TAB.
          Loop.
          l_file_name = "payload-Inbound"-information
          ls_record-namespace = 'http://sap.com/xi/XI/System/File'.
          ls_record-name = 'FileName'.
          ls_record-value = l_file_name.  "l_file_name comes from inbound-payload
          append ls_record to lt_records.
         Endloop.
      CALL METHOD dynamic_configuration->set_all_records
        EXPORTING
          records = lt_records.
    If I start the interface I see in the monitoring the dynamic configuration with many entries for file-name in the the SOAP-Header mapping of the request message (following extract):
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Mapping der Request-Message
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPAADDRESS.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPABROKERROLE.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACOMPANYSEGMENT.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACUSTOMERROLE.XML</SAP:Record>
    The result is that <b>all files have the same file name</b> (last entry in dynamic configuration).
    Is it possible to write the adapter specific configuration in ABAP-mapping <u>for every single result message</u>??
    Thank you for your help,
    Florian

    Hi Florian,
    I've a different idea...I dont think its a "right solution" but just another work around..it involves a BPM...
    In your ABAP mapping..set the dynamic config with as many variables as number of different messages...i.e. use the variables like 'FileName1', 'FileName2'...'FileName6' instead of 'FileName'. But use the same namespace 'http://sap.com/xi/XI/System/File'
    Call the above mapping in a BPM and capture the individual messages and set the attribute 'FileName' from the values of 'FileName1' to 'FileName6' accordingly using Message Mapping and then send the message using the 'Send' step.
    before you try this, try using the variable names 'FileName1' ...'FileName6' in the receiver adapters...enable the ASMS. <b>I know we need to select which variables from the dynamic config to be used by the adapter by specifically selecting 'FileName', 'Directory' etc...but just give it a try and see if it works..</b>
    Or..instead of using a BPM..you can combine Henrique's idea...use Adapter module to set the value for 'FileName' from variables 'FileName1'...'FileName6' accordingly.
    hope I'm clear..lemme know if you have any questions..
    cheers
    praveen

  • Throw exception in Java mapping and handle this in BPM

    Hi,
    I'll use a Java mapping in a BPM transform step. Is it possible to throw an exception inside this Java mapping and handle this in a BPM exception handler?
    thanks and regards
    Verena

    Hi Verena,
    In a BPM transformation step, I think you can throw exceptions only for system errors.
    Let me explain with an example, one of the ways to handle your scenario:
    Lets assume your Java Mapping fails then you can trap that exception in your Java mapping and compose an XML message which indicates that an error has occurred.
    say for e.g.
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>ERROR</StatusCode>
    <ErrCode>123</ErrCode>
    <ErrDesc><!populate the thrown exception details></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    if Java mapping is Successful, you can compose the XML message as follows:
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>SUCCESS</StatusCode>
    <ErrCode>0</ErrCode>
    <ErrDesc></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    You can use BPM switch operation to switch to different processing branches say for e.g. "error" branch or "success" branch by examining the value of <StatusCode> tag.
    Hope it helps !
    Regards,
    Sridhar

  • Default "paste and match style" + message list line separator

    I'm loving Apples mail app ... nothing is perfect, though. Here are a couple minor annoyances, am I missing something?
    - Is it possible to make "paste and match style" the default, so I don't have to use menu bar or a four fingered short cut?
    - is it possible to separate the lines in the message list view by a thin line or, even better, alternating background shading, like it is done in the list view in Finder?
    Not a big deal, but both of these features would be nice.
    Thank you,
    Stephan

    I imagine there is an elegant way using the command line, however you can easily accomplish your first request via the System Preferences, Keyboard and Mouse Pane, Keyboard Shortcuts tab. See, http://www.macworld.com/article/50828/2006/05/cmdnrevert.html
    For your second request, I imagine that this can be accomplished with Stationary in Mail.app 3.4, but I have never tried.

  • Message Mapping-Generating Headers and corresponding Line items in 1 file

    Hi,
    I am working on JDBC to File scenario.
    There is a staging table in SQL Server. XI polls the table every 20 secs and picks up all the data with flag = 0. After fetching the records it sets the flag to 1 so that the same data do not get fetched the next time.
    The record have one Bill No and there can be more than 1 line items associated with that bill no.
    The target structure is as follows:
    Record          1
       Bill No          0...unbounded
       Line item     1
            Line items    0...unbounded
    Now the requirement is to generate a file with header and all the corresponding line items below it.  That is one file can have many headers but all the line items should succeed its corresponding header.
    I have written a UDF to generate the same.
    For Bill No.:
    Bill No -> RemoveContext -> Sort - > UDF -> SplitBy Value -> CollapseContext
    UDF just removes the duplicate Bill No and generates the list.
    Now the issue is if Bill No as per source is 8,4,1,3 then the ones getting generated in the target str is in the same order as it is in source that is 8,4,1,3. But  I want this in the sorted order ie. 1,3,4,8. Althoug I have used Sort func, its not getting generated.
    Please help.

    chk this:
    BillNo-removeContext--sort--splitByValue(valuechange)---collapse Context---Record
    BillNo-removeContext--sort--splitByValue(valuechange)---collapse Context---splitbyvalue(each Value)---BillNo(Target)
    BillNo-removeContext---------------------------
                                -------------------------- SortByKey----------FormatByExample(2nd argument mapping below)---UDF2---Line Item
    BillSerailNo(set its context to Row)--UDF1---removeContext--
    BillNo-removeContext--sort--splitByValue(valuechange)----2nd argument mapping of "formatbyexample"
    BillNo-removeContext---
                                --------SortByKey----FormatByExample(2nd argument)---UDF2--splitbyvalue(each value)-Bill Serial No
    BillSerailNo(set its context to Row)----UDF1---removeContext-----
    BillNo-removeContext--sort--splitByValue(valuechange)----2nd argument mapping of "formatByExample"
    udf1: Input will be var1
    Execution type: all values of a context
    String a="";
    for(int i=0;i<var1.length;i++)
    a = a + var1<i>+ ";";
    int b= a.length();
    result.addValue(a.substring(0,b-1));
    UDF2: input will be var1
    Execution type: all values of a context
    for(int b=0;b<var1.length;b++)
    String [] a = var1<b>.split(";");
    for(int i=0;i<a.length;i++)
    result.addValue(a<i>);
    Input:
    <MT_Source>
       <ROW>
            <Bill_No>8</Bill_No>
             <LineItems>
                <BillSerailNo>second</BillSerailNo>
               <LineItems>
              <LineItems>
                <BillSerailNo>second1</BillSerailNo>
             </LineItems>
         </Row>
          <ROW>
            <Bill_No>5</Bill_No>
             <LineItems>
                <BillSerailNo>First</BillSerailNo>
               <LineItems>
              <LineItems>
                <BillSerailNo>First1</BillSerailNo>
             </LineItems>
         </Row>
    <ROW>
    <Bill_No>8</Bill_No>
             <LineItems>
                <BillSerailNo>Third</BillSerailNo>
               <LineItems>
              <LineItems>
                <BillSerailNo>Third1</BillSerailNo>
             </LineItems>
         </Row>
    <MT_Source>
    Target:
    <MT_Target>
        <Record>
            <Bill_No>5</Bill_No>
             <LineItems>
                <BillSerailNo>First</BillSerailNo>
               <LineItems>
              <LineItems>
                <BillSerailNo>First1</BillSerailNo>
             </LineItems>
       </Record>
       <Record>
           <Bill_No>8</Bill_No>
             <LineItems>
                <BillSerailNo>second</BillSerailNo>
               <LineItems>
              <LineItems>
                <BillSerailNo>second1</BillSerailNo>
             </LineItems>
             <LineItems>
                <BillSerailNo>Third</BillSerailNo>
               <LineItems>
              <LineItems>
                <BillSerailNo>Third1</BillSerailNo>
             </LineItems>
           </Record>
        <MT_1>

  • Mapping with Match and Merge operater giving ORA-06550 error while deploy..

    Created a simplet mapping to source from Customer table to tstcustomer table thru' Match and Merge operator. The mapping validated successful but giving ORA-06550 line x column y error while deploying the mapping.
    It is a simple mapping consisting of source Customer table, Match and Merge operator, tstcustomer target table.
    Could anyone advise me on how to resolve this?

    The test mapping basically consists of :
    source table - sh.customers
    target table - tstcustomers (similar to sh.customers)
    Match-Merge operator.
    The mapping validation was successful but when attempt was made to deploy, its giving errors starting with ORA-06550.
    I saved the code and executed thru' SQL Plus and the error details are as follows:
    SQL> show errors;
    Errors for PACKAGE BODY MMTEST4:
    LINE/COL ERROR
    594/6 PL/SQL: Statement ignored
    594/37 PLS-00306: wrong number or types of arguments in call to 'RTRIM'
    601/6 PL/SQL: Statement ignored
    601/36 PLS-00306: wrong number or types of arguments in call to 'RTRIM'
    1017/655 PL/SQL: SQL Statement ignored
    30
    1020/27 PL/SQL: ORA-00942: table or view does not exist
    2163/6 PL/SQL: Statement ignored
    2163/43 PLS-00201: identifier 'CUSTOMERS_0_CUST_GENDER' must be declared
    2170/6 PL/SQL: Statement ignored
    LINE/COL ERROR
    2170/42 PLS-00201: identifier 'CUSTOMERS_0_COUNTRY_ID' must be declared
    2586/655 PL/SQL: SQL Statement ignored
    30
    2589/27 PL/SQL: ORA-00942: table or view does not exist
    SQL>
    For your info, the same mapping without Match-Merge Operator is getting deployed and executed successfully.
    But with Match-Merge operator, after setting Match bins, Match rules, Merge rules etc the mapping is validated successfully but errorring out while deployment.
    Pls advise on how to resolve this.
    I understand that the Match-Merge Operator gives Pl/Sql output from the documentation.
    thanks
    Naren.

  • ETD and Base line are not matching

    Hi All,
    My requirement is in production server, for some invoices the Expected time departure and base line date are not matching,
    What will be the reason behind this? Can you please advice how to approach to this problem.?
    Thanks in advance
    jaya.G

    Hi,
    could you please eloborate the issue?
    Thanks,
    Srinu

  • I bought my I pod touch 3-4 months ago and I got this message all of a sudden, it said something along the lines of provisonal complete_Distrib... will expire in 30 days. What is this it's under setting-general-Profile should I be worried?

    I bought my I pod touch 3-4 months ago and I got this message all of a sudden, it said something along the lines of provisonal complete_Distrib... will expire in 30 days. What is this it's under setting-general-Profile should I be worried? Should I just let it expire.

    Unless you have a company or school iPod, that profile was installed by an app you installed. It is likely that the app will no longer function when that date is reached. You can Google the name of the profile and that may provide some more information.

  • Multi-Mapping and Message Split using BPM

    Hi All,
    Could anyone pls let me know clearly how message mapping can be done for this weblog
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    Thanks,
    Ram

    Hi,
    When you are doing Message mapping after adding the Messaget types for source and target messages. You can click on the "" button in the target message and add one more tab. You can go to Message tab as shown in the 5th image and click "" button to add one more message type. Then do the mapping as usual.
    <b>Based on the value of the element(name), the node of input(details)should be directed to one of the two message types</b>
    Here in this blog it is done based on the Name.
    You need to use IFTHENELSE boolean function and do the mapping.
    Thanks,
    Prakash

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

  • I have moved from the UK to the USA and have a new phone, I try to change my country location on the store and get an error message saying I have to cancel my itunes match and have a pass incomplete, any ideas?

    I have moved from the UK to the USA and have a new phone, I try to change my country location on the store and get an error message saying I have to cancel my itunes match and also that I have a pass incomplete, any ideas how to fix and change the store. It is becoming a problem with getting some USA aps and content
    Thank you
    Tom

    iTunes match is a subscription that you have in when you were still in the UK. According to the terms & conditions you'll need to wait for the susbcription to end before you can change your country to iTunes Store USA.

  • RE: COPA report and customer line item report not matching

    Hi All,
    COPA report and customer line item reports (fd10n) are not matching please let me know the reason.

    ok

  • Multi mapping and message splitting in BPM

    Hi ,
    I am working with this scenario ...
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    how many message interfaces i have to create .
    one outbound , one abstract  and two inbound .. is it correct.

    Hi
    Minimum you need to create three message interfaces i.e. Bpm_In_MI_Abstract,  aBpm_Out_MI_Abstract Bpm_Out1_MI_Abstract, because abstract interfaces can be use inbound and outbound as well.
    You can also use create implement it by using inbound and outbound message interfaces. In that case you have to use three additional interfaces(1 outbound and 2 inbound).
    Regards
    Sami
    Reward points if helpful.

  • XI 7.0 passing attributes between java mapping and message mapping

    Hi all,
    Here's a newbie question. There is a scenario where an interface mapping has several stages of java mapping and message mapping
    I would like to know how to set attributes in the java mapping so that it can be accessed in a message map (or vice versa). What I intend to do is pass some information from one mapping to the other so that action can be taken based on the values passed.
    Thank you!

    Another option is storing the values in the message header in the same way as the Adapter-Specific Message Attributes:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
    Just use your own name/namespace combination, which is not used in any adapter.
    If possible use the way that Sandro proposed and add the information which you need to additional tags in the payload.
    Regards
    Stefan

Maybe you are looking for

  • To Determine the Execution Time of a PL/SQL Block

    Hi I need to determine the total execution time taken by a PL/SQL code (Anonymous Block , Functions etc). Can anyone please let me know how can I determine the same? Regards Kapil. Edited by: KapilK on Mar 2, 2009 11:00 AM

  • Add available taskflows without going into Edit Mode

    Hi All, I am stuck with a client requirement. Let me tell you the problem. We are developing a WebCenter portal application for two types of users customer and partner. Suppose i have created 10 taskflows. Out of 10 TFs, 4 are mandatory (common) whic

  • Problems With 4K at 60fps & a High-End Graphics Card

    I'm having major problems editing footage shot at 3840x2160 @ 59.94. The video will play back fine initially, but after a few seconds, the video starts chugging along until I get less than 1fps. I have the same problem using adaptive resolution durin

  • HTML to Servlet connection

    I'm trying to debug a form submission to a servlet. I have an HTML with a form, and a servlet which processes the submission. If I deploy these files to Tomcat, they run fine and create the expected output. If I run the Servlet or the HTML in the int

  • Smart forms and scripts

    Hi Friends. How r u?      This is Ravinder. what r the problems does I get when we generating the layout for checks using smart forms and scripts(also)? There is standard programs r there plz tell me? Plz give an example