Message mapping problem / experts needed / UDF?

Hello experts,
I have the following problem in a message mapping:
Source structure is as follows:
- Node a (min 1, max 999)
  - Subnode b (min 0, max 999)
  - Each Subnode b has the element "number" (1,1)
This structure must be mapped to the following target structure:
- Node c (1,999)
   - Subnode d (0,999)
   - Each subnode d has the following elements:
       - e1
       - e2
       - e3
       - e11
1 Source node a should create 1 target node c.
All numbers in all subnodes b of one source node a should be mapped to the e1, e2,...e11 elements of the target structure. As one target node d can only contain up to eleven numbers, there must be several d nodes.
I have already tried to create a UDF, but it does not work.
Any experts who would like to share their knowledge?
Thanks in advance.
CHRISTOPH
Edited by: Christoph G. on Apr 23, 2008 10:46 PM

Hello again,
meanwhile I have worked hard on it and I have found the solution (just one UDF (queue function) which gets the article numbers as well as constant(targetField). So the UDF covers the creation of the "groups" as well as the mapping of the article numbers.
It was really interesting and it made me ambitious to find the solution myself I do not have access to the system today, but I will post my solution as far as I have access again. Maybe you still want to search for a solution? It really may be fun, just like some kind of a puzzle game.
In order to make it more clear, here comes the source and target structure with an example. Let me once more explain it: In the source, there are positions, each with unlimited article numbers. Each position will create a targetPosition. The node "targetPosition" has the subNode "articlenrs" (unbounded). Articlenrs has 11 differnet elements, calles a1, a2, a3, ..., a11. That means, all article numbers from a source postion should be mapped to "groups of 11 target article numbers". Please be aware the there are 11 differnet target fields for article numbers: a1, a2, ... a11.
I think that' why the solution of  Liang Ji and Rohit Kalugade will not work...
SOURCE
<position>
     <articlenr> 123   </articlenr>
     <articlenr> 456   </articlenr>
     <articlenr> 4783 </articlenr>
     <articlenr> 123   </articlenr>
     <articlenr> 456   </articlenr>
     <articlenr> 4783 </articlenr>
     <articlenr> 123   </articlenr>
     <articlenr> 456   </articlenr>
     <articlenr> 4783 </articlenr>
     <articlenr> 123   </articlenr>
     <articlenr> 496   </articlenr>
     <articlenr> 4783 </articlenr>
         . (unbounded)
</positon>
<position>
     <articlenr> 543  </articlenr>
     <articlenr> 865  </articlenr>
     <articlenr> 643  </articlenr>
</positon>
TARGET
<targetPosition>
  <articlenrs>
       <a1> 123  </a1>
       <a2> 456  </a2>
       <a3> 4783 </a3>
       <a11> 496 </a11>
  <articlenrs>
  <articlenrs>
       <a1>4783 </a1>
  </articlenrs>
</targetPosition>
<targetPosition>
     <articlenrs>
     <a1> 543 </a1>
     <a2> 865 </a2>
     <a3> 643 </a3>
        </articlenrs>
</targetPosition>
Thanks,
Christoph
Edited by: Christoph G. on Apr 30, 2008 10:20 AM

Similar Messages

  • Message mapping problem: BAPI with range table parameters

    A kind hello to all,
    I try to call the BAPI_ALM_ORDERHEAD_GET_LIST in a 4.70 system via RFC connector. The configuration already works with another BAPI. With this here I get message mapping exception:
    Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Zielelement /ns1:BAPI_ALM_ORDERHEAD_GET_LIST kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt. at com.sap.aii.mappingtool.tf3.AMappingProgram.start
    (How can I switch the trace language to English easily? I try to translate:
    "BAPI_ALM_ORDERHEAD_GET_LIST cannot be created. Check if the XML instance meets the requirements for the output XSD and the destination field mapping meets the requirements of the destination XSD.")
    But the mapping test tool in the Integration Builder Design does not report any warning or error.
    My guess is that the problem lies in the parameter structure of the BAPI_ALM_ORDERHEAD_GET_LIST: I have to fill the IT_RANGES selection range table, so it looks as if I need several instances of the item in the corresponding XML. Can I use "Duplicate tree" in the mapping editor? Here I got another exception?
    Many thanks for any help!
    Regards,
    Carsten

    Hi Udo,
    you gave the final hint, indeed I used a XML file that was not evidently not compliant to the message type I created (even though it had been validated by Altova XMLspy).
    From now onwards I only use the "Create instance" function of the test tool to create the XML body of my test messages...
    Thanks a lot,
    and best regards,
    Carsten

  • Message Mapping Problem with UTF-16LE Encoded XML

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

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

  • MESSAGE MAPPING PROBLEM PLS HELP

    hi forum i have a problem in message mapping...
    i have a file to file scenario...with a BPM..
    the components are:
    1. one outbound async MI:->   MI_OA_fileSender
    2. one abstract async MI:->   MI_AA_fileSender
    the above two has messsage structure as:
    <ns0:MT_sourceFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1...1
          <record>  1..unbound
             <batch_num/> 1..1
             <quantity/>  1..1
          </record>
       </recordset>
    </ns0:MT_sourceFile>
    3. one abstract async MI: -> MI_AA_fileDestination
    4. one inbound async MI:-> MI_IA_fileDestination..
    the above two has messsage structure as:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1..1
          <record> 1..unbound
             <rec_number/> 1...1
             <qty/> 1...1
          </record>
       </recordset>
    </ns0:MT_rana3_destinationFile>
    inside the BPM i m doing a simple one to one interface mapping between MI_AA_fileSender and MI_AA_fileDestination AND then use a send step to send it to receiver service. But inside the graphical editor, for the message maaping in the interface mapping, i change the target structure a bit by duplicating <rec_number> making it:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1..1
          <record> 1.. unbound
             <rec_number/> 0..1
             <rec_number/> 0..1 //did right click   and "duplicate sub-tree, so it becomes 0...0"
             <qty/>
          </record>
       </recordset>
    </ns0:MT_destinationFile>
    But i dont change the original structure of MT_destinationFile.
    Now in the resultant file in the receiver side i recive two <rec_number> tags....
    but since i didnt change the original structure of MT_destinationFile.....but i only made a change in the mapping by duplicating the node <rec
    _number>(right click and done "duplicate sub tree").............SHOULD IT NOT THROW AN ERROR
    Message was edited by:
            sudeep dhar
    Message was edited by:
            sudeep dhar

    >.............SHOULD IT NOT THROW AN ERROR
    Not necessarily.
    See, XI won't realize, by default, a schema validation in your messages. If you want a validation, you'll have to implement one, as described in
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm
    However, for some particular steps in BPM, I have observed that an invalid XML will some times result in a error in BPM execution. In particular, if you have switch steps, container operation steps and/or correlations where you use a particular field of that message, it may throw some exception when you have an invalid xml. Also, I have observed some errors with conditional receiver determination for invalid messages.
    As a best practice, if you have any kind of dependency on a particular message inside your system (like switches, container operations, correlations, condition in receiver or interface determination etc), it is a good idea to implement a schema validation.
    Also, if you do want to create a thrustable scenario, you might want to perform schema validation for all your output messages.
    Regards,
    Henrique.

  • Request Message Mapping Problem

    Hello friends,
    I am working in XI 2.0 and
    my senario is sap R/3->XI->File Adapter
    I take an idoc from the SAP R/3 system. and that comes properly to XI. I already created Data type, Message Type,
    Interface Type, Message Mapping and Interface Mapping in Desing. and all the configuration part.
    but when i send an idoc to XI system and check in SXMB_MONI at that time it shows me a green flag. means Inbound is Proper but It does not execute further steps.
    like Request Message Mapping, Call Adapter, Response.
    Can any one help me to solve this situation..
    Thanks in Advance.

    hi Shankar,
    I am able to solve the previous problem. by restarting my m/c.
    Now if any one know that how to configure RFC adapter.
    it always give me error like.
    <b>Attempt to start RFC adapter failed: com/sap/mw/jco/JCO$Record</b>
    And this is due to I am not able to connect to other R/3 system.
    In SM59 transaction
    <b>AI_RFCADAPTER_JCOSERVER</b> - TCP/IP connection
    when i register my program id to <b>Xmb2RfcService</b>
    then it gives me error when  i am testing my connection.
    <b>program Xmb2RfcService not registered / CPI-C error CM_ALLOCATE_FAILURE_RETRY</b>.
    so, can any one help me out to solve this problem.
    how to register Service in XI.
    Thanks,
    Gaurav Jain
    Message was edited by: Gaurav Jain

  • Message mapping problem when testing

    Hi guys,
    I'm having a tiny little problem with a message mapping.
    When I'm testing a message mapping I'm getting the following error:
      12:28:35 Start of test
        Cannot produce target element /ns1:MT_Encomenda/Num_doc. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
      12:28:36 End of test
    I'm importing a xml file for testing, but if I fill in the files at hand using the xml instance i get no problems.
    Any ideas?

    hi,
    make sure the target field  /ns1:MT_Encomenda/Num_doc is getting populated from the source message.
    you would see this error if a required field in the target structure is not populated.
    cheers,
    naveen

  • Message Mapping Problem

    HI I am calling a Java Mapping Prog from My message Mapping . I get A strange Message when i pass special characters like '?' or '*' through my message mapping to the java mapping .
    The Message is <b>"For input string : ???". </b> when i pass ??? as a parameter to the java mapping. I am bit confused. Is This message a standard message that XI gives or is it getting generated from somewhere else.
    regards
    Nilesh .

    Hi Nilesh ,
    Test the java mapping program using a seperate main class in some editor ( eg. Eclipse or NWDS) ,
    Try to debug the program and u will get to know the cause , as to  whr the message is getting generated ,
    Regards ,
    Sushil

  • Message-Mapping Problem with empty queue while testing

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

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

  • Mapping issue, maybe need UDF

    Hi Gurus,
    I am having a source message like this:
    ITEM (1..unbounded)
    >SOURCEFIELD (1..1)
    Sourcefield is below Item.
    In the target side, there is a field called TARGETFIELD (1..unbounded) that needs to be created with next condition:
    for each nonrepeteable sourcefield value, one targetfield must be created. For example:
    <Item>
       <Sourcefield>1</Sourcefield>
    </Item>
    <Item>
       <Sourcefield>1</Sourcefield>
    </Item>
    <Item>
       <Sourcefield>2</Sourcefield>
    </Item>
    <Item>
       <Sourcefield>2</Sourcefield>
    </Item>
    <Item>
       <Sourcefield>3</Sourcefield>
    </Item>
    In this example, 3 TARGETFIELD must be created, since there are only 3 non repeteable values (1, 2 and 3).
    Something important to notice is that values will ALWAYS come sorted.
    How can I do this in mapping? Should I develop an UDF? Or can I use PI's common functions?
    Thanks!
    Edited by: chapa_akd on Mar 31, 2011 12:18 AM

    Hi,
    You can use
    Source Segment -
    >Removecontext-->Splitby value(Value Change)--
    >Target Segment
    and
    Source Field--->Removecontext>Splitby value(Each Value)--
    >Target Field
    Thanks and Regards,
    Neethu

  • Mapping Problem/ Suggestion needed

    Hi All,
    Purchase Order Header Details are to be sent to target file...
    Only One Unique Document Number should be sent along with the Vendor..
    Say I am getting from Source like this
    DOCNUM                VENDOR
    12356                       ABC LTD
    12356                       ABC LTD
    12357                       XYZ Co
    12589                         SHELL CO
    12589                         SHELL CO
    12589                         SHELL CO
    out put should file be like this
    12356                ABC LTD
    12357                XYZ Co
    12589                 SHELL CO
    My structure is like this
    source -->
    Header    (0....unbounded)
       DOCNUM 
       Vendor
    Target -->
    Supplier (0...unbounded)
       Order
       Vendor
    Please suggest me how to go...
    I have successfully done this with UDF ... but can i do this with standard Functions..
    Thanks and Regards,
    sridhar reddy

    Sridhar,
    <i> Its possible for me to simulate the scenario in mapping editor, if we check the queue we are getting the same o/p as u needed. But if u run the same in the test tab its going weird. I'll tell u the logic , can u please try it let me know if it works for you. Before running in the test tab, display those results in the queue.
    DocNum (Change the context to higher level) <b>></b> Sort <b>></b>SplitByValue(ValueChanged) <b>></b>CollapseContext <b>></b>Supplier
    DocNum --> Order
    Vendor --> Vendor</i>
    <b>Please don't consider the above logic, I did the logic on root node level, will try to solve and let you know.</b>
    Best Regards,
    raj.
    Message was edited by:
            Raj

  • XI IDoc complex mapping problem - help needed!

    Hi all,
    I am mapping WPUBON IDoc (sent as IDoc XML file) to WPUBON IDoc in R/3. However, I have a complex mapping requirement that I am trying to use the graphical tool for.
    Source segment structure is such that we have:
    E1WPB01 (header) has one or many E1WPB02 (items) and E1WPB05 (coupons).
    E1WPB02 (items) have one or many E1WPB03 (item conditions).
    So for each IDoc, we can have many items (E1WPB02), each item can have many conditions (E1WPB03) and each IDoc can have many coupons (E1WPB05).
    For each E1WPB05 received, we need to take the value and divide it proportionately in order to add an extra E1WPB03 discount condition segment to each E1WPB02 item (we are a retailer and this will allow us to break down customer coupon discounts across each item in the basket). For example, if we have 2 E1WPB02 items with values $2 and $3 and the coupon is worth $1, item 1 needs a new E1WPB03 segment with a value of $0.40 and item 2 needs one with a value of $0.60.
    This process needs to occur for each E1WPB05 segment (customers could have more than one coupon). No E1WPB05 segments are required in the target IDoc.
    I have tried a few things but really am a bit stuck on where to start.... any ideas anyone?
    Thankyou.
    Stuart Richards

    Stefan,
    Here's some sample source XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <WPUBON01>
       <IDOC>
          <EDI_DC40>
             <TABNAM>EDI_DC40</TABNAM>
             <MANDT>104</MANDT>
             <DOCNUM/>
             <DOCREL>620</DOCREL>
             <DIRECT>2</DIRECT>
             <IDOCTYP>WPUBON01</IDOCTYP>
             <MESTYP>WPUBON</MESTYP>
             <MESCOD>ST6</MESCOD>
             <SNDPOR>WPUX</SNDPOR>
             <SNDPRT>KU</SNDPRT>
             <SNDPRN>0799</SNDPRN>
             <RCVPOR>SAPRD1</RCVPOR>
             <RCVPRT>KU</RCVPRT>
             <RCVPRN>0799</RCVPRN>
             <REFINT>00000000000016</REFINT>
          </EDI_DC40>
          <E1WPB01 SEGMENT="1">
             <POSKREIS>0001</POSKREIS>
             <KASSID>1</KASSID>
             <VORGDATUM>20060107</VORGDATUM>
             <VORGZEIT>134512</VORGZEIT>
             <BONNUMMER>120572</BONNUMMER>
             <KASSIERER>4400</KASSIERER>
             <CSHNAME> </CSHNAME>
             <BELEGWAERS>GBP</BELEGWAERS>
             <E1WPB02 SEGMENT="2">
                <VORGANGART/>
                <QUALARTNR>ARTN</QUALARTNR>
                <ARTNR>000005034394436881</ARTNR>
                <VORZEICHEN>-</VORZEICHEN>
                <MENGE>1</MENGE>
                <REFBONNR> </REFBONNR>
                <E1WPB03 SEGMENT="3">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>10.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03>
             </E1WPB02>
             <E1WPB02 SEGMENT="5">
                <VORGANGART/>
                <QUALARTNR>ARTN</QUALARTNR>
                <ARTNR>000005034394471158</ARTNR>
                <VORZEICHEN>-</VORZEICHEN>
                <MENGE>1</MENGE>
                <REFBONNR> </REFBONNR>
                <E1WPB03 SEGMENT="6">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>20.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03>
             </E1WPB02>
             <E1WPB02 SEGMENT="8">
                <VORGANGART/>
                <QUALARTNR>ARTN</QUALARTNR>
                <ARTNR>000005034394469131</ARTNR>
                <VORZEICHEN>-</VORZEICHEN>
                <MENGE>1</MENGE>
                <REFBONNR> </REFBONNR>
                <E1WPB03 SEGMENT="9">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>30.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03>
             </E1WPB02>
             <E1WPB05 SEGMENT="11">
                <VORZEICHEN>+</VORZEICHEN>
                <RABATTART>PTCS</RABATTART>
                <RABVALUE>6.00</RABVALUE>
             </E1WPB05>
             <E1WPB06 SEGMENT="11">
                <VORZEICHEN>+</VORZEICHEN>
                <ZAHLART>PTCS</ZAHLART>
                <SUMME>10.00</SUMME>
                <KARTENNR/>
                <ZUONR>120572</ZUONR>
             </E1WPB06>
          </E1WPB01>
       </IDOC>
    </WPUBON01>
    So we have one coupon worth $6.00. We have 3 items in the basket worth $10, $20 and $30 respectively. The additional E1WPB03 for each will need to contain $1, $2 and $3 respectively to give:
    <?xml version="1.0" encoding="UTF-8"?>
    <WPUBON01>
       <IDOC>
          <EDI_DC40>
             <TABNAM>EDI_DC40</TABNAM>
             <MANDT>104</MANDT>
             <DOCNUM/>
             <DOCREL>620</DOCREL>
             <DIRECT>2</DIRECT>
             <IDOCTYP>WPUBON01</IDOCTYP>
             <MESTYP>WPUBON</MESTYP>
             <MESCOD>ST6</MESCOD>
             <SNDPOR>WPUX</SNDPOR>
             <SNDPRT>KU</SNDPRT>
             <SNDPRN>0799</SNDPRN>
             <RCVPOR>SAPRD1</RCVPOR>
             <RCVPRT>KU</RCVPRT>
             <RCVPRN>0799</RCVPRN>
             <REFINT>00000000000016</REFINT>
          </EDI_DC40>
          <E1WPB01 SEGMENT="1">
             <POSKREIS>0001</POSKREIS>
             <KASSID>1</KASSID>
             <VORGDATUM>20060107</VORGDATUM>
             <VORGZEIT>134512</VORGZEIT>
             <BONNUMMER>120572</BONNUMMER>
             <KASSIERER>4400</KASSIERER>
             <CSHNAME> </CSHNAME>
             <BELEGWAERS>GBP</BELEGWAERS>
             <E1WPB02 SEGMENT="2">
                <VORGANGART/>
                <QUALARTNR>ARTN</QUALARTNR>
                <ARTNR>000005034394436881</ARTNR>
                <VORZEICHEN>-</VORZEICHEN>
                <MENGE>1</MENGE>
                <REFBONNR> </REFBONNR>
                <E1WPB03 SEGMENT="3">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>10.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03>
    <b>           <E1WPB03 SEGMENT="9">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>1.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03></b>
             </E1WPB02>
             <E1WPB02 SEGMENT="5">
                <VORGANGART/>
                <QUALARTNR>ARTN</QUALARTNR>
                <ARTNR>000005034394471158</ARTNR>
                <VORZEICHEN>-</VORZEICHEN>
                <MENGE>1</MENGE>
                <REFBONNR> </REFBONNR>
                <E1WPB03 SEGMENT="6">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>20.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03>
    <b>           <E1WPB03 SEGMENT="9">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>2.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03></b>
             </E1WPB02>
             <E1WPB02 SEGMENT="8">
                <VORGANGART/>
                <QUALARTNR>ARTN</QUALARTNR>
                <ARTNR>000005034394469131</ARTNR>
                <VORZEICHEN>-</VORZEICHEN>
                <MENGE>1</MENGE>
                <REFBONNR> </REFBONNR>
                <E1WPB03 SEGMENT="9">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>30.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03>
    <b>           <E1WPB03 SEGMENT="9">
                   <VORZEICHEN/>
                   <KONDITION>PN10</KONDITION>
                   <KONDVALUE>3.00</KONDVALUE>
                   <CONDID/>
                   <QUALCONDID/>
                </E1WPB03></b>
             </E1WPB02>
             <E1WPB06 SEGMENT="11">
                <VORZEICHEN>+</VORZEICHEN>
                <ZAHLART>PTCS</ZAHLART>
                <SUMME>10.00</SUMME>
                <KARTENNR/>
                <ZUONR>120572</ZUONR>
             </E1WPB06>
          </E1WPB01>
       </IDOC>
    </WPUBON01>
    The 3 new segments required are highlighted in bold. Note that coupon segment can be repeating but is not required in the target message.
    Cheers

  • Message mapping problem after RFC import in SP14

    This never happened in earlier versions. If I make minor changes to RFC structures (ex: add new field) and than reimport, my mapping (in the past) needed adjustments only for the new fields. Now, all fields need to be remapped.
    Anyone facing similar issues? Is there any patch for this?
    Thank you.

    Hi Parimala,
    Even it should not happen . But even I have faced this once. But I just added some spaces and activated. It worked for me.
    But if you are changing your source structure, then it usally happens. But if it is target then it is not happening.
    It is just my views,
    Regards,
    Moorthy

  • Message Mapping - problem with target sequence

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

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

  • Message Mapping- 3 problems

    Hi,
    1)I need some information regarding Message Mapping. I need to map the field TDLINE of segment E1EDKT2 of IDOC ORDERS05 to the target fields. But based upon the index number of the record of this segment, I must map it to different fields (eg.E1EDKT2[10], E1EDKT2[3]). How can I incorporate this in Message Mapping?
    2)And one more scenario is as follows.Use PARTN if exists or use LIFNR to map to target and it must satisfythe conidtion PARVW = AG. Should we need Java code or can we achieve this using two 'If' conditions.
    3)We are looping at a source segment and it has multiple  occurances.How to create multiple segments in target based on condition.
    Can anyone help me.
    Thanks,
    Srinivas

    > 1) I need to map the field TDLINE of segment E1EDKT2
    > of IDOC ORDERS05 to the target fields. But based upon
    > the index number of the record of this segment, I
    > must map it to different fields (eg.E1EDKT2[10],
    > E1EDKT2[3]). How can I incorporate this in Message
    > Mapping?
    You can use the index function (with SP13):
    E1EDKT2* - index
                      equalS
        constant(10) /     
                             ifWithoutElse - target
    TDLINE - removeContexts /
    check the correct context
    > 2)And one more scenario is as follows. Use PARTN if
    > exists or use LIFNR to map to target and it must
    > satisfy the conidtion PARVW = AG. Should we need Java
    > code or can we achieve this using two 'If'
    > conditions.
    Sure you can chain if statements:
            PARVW
                  equalS 
    constant(AG) /     
                         ifWithoutElse
                  PARTN /            
                       PARTN - exist - if - target
                                  LIFNR
    This mapping assumes, that PARVW = AG is available, when PARTN is available.
    > 3)We are looping at a source segment and it has
    > multiple  occurances. How to create multiple
    > segments in target based on condition.
    Here is a pattern:
    condition - createIf - target
    condition has to be a queue of true and false with the same occurrency as source.
    All sub nodes of source are now arranged correctly under the target node.
    Regards
    Stefan
    Message was edited by: Stefan Grube

  • Message Mapping Doubt

    Hi Experts,
    Im stuck up with a message mapping issue. Need your advice if I can handle this in message mapping or should I changed the FCC.
    FILE to RFC scenario.
    Input file sample.
    1|OPENED|153-01-19|T001|005151|0237|20100705|17:35:55|001     |20100705
    101|A005152|1|20100705|11:46:38|001     ||||001||1|N|SALE
    111|WCAKE004|1.000|42.00|42.00||G||0.00|LIQUOR|||N|42.00|0.00|$|0.00|WCAKE004
    111|WCAKE004|-1.000|42.00|42.00||G||0.00|LIQUOR|||N|-42.00|0.00|$|0.00|WCAKE004
    111|WCAKE005|1.000|38.00|38.00||G||0.00|LIQUOR|||N|38.00|0.00|$|0.00|WCAKE005
    121|38.00|0.00|0.00|0.00|0.00|I|N||0.00|0.00
    131|T|CASH|S$|1.0000000|38.00||||38.00
    141|G|0.00
    1|CLOSED|153-01-19|T001|005162|0237|20100705|17:35:55|001     |20100705
    After the FCC the message comes into XI in the format (Source message) .
    GMRSTORES
    --CODE1
    1
    OPENED etc..
    --CODE101
    101
    A005152
    1 etc..
    --CODE111
    111 etc..
    --CODE111
    111 etc..
    --CODE111
    --121
    --131
    --141
    --1
    The problem is on the target side when I try to map the Code111 (line item) to the targert RFC it comes only once or all the Code111 nodes comes under the same "ITEM_LI" The target RFC structure is like.
    --/POSDW/CREATE_TRANSACTIONS_EXT
    IT_TRANSACTION
    ITEM
    RetailLIne Item
    ITEM_LI (here is the problem I expect 3 ITEM_LI nodes for each CODE111)
    Pls advice.
    Thanks
    Prasanna

    The problem is on the target side when I try to map the Code111 (line item) to the targert RFC it comes only once or all the
    Code111 nodes comes under the same "ITEM_LI"
    here is the problem I expect 3 ITEM_LI nodes for each CODE111
    1) Ensure that you have raised the Context of the source node (CODE111) to a higher node.
    2) Is your mapping logic proper..... is the ITEM_LI node or its parent node mapped properly so that when the CODE111 repeats, the target is also able to repeat?
    3) did you check the max occurence of ITEM_LI node.....it should be more than 1
    Regards,
    Abhishek.

Maybe you are looking for