How to filter data in message mapping?Kindly help! URGENT

Hi Experts,
I have a source XML as shown below:
<Inventory>
<InventoryItem>
<InventoryQty>
<MaterialNo>X001</MaterialNo>
<ItemCode>InTransit</ItemCode>
<Quantity>1000</Quantity>
</InventoryQty>
<InventoryQty>
<ItemCode>Available</ItemCode>
<Quantity>1500</Quantity>
</InventoryQty>
<InventoryQty>
<ItemCode>UnRestricted</ItemCode>
<Quantity>1250</Quantity>
</InventoryQty>
</InventoryItem>
<InventoryItem>
<InventoryQty>
<MaterialNo>X002</MaterialNo>
<ItemCode>InTransit</ItemCode>
<Quantity>1500</Quantity>
</InventoryQty>
<InventoryQty>
<ItemCode>Available</ItemCode>
<Quantity>1600</Quantity>
</InventoryQty>
<InventoryQty>
<ItemCode>UnRestricted</ItemCode>
<Quantity>1200</Quantity>
</InventoryQty>
</InventoryItem>
</Inventory>
My Target XML is mapped to a RFC Fnction module (YGET_STOCK). The target function module has a internal table (ITAB_STOCK) as input:
YGET_STOCK
ITAB_STOCK
item
           - <Material>X001</Material>
           - <AvailableStock>1500</AvailableStock>
           - <IntransitStock>1000</IntransitStock>
item
           - <Material>X002</Material>
           - <AvailableStock>1600</AvailableStock>
           - <IntransitStock>1500</IntransitStock>
</Inventory>
So how to get the desired target XML using graphical XI mapping?
I have tried using graphical mapping and I am getting the following:
YGET_STOCK
ITAB_STOCK
item
           - <Material>X001</Material>
           - <IntransitStock>1000</IntransitStock>
           - <AvailableStock></AvailableStock>
item
           - <Material>X001</Material>
           - <IntransitStock></IntransitStock>
           - <AvailableStock>1500</AvailableStock>
</Inventory>
As shown it is reading only the first <InventoryItem> and splitting the Available and InTransit quantity into two separate items of the internal tables instead of putting them into one item.
Kindly help me! URGENT!
Thanks
Gopal
Message was edited by:
        gopalkrishna baliga
Message was edited by:
        gopalkrishna baliga
Message was edited by:
        gopalkrishna baliga
Message was edited by:
        gopalkrishna baliga
Message was edited by:
        gopalkrishna baliga

what is ur mapping def...did u map <InventoryItem> to -
item in rfc?

Similar Messages

  • How to validate a date in message mapping

    Hi experts,
                    how to validate a date in message mapping. For ex:  if date comes as 2008/02/31, then file it shold not get processed.how to achieve this in message mapping. Please help .
    Thanks&Regards,
    Reyaz Hussain

    Hi,
    There are few simple ways for date validation as follow,
    1.If you would like to handle it in XI only, then in message mapping you could verify about it with the help of generating smart exception.
    For e.g in mapping there is one Date conversion API i.e. somthing DateTransformation It converts the incoming date format to required format. Here give the date format i.e expected from Sender File.
    If in case the format miss-matched then it will create the exception.
    You could handle this exception with the use of [Alert notification|http://help.sap.com/saphelp_nw04/helpdata/en/2c/abb2e7ff6311d194c000a0c93033f7/frameset.htm] and could be even able to notify to sender system about it.
    2. The another solution is easy for SAP synchornous communication --If you are passing the file data to SAP, then you could use below function modules to verify date format in receiver RFC/BAPI or inbound IDOC program. If the sy-subrc is not 0 then don't process further.
    CONVERT_DATE_FORMAT
    ISU_DATE_FORMAT_CHECK
    Thanks
    Swarup

  • How to filter data

    Dear Friends
    How to filter data by entering data in the field then the data filtered according to the data that is enter the filed
    For example
    If I have a list of values in the field EMPNO , and If I enter ‘S’ at the field EMPNO before pressing F9
    it should display those employees only when I press F9 as the following :
    SMITH
    SCOTT
    And if enter ‘AL’ it should display those employees only when I press F9 as the following:
    ALLEN
    ALI
    But if don’t enter any value in EMPNO and press F9 Then It should display all the All the employee’s name as the following
    ENAME
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    ALI
    ABDULLAH
    Waiting for your valuable answer .
    Best regards
    Jamil Alshaibani

    Dear Rosario
    I have SET THE ITEM PROPERTY VALIDATE FROM LIST TO YES
    Of the field EMPNO ON WHICH I HAVE ASSIGN THE LOVE.
    And also I have written the script as the following:
    SELECT ENAME,EMPNO FROM EMP
    WHERE EMP.ENAME LIKE :EMPNO||'%'
    Then I type ‘S’ in the field EMPNO and I press F9 it is not responding for displaying the list of values it is displayed this message in the status bar ‘FRM-40502: ORACLE ERROR :UNABLE TO READ LIST OF VALUES .
    Waiting for valuable answer in details.
    Best regards
    Jamil Alshaibani

  • How to use functions in Message Mapping

    Hi All,
           I am new to SAP XI. I don't know how to use functions in message mapping.     Can any body tell me how to use IF condition in message mapping.
         Please provide me a good link where I can get the details how to use those functions.
    Thanks,
    Srinivas.

    HI Srinivas
    Please take a look at these links,
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    This will help you
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/190eb190-0201-0010-0ab3-e69f70b6c257
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a8/bfc6373c8fea43bdb3541535bcbd43/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8a57d190-0201-0010-9e87-d8f327e1dba7
    This will give you a detailed Idea about Context
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db95f835c111d1829f0000e829fbfe/frameset.htm
    This will give more explanation on Queue
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/51a39490-0201-0010-5b9f-ae21e8b78195
    For understanding node functions this blog will help you
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Not sure you can find a collection of all...
    Cheers..
    Vasu
    <i>** REward Points if found useful **</i>

  • How to do this with message mapping in PI  ?

    Hi All,
    Field 1 = 100 characters having values in  first fifty characters and last 50 characters blank . I need to remove all the first 50 characters with blank and pass 100 blank characters .How to do this with message mapping
    Thanks

    Adding to that, since usually a tab = 8 spaces. What you can do is to open notepad, press tab 4 times. Copy it and paste 3 times, afterwards press space 4 more times and you get 100 spaces.
    Regards,
    Mark

  • HOW TO FILTER DATA FROM MICROSOFT ACCESS

    HOW TO FILTER DATA FROM MICROSOFT ACCESS BASED ON DATE AND TIME AND GIVE THE RESULT TO A TABLE ?
    I need some example files , can anybody please help me ?
    Solved!
    Go to Solution.

    Just be sure to get examples specific to the Jet DBMS. It is rather "idiosyncratic" when dealing with time and date values.
    One question: the timestamp is being saved in a datetime field, right?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to filter data from a source XML? Please help!

    Hi Experts,
       I have a source XML as shown below:
        <Inventory>
         <InventoryItem>
           <ItemCode>InTransit</ItemCode>
           <Quantity>1000</Quantity>
         </InventoryItem>
         <InventoryItem>
           <ItemCode>Available</ItemCode>
           <Quantity>1500</Quantity>
         </InventoryItem>
         <InventoryItem>
           <ItemCode>Restricted</ItemCode>
           <Quantity>2500</Quantity>
         </InventoryItem>
        </Inventory>
    My Target XML is as below
        <Inventory>
          <stock>1500</stock>
        </Inventory>
    The stock element contains Quantity value where ItemCode is 'Available'.
    But note that there are 3 InventoryItem nodes.
    So how to get the desired target XML in XI mapping? Basically I have to filter data from source XML based on value of an element. What is the best approach to handle this?
    Kindly help
    Thanks
    Gopal

    Hi venkat,
              Your solution does'nt work fine. But why are you using collapsecontext and splitbyvalue before putting the value into stock element?
               Kindly explain your concept.
    My target message is:
    <?xml version="1.0" encoding="UTF-8"?>
    <Inventory>
       <InventoryItem>
          <ItemCode>InTransit</ItemCode>
          <Quantity>1500</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>Available</ItemCode>
          <Quantity>1000</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>UnRestricted</ItemCode>
          <Quantity>2000</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>Available</ItemCode>
          <Quantity>2500</Quantity>
       </InventoryItem>
    </Inventory>
    I am getting the output even though stock is unbounded and I have used collapsecontext and splitbyvalue as:
    <InvStock>
      <Stock>1000</Stock>
    </InvStock>
    I should get:
    <InvStock>
      <Stock>1000</Stock>
      <Stock>2500</Stock>
    </InvStock>
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

  • How to change the order of target message? kindly help

    Hi Experts,
              I have a source message with fields EmpNo, EmpName, Dept and joining date. The target message has the same structure but fields are in different order. That is, EmpName, Dept, EmpNo and joiningdate.
    How to achive the target message with message mapping and without using a different message type for target?
    Kindly help
    Thanks
    Gopal

    Hi Gopal,
    Try this one.
    1. Create Only one message type of target type.
    2. Go to XSD tab and export the "XSD" of the message type.
    3. Change the <xsd:sequence> element to <xsd:all>
    4. Then import the "xsd" in external definitions.
    5. Use the imported "xsd" and create Message mapping. Give both source and target the same message type from XSD.
    6. just Map one to one.
    Now you can get ur required target structure. Since it is <xsd:all> it will accept ur input file.
    Regards,
    P.Venkat

  • How do I resolve error message "mapi was unable to load aplzod.dll"? Outlook2010 on Win7

    Attempts to open Outlook calendar files (apparently located) on iCloud result in the error message "MAPI was unable to load the information service C:\PROGRA~2\COMMON~1\Apple\Internet Services\APLZOD.dll". Be sure the service is correctly installed and configured."
    I am running Outlook 2010 on Windows 7. I have uninstalled and reinstalled iTunes with no apparent effect. Is this a problem with iTunes or Outlook, how do I resolve it?

    That's part of my problem - I was getting the error message when I tried to click on iCloud in the Calendar portion of Outlook 2010. I don't know where it was generated (iCloud, iTunes, or as an add-in to Outlook).
    After my original post I tried restoring my computer to a date when I knew this worked, the restoration worked, and I can access my calendar. So that problem resolved itself.
    I do have another question, but I'll post it separately. Thanks for your response.

  • How to implement validations in message mapping?

    Hi experts,
    I have a simple requirement:
    I have a simple synchronous scenario:
    SOAP -> XI -> RFC
    In a message mapping, one of the fields in the source message is of type String.
    However, the target application (RFC) does not expect a non-numeric characters in this string.
    My question is how can I perform the validation in XI and tell the sender that this field contains Non-numeric characters?
    Please help.
    Thanks.
    Ron

    > Ron,
    >
    > >>With a RunTime Exception thrown, how can I tell
    >  the sender an error has occured?
    >
    > Sure. You can do this with out a BPM. You need to
    > configure alerts for this. If you configure ALERTS
    > and SCOTT, this will send an email of the errors
    > occuring in your scenario.
    >
    > For configuring and trouble shooting alerts check
    > these
    >
    > https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/
    > 2327
    > https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/
    > 2328
    >
    > Regards,
    > Jai Shankar
    Hi Jai
    I already have alerts configured.
    But what I had in mind is to send a response to the sender (The sender is waiting for a reply since this is synchronous), instead of telling the sender through an alternative means such as email, sms, etc.
    Is this possible?

  • How to remove nodes in Message mapping

    Hi XI friends,
    in my idoc to file..
    i have number of segments..all segments are optional...
    i want to remove in resultanat xml file..
    please tell me how to remove if the values are not exsisted for that Segment ..
    i think its possible in message mapping..
    please guide me..
    Munna

    Hi Munna,
    Try Creating a UDF in your mapping name it like: "Create"
    Paste the below mentioned code in it
    ========================
    String str = a;
    if(str != null && str.length()>0)
    return "true";
    else
    return "false";
    ========================
    2) Save this function .
    3) Now Map like this
    (Source Node->UDF Create)->Check if it returns a string "true"--> if yes Map it with source node->add this in the "then" of an "if with out else"---->Target node.
    4) Test now in testing tool in Message mapping.
    Try it.
    it will work
    regards
    Pl: reward points if it worked

  • How to pass GUID in message mapping

    Hi ALL
    I would like to populate one of the target fields with SAP PI GUID or Message ID.
    Can you please let me know, how to get the GUID in my message mapping and map it to the target field.
    Thank you,
    Ritu

    Hi Ritu ,
    its simple you can pick the messageID from the streamtransformation constant and map it to ur target field .
    use this UDF it does not taes any input and its output can be mapped to target field where you want to populate the messageid.
    java.util.Map param = container.getTransformationParameters();
    String MSGID = (String) param.get (StreamTransformationConstants.MESSAGE_ID);
    return MSGID
    Regards,
    Saurabh

  • How to filter data in OWB.

    I have moved data from customer_adress table to target table.there are duplicates values in the customer table. i need to filter out the records from the customer table on the basis of max value for last_update_date cloum in case there are duplicate for the same customer_id. any help how do solve this proble will be grt help.
    Thanks,
    Ashvin.

    Hi Ashvin,
    you can use analytic functions for doing this.
    In SQL this looks like (if you use Oracle DBMS 9i ant later)
    select customer_id,
      min(last_update_date) keep (dense_rank LAST order by last_update_date) LAST_DATE,
      min(city) keep (dense_rank LAST order by last_update_date) LAST_CITY,
      min(street) keep (dense_rank LAST order by last_update_date) LAST_STREET
    from your_table
    group by customer_id
    [PRE]
    OWB 10g R2 directly supports FIRST/LAST analytic functions.
    Regards,
    Oleg                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Oracle Apps Custom Form, How to Filter data in the LOV

    Detail Data Block I am Calling One LOV, Based on Master Block Item I want to filter data in the LOV.
    in the select statement
    SELECT * FROM MTL_SYSTEM_ITEMS WHERE
    ORGANIZATION_ID = :BLOCK_NAME.FIELD_NAME
    specified
    but it is showing no data found error.

    Do this:
    MESSAGE(:BLOCK_NAME.FIELD_NAME);
    MESSAGE(:BLOCK_NAME.FIELD_NAME);
    SELECT * FROM MTL_SYSTEM_ITEMS WHERE
    ORGANIZATION_ID = :BLOCK_NAME.FIELD_NAME
    This will tell you the value of BLOCK_NAME.FIELD_NAME
    Then use PLSQL and run the query using the value of BLOCK_NAME.FIELD_NAME
    and see if you get data. If you don't get data using PLSQL, then you won't get data using LOV.

  • How to filter data in Graphs?

    Hi,
    i want to filter data in graph. can anyone provide me links or information how to put filters as well as sorting.
    Thanks,
    Lax

    Re,
    see attached files :
    1) the signal non filtered
    2) the signal filtered with a parameter 0.9999999
    3) the signal filtered with a parameter 0.9999
    I didn't understood what you wanted to remove from your signal : is it the peaks, or the noise ?
    let me know if it's good for you, and I will send you the VI in 8.5 (or in 8.0 if you want)
    Best regards,
    Vincent
    V-F
    Attachments:
    filtered 0,9999.JPG ‏186 KB
    non filtered.JPG ‏185 KB
    filtered 0,9999999.JPG ‏189 KB

Maybe you are looking for

  • Some tunes don't play in airport express

    A few of the tunes in my play list show a little display icon. Although most of of the tunes play just fine through my airport express, the ones with the display icon switch back to my computer for sound???? frank

  • What is the best way to use a SSD for Photoshop/photo editing?

    Computer hardware newbie here: I do a significant amount of photo editing work and for a very long time I've experienced Photoshop, Bridge and Photomatix crashing constantly (usually due to insufficient RAM) or just generally taking forever (Bridge t

  • Ical print and web formatting

    i am using ical to present a monthly schedule to my department. i have color coded the events by creating different calendars and made them 'all day events'. when i try to print it -- the order of the events get shuffled around with no apparent ryhme

  • How To Save Jpeg Copy As Action

    Hi - how do I create an action that saves my open image as a jpeg copy in the same directory as the original? Rather than save as export I am doing a straight 'Save As...' and then selecting the jpeg option. When you do this the 'save as copy' is gre

  • Export a query results to CSV

    Hi all, I am currently planning to develop a program that does the following things: 1. Connects to the Oracle database 2. Runs a query 3. Export the results of the query to a CSV file in a folder If theres anyone out there who has experienced in sim