Problem in context changing ( message mapping )

<u>source structure    </u>
Message Name        
Header(1)            
    H1                 
    H2                 
LineItem(1)         
  Item(1-unbounded)   
    I1                 
    I2     
<u>target structure</u>
Message name
Header(1)
   H1
   status
LineItem(1)
  Item(1-un)
   I1
   I2     
The result for status should be as follows
<i>if h1 = x then status = ‘H1’failed else if h2 = x then status = ‘H2’failed
else if I1 = x then status = ‘I1’failed else if I2 = x then status = ‘I2’failed.</i>
Problem :
         It works perfect as long we have only one Item (Unbounded Tab).
But since it is unbounded  we have more than one item tabs.
The mapping does not produce the status element.
                  I tried removing the context of all the source fields, but still I coudnt produce the status element. I don’t know where to change the context.
Can somebody help me with this issue.
Thanks in advance .
Disney.

Hi,
I was able to do it with the graphical mapping using standard functions only.
The output will have only one status , the place where the 1st error shows up..like it checks in header fields first, then it takes items one by one.
It is very big though & would be much simpler to do something like what stefan proposed.
Just for info this is the Text Preview for the Mapping i did...(Is there a way, if i have this to upload to a mapping?)
/ns0:MT_TRGT/Header=/ns0:MT_SRC/Header=
/ns0:MT_TRGT/Header/H1=/ns0:MT_SRC/Header/H1=
/ns0:MT_TRGT/Header/Status=iF(iF(const(), stringEquals(/ns0:MT_SRC/Header/H1=, const()), iF(const(), stringEquals(/ns0:MT_SRC/Header/H2=, const()), const())), not(stringEquals(iF(const(), stringEquals(/ns0:MT_SRC/Header/H1=, const()), iF(const(), stringEquals(/ns0:MT_SRC/Header/H2=, const()), const())), const())), ifWithoutElse(not(stringEquals(iF(concat(const(), index(/ns0:MT_SRC/Item/Items/I1=)), stringEquals(/ns0:MT_SRC/Item/Items/I1=, const()), iF(concat(const(), index(/ns0:MT_SRC/Item/Items/I2=)), stringEquals(/ns0:MT_SRC/Item/Items/I2=, const()), const())), const())), iF(concat(const(), index(/ns0:MT_SRC/Item/Items/I1=)), stringEquals(/ns0:MT_SRC/Item/Items/I1=, const()), iF(concat(const(), index(/ns0:MT_SRC/Item/Items/I2=)), stringEquals(/ns0:MT_SRC/Item/Items/I2=, const()), const()))))
/ns0:MT_TRGT/Items=/ns0:MT_SRC/Item=
/ns0:MT_TRGT/Items/Item=/ns0:MT_SRC/Item/Items=
/ns0:MT_TRGT/Items/Item/I1=/ns0:MT_SRC/Item/Items/I1=
/ns0:MT_TRGT/Items/Item/I2=/ns0:MT_SRC/Item/Items/I2=
Thanks,
Renjith.

Similar Messages

  • What is context in message mapping

    Hi All,
    What is context in message mapping?
    Thanks,
    Anil.

    Hi Anil
    Go thru the following blogs by Sravya
    <a href="/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i Mapping Simplified - Part 1</a>
    <a href="/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii Mapping Simplified - Part 2</a>
    Regards
    Santhosh

  • Change Message Mapping / Cannot change / Pen not active?!

    Hi there,
    i have a Problem. I have to change a Message Mapping.
    SAP sended me a Note with a Word Doc where is described what i have to change..
    But in the Integration Builder Design i cannot change a mapping.. cause the PEN in the Menu is greyed out...?!
    Please help
    Regards
    Bjoern

    Thanks
    that was it

  • Problem by transporting the message mapping from PI 7.0 to PI 7.1

    Hi Everyone,
    by transporting the message mapping from PI 7.0 to PI 7.1 i have got the following problem.
    "Source code has syntax error:
    K:\usr\sap\E71\DVEBMGS00\j2ee\cluster\serve......
    package udfpool does not exist
    import udfpool.*;
    i have used a UDF in my message mapping.
    This UDF calls for a method of a java class, which is imported as a .jar file with this message mapping.
    this message mapping works very well on PI 7.0,
    but doesn't work any more on PI 7.1 because of the problem described above.
    anyone can help me out of this problem?
    thanks!
    zc

    hi,
    but did you import the jar archive to 7.1 first?
    Regards,
    Michal Krawczyk
    http://mypigenie.com XI/PI FAQ

  • Change message mapping

    Dear experts,
    As i am very to XI,to some this question might seem a little absurd.
    But it is alway better to work safely so i am asking.
    I am asked to change Fix Values in one of message mapping.At the same time i am asked to insert a new value also.
    I did so in fix values list matching key to a value.Then i used MessageMapping ->Save.Change become persistent showing
    a pencil icon on that message mapping.
    I did this activity in DEV.Is this right way or i still further need to activate this mapping or any other step.I just want to confirm
    whether the required change is done ?

    Hi Sharma,
    1. Once you have done the changes then you have to activate that object.
    2. Once the object is activated then we have to send that object to the PIQ (Quality) as well as PIP (Production) systems.
    3. Update the technical spec (documentation) accordingly.
    Regards
    Ramesh

  • Change Message Mapping object

    Hi all,
    I have a very interesting question.
    We have a couple of scenarios where reports are extracted on ECC 6.0 and the data is sent out via client proxies to PI and then to File system
    Earlier the functional team was OK with couple of fields from the table. Now the business rek changed and we have to extract all fields of the tables. There are tables with 160 fields of which some of them are optional on ECC.
    As some of the fields are optional, I have to use "mapwithDefault" as it is a fixed length file format.
    I am just trying to put "mapwithDefault" for each of the fields. In order to not to take chances and I also have defined 0..1 occurence for all the fields.
    Is there any way easy way of doing this - insteading of going with each of the fields.
    Can I edit the mapping program itself?
    I hope I am clear
    reg

    None that I am aware of. If you do find such a option, let us know.
    Regards,
    Bhavesh

  • JSTL problem with LinkedHashMap changed to Map

    Originally my code worked with a linkedHashMap in java 1.4. Another developer converted it to 1.5 and changed my linkedHashMap to a Map<String, Map<String, List<DateSensitiveDTO>>>
    in the jstl I used to do ${dsMap.value['display']}
    now that code throws the following exception
    Error 500: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.
    any ideas of what would cause this? I've checked and the code is still putting 'display' into the map. I can output ${dsMap} in the jsp and I can see that 'display' exists inside the output.. I can only assume jstl is doing something different because of the data type, but I have no idea how to fix it.. except of course change the declaration back to a linkedHashMap.

    sorry to post this. I just answered my own question.. the exception in the jsp wasn't ocuring where I assumed it was, and had to do with the fact he also changed the structure of the objects being set in the Map... I assumed he tested his code to make sure it worked... guess it was a bad assumption.

  • Context change problem

    Team,
    I have a problem with context change in a peculiar mapping requirement.
    Scenario is IDOC --> XML
    There's an idoc field MRKN1 which carries all shipment unit numbers seperated by spaces.
    MRKN1 : 50325 50326 50329 50321 50215
    This field should be mapped to target XML as below:
    <Package>                                                                                <identifier>50325</identifier>
    </Package>
    <Package>                                                                                <identifier>50326</identifier>                                                           
    </Package>
    <Package>                                                                                <identifier>50329</identifier>                                                           
    </Package>
    <Package>                                                                                <identifier>50321</identifier>                                                           
    </Package>
    <Package>                                                                                <identifier>50215</identifier>                                                           
    </Package>
    I created a USD StringTokenizer to extract the values from MRKN1 & to populate it in the identier field:
    import java.lang.*;
    public void StringTokenizer(String[] input,ResultList result,Container container){
    String x[] = new String[input.length];
    for(int j=0; j<input.length;j++) {
    x = input[j].split(" ");
    for(int i=1;i<x.length;i++) {
         result.addValue(x<i>);
    and mapped liked below:
    MRKN1 --> StringTokeniser --> identifier
    But the output xml looks like this:
    <Package>                                                                                <identifier>50325</identifier>                                                                              <identifier>50326</identifier>                                                                                <identifier>50329</identifier>                                                                                <identifier>50321</identifier>                                                           
    <identifier>50215</identifier>                                                           
    </Package>
    Please help me how to create new Package tag for every new identifier tag.
    I already tried adding result.addContextChange() just by returning empty value to the above code & mapped it to Package node. But it throws error.
    Any immediate help is appreciated.
    Thanks in advance,
    Shanthi

    The above logic works quite different. The complete XML looks like this
    Given 3 items & 2 values in MRKN1
    <GoodsItem..1>
    <Packaging>
        <marksNumber>503124</marksNumber>
            <PackagesCollection>
                <Package>
                    <identifier>50216</identifier>
                </Package>
            </PackagesCollection>
           <packageType>PK</packageType>
    </Packaging>
    </GoodsItem..1>
    <GoodsItem..2>
    <Packaging>
        <marksNumber>503124</marksNumber>
            <PackagesCollection>
                <Package>
                    <identifier>50215</identifier>
                </Package>
            </PackagesCollection>
           <packageType>PK</packageType>
    </Packaging>
    </GoodsItem..2>
    <GoodsItem..3>
    <Packaging>
        <marksNumber>503124</marksNumber>
        <PackagesCollection/>
        <packageType>PK</packageType>
    </Packaging>
    </GoodsItem..3>
    But the customer requirement is quite different

  • Graphical message mapping

    Hello Expert
    I am woking in IS retail Outbound Scenario for article master  where enhancement segment E1WXX01 repeat multiple time and contain different -2 value  and I want to collect that different value in different Target filed 
    Suppose
    When first time segment E1WXX01 come contain
    fldname Zcolor
    Fldvalue red
    Target field Color
    In second time segment E1WXX01 contain value
    fldname ZSIZE
    Fldvalue 40
    Target filed SIZE
    And so on
    I want configure that scenario with the help of graphical message mapping
    Thanks
    Amit Shivhare

    Hi Shakif,
    <b>CONTEXT CHANGE</b>
    Please go through these links which clearly explains context and context changes in mapping.....
    http://help.sap.com/saphelp_nw04/helpdata/en/40/7b8e40496f6f1de10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/35/fb8c4057d5701de10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/42/f7293b2dbe1a71e10000000a422035/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/79/2835b7848c458bb42cf8de0bcc1ace/frameset.htm
    Go thru this guide~good source
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    <b>REMOVE CONTEXT</b>
    Remove context removes all the higher-level contexts of a source field thereby delete all hierarchy levels and generate a list.In simple form
    removes all top hierarchy levels, so that all elements of the target queue are assigned to a root element of the source queue
    <b>SPLIT BY VALUE</b>
    The SplitByValue () function is the counterpart to removeContexts(): Instead of deleting a context, we can insert a context change in the source value queue. We then receive this element for each inserted context change instead of a top node element. However, for this to be possible, the top node source field must be assigned a top node target field and minOccurs must be >0. A maximum of minOccurs top node target fields can be inserted here.
    We can insert a context change in the queue after each value, after each change to the value, or after each tag without a value.
    refer this for node functions
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/2d8c4024d26e1de10000000a1550b0/content.htm
    Cheers...
    Vasu
    <b>** REward POints if found useful **</b>

  • UK E-Filing: Message Mapping Transformation

    Hello Everyone,
    Just curious to know if anyone has seen this error while working on E-Filing for the UK, while trying to send data to the Inland Revenue:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:GovTalkMessage/ns0:Body/ns1:IRenvelope. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start
    Helpful, readable, and easy to understand reponses which provide a resolution to this issue, will be rewarded accordingly.
    Thanks for your help!
    John

    Hi John,
    1) Your problem is related to Message mapping only.
    2) This type of error means in mapping you have context problem. Some where your context is mismatched for IRenvelope node.
    3) Take your runtime xml and check directly in message mapping.
    4) Your output instances for IRenvelope is more than its occurances.
    5) Try by using RemoveContext function before your target node.
    Regards Rohit,
    Reward points if helpful

  • Problemin activating Message Mapping

    Hi experts,
    I am facing some problem while activating the message mapping, error is as follows:
    "Internal error while checking object Message Mapping.
    [][db2][jcc][102][10040] Non-atomic batch failure.
    The batch was submitted, but at least one exception
    occurred on an individual member of the batch.
    Use
    getNextException() to retrieve the exceptions for specific
    batched elements."
    PLEASE PROVIDE ME WITH SOME IDEA ABOUT WHY IT IS HAPPNING.
    Thanks in advance.
    Regards
    Pradeep

    Hi,
    The same error is solved in this thread..
    Problem Activating Mappings in the IR -- see the last 2 comments.
    Thanks
    Swarup

  • Issue with message mapping.

    HI All,
    I am working on a JDBC-XI-RFC scenario.
    I have two data types, two message types and two message interfaces.
    now, i have created the message mapping and mapped the fields of both sender and reciever message types.
    To test with sample data now, if i press the "test" tab, in the right side, i can see the "Instance" with the sender message type and its fields.
    Later i entered the values to test the sample.
    Affter this move, i am not able to see anything in the right side of the screen (RESULT)...
    What might be the reason for this....???
    Please help me......
    Regards
    Pavan

    Hi Pavan,
    Start Transformation button is used to execute the object. Its on the left hand bottom of the scrren, near to Trace Level you will find a button named "Start Transformation". Click on this and you will get the output once the transformation is complete.
    There is some problem in the Sender message mapping named: sender_mm | http://jdbcrfcns
    Please check where is the problem.
    Regards,
    Subhasha

  • How to Transport only Message mapping in already created transport.

    Hi All,
    I have changed message mapping object in ESR and now need to transport the new version to Q enivroment using CTS.
    Can somebody tell me the detailed steps for doing this.???
    Thanks in advance!!!!

    hi,
    you refer from 33 page on words below in doc :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20ccd0ec-2839-2b10-0097-828fcd8ed809?QuickLink=index&overridelayout=true
    becuase i dont know are u release the transport /not.
    if ur release and everything fine, then simply go to QUAlity Sys -> tools-> impoted desig time obj.

  • How to use Variable in message mapping

    Hi Experts,
    I have some problem using variable in message mapping.
    In one message mapping, since a block of logic is repeated for several fields, then i tried to use a variable instead.
    the repeated logic is: first if condition, then use a udf to form a queue which will be suppressed by its father node.
    i tried to assign the result queue to a variable after the UDF execution. (this variable is created after the father node)
    I am wondering is there any restriction of using variable?
    Can we assign the whole queue to a variable?
    Can we use UDF during the process of assigning value to variable?
    thanks in advance.

    I dont think you can assign a queue to a variable,I am not 100% sure, . and there is no restriction to useing a Zvariable, only u can use it after you declare at some parent level.
    Yes you can use a UDF in the process of assigning to a Zvariable.
    Check out this link and read the comments of the blog.
    SAP PI 7.1 Mapping Enhancements Series: Using Graphical Variable
    /people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable
    Edited by: Saiyog Gonsalves on Nov 6, 2010 6:40 PM

  • Ignoring a DTD validation at message mapping

    Hi,
    I'm facing the following situation: as a responce for a HTTP service consume, we are getting this payload:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE ChannelAdminResult SYSTEM "/AdapterFramework/channelAdmin/ChannelAdmin.dtd">
    <More tags....>
    the problem is that the message mapping is not able to get the dtd that validates the payload. I did try uploading the dtd file as external definition, but it still not working.
    Is there anyway to bypass the !DOCTYPE validation?
    Thanks in advance,
    Ariel

    Hello, I have the same problem. If you have an solution for it, please post it here anyway.
    In my case, the external reference is an http-adress. The server has an connection to it, but it doesn't work until now.
    I tested the way over the external  definition, too, but with the same effect.

Maybe you are looking for

  • Windows 7 - Apple Application Support was not found.  Error Message

    Hello Folks, i keep getting the following message, despite the fact that i have uninstalled Itunes and then installed it again a few times. "Apple Application Support was not found.  Please uninstall, and install again.  Error 2 (Windows Error 2). Ca

  • Package creation error

    I had done something like this before, but successfully, with no errors. Any idea why I'm getting the error now? It's telling me I have failed to declare the package name. Here's the code PROCEDURE insert_vote_dev (p_ctid   IN NUMBER, p_busvp  IN VAR

  • How do I add/remove a contact to a mail GROUP in mac mail?

    Please help - thanks!

  • Database link to use in paramater

    Hi everyone.... I have a procedure like this in a package SELECT view_name, text FROM user_views@dbdev WHERE view_name IN (select distinct object_name from TD_apex_dep); v_view_name VARCHAR2(30); v_text VARCHAR2(32767); v_hash_value NUMBER; but I don

  • Expanding Cover Flow window in Finder

    Is there a modifier key that can be held down when expanding a Cover Flow enabled Finder window so that the list of files expands instead of having the Cover Flow images get larger? I've tried the usual Option+Click, Shift+Click, etc. but nothing see